/* --- FORMULARIOS GENERALES --- */
.form-apuesta {
  background-color: #1e2d24;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .form-container {
    grid-template-columns: 3fr 2fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #f0b90b;
}

.form-apuesta input[type="text"],
.form-apuesta input[type="number"],
.form-apuesta input[type="email"],
.form-apuesta input[type="password"],
.form-apuesta select,
.form-apuesta textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-apuesta input:focus,
.form-apuesta select:focus,
.form-apuesta textarea:focus {
  outline: none;
  border-color: rgba(240, 185, 11, 0.5);
  box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

.form-apuesta input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Cuota con tooltip */
.odds-info {
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 10;
}

/* Botón de envío y cancelar */
.form-action {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Estilos para inputs deshabilitados */
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: #666 !important;
}

.prediction-option input[type="radio"]:disabled + .option-label {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.03);
}

.prediction-option input[type="radio"]:disabled + .option-label:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- LOGIN Y REGISTRO --- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem 1rem;
}

.login-card {
  background-color: rgba(30, 45, 36, 0.9);
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 100%;
  border: 1px solid rgba(240, 185, 11, 0.2);
}

.login-card h2 {
  margin-bottom: 1.8rem;
  font-size: 1.8rem;
  text-align: center;
}

.accent-text {
  color: #f0b90b;
  font-weight: bold;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: #444;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.google-btn:hover {
  background-color: #f7f7f7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.google-logo {
  height: 20px;
  margin-right: 10px;
}

.divider {
  position: relative;
  margin: 1.5rem 0;
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.login-form {
  margin-top: 1rem;
}

.login-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 1rem;
  color: #fff;
  transition: all 0.3s;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(240, 185, 11, 0.5);
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-form .cta-button {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background-color: #f0b90b;
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-form .cta-button:hover {
  background-color: #dba700;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.register-text {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.register-text a {
  color: #f0b90b;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.register-text a:hover {
  text-decoration: underline;
  color: #ffcc33;
}

/* Password field with toggle button */
.password-field {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.toggle-password:hover {
  color: #495057;
}

.eye-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  position: relative;
}

.eye-icon::before,
.eye-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.eye-closed::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 75% 15%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.eye-closed::after {
  width: 0;
  height: 0;
  background: currentColor;
  border-radius: 50%;
}

.eye-open::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 75% 15%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.eye-open::after {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

/* Para ajustar el padding del input para el botón */
.password-field input {
  padding-right: 40px;
}

/* --- ESTILOS PARA CREAR APUESTA (TEMÁTICA VERDE) --- */

.bet-creation-container {
  max-width: 1200px;
  margin: 20px auto;
  background: linear-gradient(135deg, #132b1e 0%, #1a3a29 100%);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(31, 162, 90, 0.3);
}

.page-title {
  text-align: center;
  color: #ffd700;
  margin-bottom: 20px;
  font-size: 1.75rem;
  font-weight: 700;
}

.page-title .accent-text {
  color: #1fa25a;
}

.form-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.bet-form {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

/* Pasos del formulario */
.form-step {
  margin-bottom: 15px;
  position: relative;
  padding-left: 40px;
  min-height: 32px;
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #1fa25a 0%, #24c06f 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(31, 162, 90, 0.4);
  flex-shrink: 0;
}

.step-label {
  display: block;
  color: #ffd700;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Inputs y selects */
.select-wrapper {
  position: relative;
}

.select-wrapper select,
.amount-input input,
.odds-input input,
.goals-input select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(31, 162, 90, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
}

/* Opciones del select con fondo oscuro */
.select-wrapper select option,
.goals-input select option {
  background-color: #1a2720;
  color: #fff;
  padding: 10px;
}

.select-wrapper select option:disabled,
.goals-input select option:disabled {
  color: #666;
}



/* Grupos de opciones (optgroup) */
.goals-input select optgroup {
  background-color: #132b1e;
  color: #ffd700;
  font-weight: 700;
  font-style: normal;
}

.goals-input {
  position: relative;
}

/* Flecha personalizada amarilla */
.select-wrapper::after {
  content: "▼";
  font-size: 0.7rem;
  color: #ffd700;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-wrapper select:focus,
.amount-input input:focus,
.odds-input input:focus,
.goals-input select:focus {
  outline: none;
  border-color: #1fa25a;
  box-shadow: 0 0 15px rgba(31, 162, 90, 0.3);
}

.select-wrapper select:disabled,
.amount-input input:disabled,
.odds-input input:disabled,
.goals-input select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Campo de cantidad con símbolo $ */
.amount-input {
  position: relative;
}

.amount-input input {
  padding-left: 16px;
}

/* Info adicional de campos */
.field-info {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Selector de equipos */
.team-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
}

.team-option {
  flex: 1;
}

.team-option input[type="radio"] {
  display: none;
}

.team-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: 2px solid rgba(31, 162, 90, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  min-height: 120px;
  text-align: center;
}

.team-label:hover {
  border-color: #1fa25a;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(31, 162, 90, 0.3);
}

.team-option input[type="radio"]:checked + .team-label {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(31, 162, 90, 0.1) 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.team-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
}

.team-logo[src=""],
.team-logo:not([src]) {
  display: none;
}

.team-label span {
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  display: block;
  width: 100%;
}

.vs-divider {
  font-weight: bold;
  font-size: 1.5rem;
  color: #ffd700;
  flex-shrink: 0;
}

/* Opciones de predicción */
.prediction-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.prediction-option input[type="radio"] {
  display: none;
}

.option-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid rgba(31, 162, 90, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.option-label:hover {
  border-color: #1fa25a;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(31, 162, 90, 0.3);
}

.prediction-option input[type="radio"]:checked + .option-label {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(31, 162, 90, 0.1) 100%);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.option-icon {
  font-size: 2rem;
}

.option-text {
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
}

/* Display de ganancia potencial */
.profit-display {
  margin: 20px 0;
  animation: slideIn 0.5s ease;
}

.profit-card {
  background: linear-gradient(135deg, rgba(31, 162, 90, 0.2) 0%, rgba(36, 192, 111, 0.1) 100%);
  border: 2px solid #1fa25a;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}

.profit-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.profit-amount {
  color: #ffd700;
  font-size: 2rem;
  font-weight: 700;
  margin: 8px 0;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.profit-total {
  color: white;
  font-size: 1rem;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.profit-total span {
  color: #24c06f;
  font-weight: 700;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Botones de acción */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #1fa25a 0%, #24c06f 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(31, 162, 90, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 162, 90, 0.6);
}

.btn-secondary {
  background: rgba(85, 85, 85, 0.5);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(85, 85, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-icon {
  font-size: 1.3rem;
}

/*Estilos para botón deshabilitado */
.btn-primary:disabled,
.btn-primary.btn-disabled {
  background: rgba(85, 85, 85, 0.4);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn-primary:disabled:hover,
.btn-primary.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Sidebar de información */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(31, 162, 90, 0.3);
  border-radius: 12px;
  padding: 15px;
}

.info-card.highlight {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
  border-color: rgba(255, 193, 7, 0.4);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
}

.info-card h3 {
  color: #ffd700;
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-align: center;
}

.info-card p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  text-align: center;
  font-size: 0.9rem;
}

.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips-list li {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.4;
  font-size: 0.85rem;
}

.tips-list li:last-child {
  border-bottom: none;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 30px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(31, 162, 90, 0.2);
  border-top-color: #1fa25a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 1200px) and (min-width: 993px) {
  .form-layout {
    gap: 1.5rem;
  }

  .team-selector {
    gap: 15px;
  }

  .team-logo {
    width: 45px;
    height: 45px;
  }

  .vs-divider {
    font-size: 1.3rem;
  }
}

@media (max-width: 992px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
  
  .prediction-options {
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .team-selector {
    flex-direction: column;
  }
  
  .vs-divider {
    transform: rotate(90deg);
    margin: 10px 0;
  }
}

@media (max-width: 768px) {
  .bet-creation-container {
    padding: 20px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .form-step {
    padding-left: 50px;
    min-height: 35px;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    top: 3px;
  }
  
  .profit-amount {
    font-size: 2.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .team-label {
    min-height: 150px;
  }
  
  .team-logo {
    width: 60px;
    height: 60px;
  }
  
  .amount-input input {
    padding-left: 14px;
  }
}

@media (max-width: 600px) {
  .form-action {
    flex-direction: column;
  }
  
  .form-action .btn-outline {
    text-align: center;
  }
}