/* Estilos base */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  overflow: hidden;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../Public/CAllisto.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@keyframes gradientBG {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 320px;
  width: 90%;
}

.hidden {
  display: none !important;
}

.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 180px;
  height: auto;
}

#pageTitle {
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.4;
}

.highlight {
  color: #FFD700;
}

.highlight.supervisor {
  font-family: 'Pacifico', cursive;
  font-size: 16px;
}

.emojis {
  font-size: 24px;
  margin: 10px 0;
}

.option-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.option {
  background-color: #FFD700;
  color: #000;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  gap: 6px;
}

.option:hover {
  background-color: #FFA500;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.option.disabled {
  background-color: rgba(255, 215, 0, 0.3);
  color: rgba(0, 0, 0, 0.5);
  cursor: not-allowed;
}

.option.disabled:hover {
  background-color: rgba(255, 215, 0, 0.3);
  transform: none;
  box-shadow: none;
}

.coming-soon-badge {
  font-size: 8px;
  font-weight: bold;
  text-transform: uppercase;
  background: #ff6b6b;
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

#loginContainer {
  margin-top: 20px;
}

/* Login Mode Selector */
.login-mode-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.mode-btn {
  flex: 1;
  padding: 8px 16px;
  border: 2px solid #FFD700;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 215, 0, 0.6);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
}

.mode-btn.active {
  background: #FFD700;
  color: #000;
  border-color: #FFD700;
}

/* Input with Clear Button */
.input-with-clear {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.team-input {
  width: 100%;
  padding: 8px 35px 8px 8px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  color: #FFD700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 69, 58, 0.8);
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.clear-btn:hover {
  background: rgba(255, 69, 58, 1);
  transform: translateY(-50%) scale(1.1);
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input, select, button {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  color: #FFD700;
  font-size: 16px;
}

input::placeholder {
  color: rgba(255, 215, 0, 0.5);
}

select {
  color: #FFD700;
}

select option {
  background-color: #2a2a2a;
  color: #FFD700;
}

button {
  background: #FFD700;
  color: #000000;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

button:hover {
  background: #FFA500;
}

footer {
  color: #ffffff;
  margin-top: 20px;
  font-size: 14px;
}

/* Estilos para el dropdown de Service */
#serviceDropdown {
  position: relative;
  width: 100%;
}

#serviceButton {
  background: rgba(255, 255, 255, 0.2);
  color: #FFD700;
  padding: 8px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 16px;
  position: relative;
}

#serviceButton::after {
  content: "▼";
  font-size: 12px;
  color: #FFD700;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

#serviceOptions {
  display: none;
  position: absolute;
  background-color: #333;
  width: 95%;
  left: 0;
  border-radius: 5px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 1;
  color: #FFD700;
  padding: 8px;
  border: 1px solid #FFD700;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-top: 2px;
}

.service-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  color: #FFD700;
  font-size: 13px;
  transition: background-color 0.3s ease;
  border-radius: 3px;
  cursor: pointer;
}

.service-option:hover {
  background-color: rgba(255, 215, 0, 0.2);
}

.service-option span {
  flex: 1;
  text-align: left;
  user-select: none;
}

.service-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Estilos para el dropdown de Month */
#monthDropdown {
  position: relative;
  width: 100%;
}

#monthButton {
  background: rgba(255, 255, 255, 0.2);
  color: #FFD700;
  padding: 8px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 16px;
  position: relative;
}

#monthButton::after {
  content: "▼";
  font-size: 12px;
  color: #FFD700;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

#monthOptions {
  display: none;
  position: absolute;
  background-color: #333;
  width: 95%;
  left: 0;
  border-radius: 5px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 2;
  color: #FFD700;
  padding: 8px;
  border: 1px solid #FFD700;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-top: 2px;
}

.month-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  color: #FFD700;
  font-size: 13px;
  transition: background-color 0.3s ease;
  border-radius: 3px;
  cursor: pointer;
}

.month-option:hover:not(.disabled) {
  background-color: rgba(255, 215, 0, 0.2);
}

.month-option span {
  flex: 1;
  text-align: left;
  user-select: none;
}

.month-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Estilo para meses deshabilitados */
.month-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.month-option.disabled input[type="checkbox"] {
  cursor: not-allowed;
  pointer-events: none;
}

.month-option.disabled span {
  color: #999999;
}

/* Estilo para el mes actual */
.month-option.current-month {
  background-color: rgba(173, 216, 230, 0.15);
}

.error-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff4444;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Scrollbar personalizado para los dropdowns */
#monthOptions::-webkit-scrollbar,
#serviceOptions::-webkit-scrollbar {
  width: 6px;
}

#monthOptions::-webkit-scrollbar-track,
#serviceOptions::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

#monthOptions::-webkit-scrollbar-thumb,
#serviceOptions::-webkit-scrollbar-thumb {
  background: #FFD700;
  border-radius: 3px;
}

#monthOptions::-webkit-scrollbar-thumb:hover,
#serviceOptions::-webkit-scrollbar-thumb:hover {
  background: #FFA500;
}

/* Compatibilidad legacy */
select option:disabled {
  color: #999999;
}

/* ======================== */
/*    Responsive Styles     */
/* ======================== */

/* Tablets (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .card {
    padding: 30px;
    max-width: 280px;
  }
  
  #pageTitle {
    font-size: 28px;
  }
  
  .option {
    padding: 6px 12px;
    font-size: 14px;
  }
  
  input, select, button {
    font-size: 14px;
    padding: 6px;
  }
}

/* Small Tablets / Large Phones (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  .card {
    padding: 25px;
    max-width: 260px;
  }
  
  .logo {
    max-width: 150px;
  }
  
  #pageTitle {
    font-size: 24px;
  }
  
  .emojis {
    font-size: 20px;
  }
  
  .option-container {
    gap: 10px;
  }
  
  .option {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  input, select, button {
    font-size: 14px;
    padding: 6px;
  }
  
  footer {
    font-size: 12px;
  }
}

/* Phones (max-width: 575px) */
@media (max-width: 575px) {
  .card {
    padding: 20px;
    max-width: 90%;
    width: 90%;
  }
  
  .logo {
    max-width: 120px;
  }
  
  #pageTitle {
    font-size: 20px;
    line-height: 1.3;
  }
  
  .emojis {
    font-size: 18px;
    margin: 8px 0;
  }
  
  .option-container {
    gap: 8px;
  }
  
  .option {
    padding: 6px 8px;
    font-size: 11px;
  }
  
  input, select, button {
    font-size: 14px;
    padding: 6px;
  }
  
  #serviceButton,
  #monthButton {
    font-size: 14px;
    padding: 6px;
  }
  
  .service-option,
  .month-option {
    font-size: 12px;
    padding: 5px 6px;
  }
  
  footer {
    font-size: 11px;
    margin-top: 15px;
  }
  
  .highlight.supervisor {
    font-size: 14px;
  }

  .login-mode-selector {
    gap: 8px;
    margin-bottom: 12px;
  }

  .mode-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .team-input {
    font-size: 14px;
    padding: 6px 30px 6px 6px;
  }

  .clear-btn {
    width: 20px;
    height: 20px;
    font-size: 12px;
    right: 6px;
  }
}

/* Very Small Phones (max-width: 360px) */
@media (max-width: 360px) {
  .card {
    padding: 15px;
    max-width: 95%;
  }
  
  .logo {
    max-width: 100px;
  }
  
  #pageTitle {
    font-size: 18px;
  }
  
  .emojis {
    font-size: 16px;
  }
  
  .option {
    padding: 4px 6px;
    font-size: 11px;
  }
  
  input, select, button {
    font-size: 13px;
    padding: 5px;
  }
  
  footer {
    font-size: 10px;
  }

  .login-mode-selector {
    gap: 6px;
    margin-bottom: 10px;
  }

  .mode-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .team-input {
    font-size: 13px;
    padding: 5px 28px 5px 5px;
  }

  .clear-btn {
    width: 18px;
    height: 18px;
    font-size: 11px;
    right: 5px;
  }
}