/* --- BOTONES --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 1.2;
  position: relative;
}

/* Spinner dentro de botones */
.btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Botón primario */
.btn-primary {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
  box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.4);
  color: #000;
  background: linear-gradient(135deg, #ffd700 0%, #f0b90b 100%);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

/* Botón secundario */
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Botón de peligro/eliminación */
.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  color: #fff;
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Botón outline */
.btn-outline {
  background: transparent;
  color: #f0b90b;
  border: 2px solid #f0b90b;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: #ffd700;
  color: #ffd700;
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0);
}

/* CTA Button (para homepage principalmente) */
.cta-button {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.4);
  background: linear-gradient(135deg, #ffd700 0%, #f0b90b 100%);
  color: #000;
}

.cta-button.small {
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Efecto click */
.cta-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.cta-button:active::after {
  opacity: 1;
  transform: scale(50, 50) translate(-50%);
  transition: all 0.5s ease-out;
}

/* Tamaños de botones */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-height: 52px;
}

/* Botón de bloque (ancho completo) */
.btn-block {
  width: 100%;
  display: flex;
}

/* Estados deshabilitados */
.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.btn-primary {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.4);
}

.cta-button {
  background: #f0b90b;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background: #dba700;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-button.small {
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Efecto click */
.cta-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.cta-button:active::after {
  opacity: 1;
  transform: scale(50, 50) translate(-50%);
  transition: all 0.5s ease-out;
}

/* --- SECCIÓN DE PRECIOS ULTRA-PREMIUM (QUANTUM) --- */

.quantum-pricing-toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3.5rem;
  perspective: 1000px;
}

.quantum-pricing-toggle {
  background: rgba(20, 33, 26, 0.6); /* Slightly green tinted dark glass */
  backdrop-filter: blur(15px);
  padding: 5px;
  border-radius: 50px;
  border: 1px solid rgba(240, 185, 11, 0.15); /* Match var(--border-color) */
  display: flex;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.02);
  width: 280px;
}

.toggle-option {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.toggle-option.active {
  color: #000;
}

.discount-pill {
  background: #28a745;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 5px;
}

.toggle-track {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  background: linear-gradient(135deg, #f0b90b 0%, #d4a017 100%);
  border-radius: 40px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 15px rgba(240, 185, 11, 0.4);
}

.toggle-option:last-child.active ~ .toggle-track {
  transform: translateX(100%);
}

/* Logic for track animation (since it's not a sibling of input but buttons) */
#billingToggle .toggle-option[data-cycle="monthly"].active ~ .toggle-track { transform: translateX(0); }
#billingToggle .toggle-option[data-cycle="yearly"].active ~ .toggle-track { transform: translateX(100%); }

.plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  padding: 40px 20px;
}


.plan-card {
  background: rgba(20, 33, 26, 0.9); /* Deep green-dark base referencing --bg-card */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  padding: 3.5rem 2.5rem;
  width: 340px;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(240, 185, 11, 0.1); /* Subtle yellow/gold border */
  overflow: hidden;
  z-index: 1;
}

/* Removed floating animation for solidity */

/* Magnetic Blur Glow (Mouse Tracking Effect) */
.plan-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: radial-gradient(
    circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    rgba(240, 185, 11, 0.15), 
    transparent 35%
  );
  z-index: -1;
  border-radius: 1.6rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(6px);
}

/* Light Sweep Effect */
.plan-card::after {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 45%,
    rgba(255, 255, 255, 0.1) 48%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.1) 52%,
    transparent 55%
  );
  transform: rotate(0deg);
  transition: all 0.8s;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.plan-card:hover {
  transform: translateY(-8px) scale(1.01);
  background: rgba(26, 48, 38, 0.95);
  border-color: rgba(240, 185, 11, 0.3);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(240, 185, 11, 0.03);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card:hover::after {
  animation: shine-sweep 2.5s cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0.8;
}

/* Removed previous breathing-card keyframes */

@keyframes shine-sweep {
  0% { transform: translate(-30%, -30%) rotate(0deg); }
  100% { transform: translate(30%, 30%) rotate(0deg); }
}


.plan-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.plan-price {
  margin: 1.5rem 0;
}

.plan-price .price {
  font-size: 3rem;
  font-weight: 800;
  color: #f0b90b;
  display: block;
  text-shadow: 0 0 30px rgba(240, 185, 11, 0.3);
}

.plan-price .period {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-top: 0.25rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: left;
  flex-grow: 1;
}

.plan-features li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.plan-features li::before {
  content: "✓";
  color: #f0b90b;
  font-weight: 900;
  font-size: 1.1rem;
}

/* Featured Plan (Recomendado) */
.plan-card.premium {
  border-color: rgba(240, 185, 11, 0.4);
  background: rgba(240, 185, 11, 0.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(240, 185, 11, 0.2);
}

.plan-card.premium::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(240, 185, 11, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.plan-card.premium .recomendado-badge {
  position: absolute;
  top: 15px;
  right: -30px;
  background: #f0b90b;
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 40px;
  transform: rotate(45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Pro Plan Glow */
.plan-card.pro {
  border-color: rgba(255, 255, 255, 0.15);
}

.plan-card.pro:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 255, 255, 0.05);
}

.plan-card.pro .plan-title {
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* --- GESTIÓN DE PLANES --- */
.plan-price {
  margin: 1.5rem 0;
  text-align: center;
}

.plan-price .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f0b90b;
  display: block;
}

.plan-price .period {
  font-size: 1rem;
  color: #999;
  display: block;
  margin-top: 0.5rem;
}

.plan-features {
  margin: 2rem 0;
}

.plan-features h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.plan-features ul {
  list-style: none;
  padding: 0;
}

.plan-features ul li {
  padding: 0.5rem 0;
  color: #e0e0e0;
  position: relative;
  padding-left: 1.5rem;
}

.plan-features ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00d084;
  font-weight: bold;
}

.plan-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-header {
  margin-bottom: 1.5rem;
}

.plan-header h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.plan-change-card,
.plan-pending-card {
  background: linear-gradient(135deg, #132b1e 0%, #1a3a29 100%);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(240, 185, 11, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.plan-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2rem 0;
  text-align: center;
}

.plan-current,
.plan-target {
  padding: 1.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.plan-arrow {
  font-size: 2rem;
  color: #f0b90b;
  font-weight: bold;
}

.plan-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  text-transform: uppercase;
}

.plan-badge.current {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
}

.plan-badge.target {
  background: linear-gradient(135deg, #00d084 0%, #00b86f 100%);
  color: #fff;
}

.plan-badge.free {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #fff;
}

.plan-badge.premium {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
}

.plan-badge.pro {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
}

.warning-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 10px;
  margin: 2rem 0;
}

.warning-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.warning-content h4 {
  color: #ffc107;
  margin-bottom: 1rem;
}

.warning-content ul {
  margin: 0;
  padding-left: 1.5rem;
}

.timeline-info {
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.timeline-info h4 {
  color: #00d9ff;
  margin-bottom: 1rem;
}

.timeline-info ul {
  margin: 0;
  padding-left: 1.5rem;
}

.timeline-info li {
  margin-bottom: 0.5rem;
}

.plan-manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.current-plan-card,
.plan-options-card {
  background: linear-gradient(135deg, #132b1e 0%, #1a3a29 100%);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(240, 185, 11, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.plan-change-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upgrade-option,
.downgrade-option {
  padding: 1.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}


.upgrade-option:hover {
  border-color: rgba(0, 208, 132, 0.5);
  background: rgba(0, 208, 132, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 208, 132, 0.2);
}

.downgrade-option:hover {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.upgrade-option h4 {
  color: #00d084;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.downgrade-option h4 {
  color: #ffc107;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.upgrade-option p,
.downgrade-option p {
  color: #ccc;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Asegurar que los botones dentro de las opciones tengan el ancho completo */
.upgrade-option .btn,
.downgrade-option .btn {
  width: 100%;
  justify-content: center;
}

.plan-options-card h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

/* Responsive mejorado */
@media (max-width: 768px) {
  .plan-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .plan-arrow {
    transform: rotate(90deg);
  }

  .plan-manage-grid {
    grid-template-columns: 1fr;
  }

  .upgrade-option .btn,
  .downgrade-option .btn {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}

/* --- ANÁLISIS --- */
.analisis-card {
  background-color: #1e2d24;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.analisis-texto {
  background-color: #18382e;
  padding: 1.5rem;
  border-left: 5px solid #f0b90b;
  border-radius: 8px;
  color: #fff;
}

/* --- HOW IT WORKS --- */
.how-it-works {
  background-color: #18382e;
  padding: 60px 20px;
  color: white;
  text-align: center;
}

.how-it-works h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.how-it-works .subtitle {
  font-size: 18px;
  margin-bottom: 40px;
  color: #ccc;
}

.steps-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.step-card {
  background-color: #245341;
  padding: 30px 20px;
  border-radius: 16px;
  max-width: 320px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-icon {
  width: 60px;
  margin-bottom: 20px;
}

.step-card h3 {
  color: #ffcc00;
  margin-bottom: 10px;
}

/* --- ALERTAS --- */
.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
}

.alert-error {
  background-color: rgba(220, 53, 69, 0.15);
  color: #e55;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-info {
  background-color: rgba(0, 123, 255, 0.15);
  color: #36a;
  border: 1px solid rgba(0, 123, 255, 0.3);
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.15);
  color: #3c6;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

/* --- ESTADO VACÍO --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem auto;
  max-width: 600px;
  min-height: 300px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #f0b90b;
  font-weight: 600;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  max-width: 500px;
  font-size: 1rem;
  line-height: 1.6;
}

/* --- MODAL --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: #1e2d24;
  border-radius: 10px;
  border: 1px solid rgba(240, 185, 11, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: block;
  opacity: 1;
}

.modal-content {
  padding: 1.5rem;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #f0b90b;
}

.modal-content p {
  margin-bottom: 1.5rem;
  color: #fff;
}

#modalOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#modalOverlay.active {
  display: block;
  opacity: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background-color: transparent;
  color: #ccc;
  border: 1px solid #ccc;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- NOTIFICACIONES --- */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  background-color: rgba(30, 45, 36, 0.9);
  color: white;
  border-radius: 8px;
  z-index: 1100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.active {
  transform: translateY(0);
  opacity: 1;
}

.notification.success {
  border-left: 4px solid #4caf50;
}

.notification.error {
  border-left: 4px solid #f44336;
}

.notification.info {
  border-left: 4px solid #2196f3;
}

/* --- MIS APUESTAS --- */

.apuestas-container {
  margin-top: 2rem;
}

.apuestas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filtro-select {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.apuestas-stats {
  display: flex;
  gap: 1rem;
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-align: center;
  min-width: 80px;
}

.stat-card.success {
  background-color: rgba(76, 175, 80, 0.2);
}

.stat-card.danger {
  background-color: rgba(244, 67, 54, 0.2);
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.apuestas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.apuesta-card {
  background-color: #1e2d24;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apuesta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.apuesta-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.apuesta-fecha {
  color: rgba(255, 255, 255, 0.6);
}

.apuesta-estado {
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.apuesta-estado.pendiente {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.apuesta-estado.ganada {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.apuesta-estado.perdida {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.apuesta-partido {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
  font-weight: 600;
}

.apuesta-detalles {
  margin-bottom: 1.5rem;
  flex: 1;
}

.apuesta-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.detalle-label {
  color: rgba(255, 255, 255, 0.6);
}

.detalle-valor {
  font-weight: 500;
}

.apuesta-acciones {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

.btn-outline {
  background-color: transparent;
  color: #f0b90b;
  border: 1px solid currentColor;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover {
  background-color: rgba(240, 185, 11, 0.1);
}

/* --- BOTONES --- */
.btn {
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: inline-flex;
  /* Cambiado de inline-block a inline-flex */
  align-items: center;
  /* Centrar verticalmente el contenido */
  justify-content: center;
  /* Centrar horizontalmente el contenido */
  white-space: nowrap;
  border: none;
  /* Para que los botones tengan el mismo estilo */
  cursor: pointer;
  /* Para el cursor en hover */
}


/* Botón primario */
.btn-primary {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
  box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.4);
  background: linear-gradient(135deg, #ffd700 0%, #f0b90b 100%);
}

/* Botón secundario */
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Botón de peligro/eliminación */
.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Botón outline */
.btn-outline {
  background: transparent;
  color: #f0b90b;
  border: 2px solid #f0b90b;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: #ffd700;
  color: #ffd700;
  transform: translateY(-1px);
}

/* CTA Button */
.cta-button {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(240, 185, 11, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.4);
}

/* Tamaños de botones */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  min-height: 52px;
}

.btn-block {
  width: 100%;
}

/* Estados deshabilitados */
.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* --- MODALES --- */
.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #121212;
  /* Solid dark background to prevent dimming */
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 15px rgba(240, 185, 11, 0.1);
  z-index: 1050;
  /* Higher than overlay */
  min-width: 450px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal.active {
  display: block;
  animation: modalFadeIn 0.3s ease;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  backdrop-filter: none;
  /* Removed blur to prevent visibility issues on some browsers */
}

.modal-overlay.active {
  display: block;
  animation: overlayFadeIn 0.3s ease;
}

.modal-content h3 {
  color: #ffd700;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.modal-content p {
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- PÁGINA DE ANÁLISIS --- */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: #999;
  font-size: 1.1rem;
}

/* Card de detalle de apuesta */
.bet-detail-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #333;
}

.bet-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #333;
}

.match-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.match-date {
  color: #999;
  font-size: 0.9rem;
}

.bet-status .badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.badge-success {
  background: linear-gradient(135deg, #00d084 0%, #00b86f 100%);
  color: #fff;
}

.badge-danger {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  color: #fff;
}

.badge-pending {
  background: linear-gradient(135deg, #f0b90b 0%, #c99500 100%);
  color: #000;
}

.bet-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bet-detail-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bet-detail-row .full-width {
  grid-column: 1 / -1;
}

.bet-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bet-detail-item .label {
  color: #999;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bet-detail-item .value {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}

.odds-value {
  color: #f0b90b;
  font-size: 1.5rem;
}

.profit-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.profit-value.positive {
  color: #00d084;
}

.profit-value.negative {
  color: #ff4444;
}

/* Card de análisis IA */
.ai-analysis-card {
  background: linear-gradient(135deg, #0a1929 0%, #1a2332 100%);
  border-radius: 15px;
  padding: 0;
  margin-bottom: 2rem;
  border: 1px solid #00d9ff33;
  overflow: hidden;
}

.ai-analysis-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #00d9ff22 0%, transparent 100%);
  border-bottom: 1px solid #00d9ff33;
}

.ai-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 217, 255, 0.1);
  border-radius: 10px;
}

.ai-analysis-header h3 {
  font-size: 1.5rem;
  color: #00d9ff;
  margin: 0;
}

.ai-analysis-body {
  padding: 2rem;
}

.analysis-content {
  color: #e0e0e0;
  line-height: 1.8;
  font-size: 1.05rem;
}

.analysis-content p {
  margin-bottom: 1rem;
}

.analysis-content strong {
  color: #00d9ff;
}

.loading-analysis {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.loading-analysis .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #333;
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-analysis p {
  color: #999;
}

/* Botones de acción */
.action-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

/* --- PÁGINA DE ACTUALIZAR APUESTA --- */
.bet-summary-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #333;
}

.bet-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.bet-summary-header h3 {
  font-size: 1.3rem;
  margin: 0;
}

.bet-summary-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-item .label {
  color: #999;
}

.summary-item .value {
  color: #fff;
  font-weight: 600;
}

.odds-highlight {
  color: #f0b90b;
  font-size: 1.3rem;
}

/* Formulario de actualización */
.update-form-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #333;
}

.result-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.result-option input[type="radio"] {
  display: none;
}

.result-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px solid #333;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #1a1a1a;
  text-align: center;
}

.result-label:hover {
  border-color: #00d9ff;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 217, 255, 0.3);
}

.result-option input[type="radio"]:checked+.result-label {
  border-color: #f0b90b;
  background: linear-gradient(135deg, #1a1a1a 0%, rgba(240, 185, 11, 0.15) 100%);
  box-shadow: 0 0 20px rgba(240, 185, 11, 0.3);
}

.result-label .icon {
  font-size: 2rem;
}

.result-label .text {
  font-weight: 600;
  color: #fff;
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  color: #999;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.button-icon {
  margin-right: 0.5rem;
}

/* Info box */
.info-box {
  display: flex;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(0, 217, 255, 0.02) 100%);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.info-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.info-content h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #00d9ff;
}

.info-content ul {
  margin: 0;
  padding-left: 1.5rem;
}

.info-content li {
  margin-bottom: 0.5rem;
  color: #e0e0e0;
}

.btn-analyze-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1fa25a 0%, #24c06f 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(31, 162, 90, 0.3);
}

.btn-analyze-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 162, 90, 0.5);
  background: linear-gradient(135deg, #24c06f 0%, #1fa25a 100%);
}

.btn-analyze-all .btn-icon {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .bet-detail-row {
    grid-template-columns: 1fr;
  }

  .result-options {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }

  .bet-detail-header {
    flex-direction: column;
    gap: 1rem;
  }

  .bet-summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* --- AI ANALYSIS DASHBOARD --- */
.bet-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .ai-cards-grid {
    grid-template-columns: 1fr;
  }
}

.ai-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.ai-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-section-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Highlight Insight Clave (Section 3) */
.section-3 {
  background: linear-gradient(135deg, #1a3026 0%, #0d1a14 100%);
  border: 2px solid var(--primary-color);
  grid-column: span 2;
}

@media (max-width: 768px) {
  .section-3 {
    grid-column: span 1;
  }
}

.section-3 .ai-section-title {
  color: #fff;
  font-size: 1.2rem;
}

.section-3 .ai-section-content {
  color: #e0e0e0;
  font-weight: 500;
}

.section-4 {
  border-left: 4px solid var(--primary-color);
}

/* Skeleton Loader Analysis */
.loading-analysis-card {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
}

.skeleton-line {
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin: 1rem auto;
  border-radius: 6px;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

/* --- SOCIAL PROOF TOAST --- */
.social-proof-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(10, 15, 13, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  max-width: 320px;
}

.social-proof-toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.social-proof-toast.left {
  right: auto;
  left: 20px;
}

.social-proof-toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-proof-toast-content i {
  width: 18px;
  height: 18px;
  color: #f0b90b;
  flex-shrink: 0;
}

.social-proof-toast-content span {
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.4;
  font-weight: 500;
}

@media (max-width: 768px) {
  .social-proof-toast {
    left: 10px !important;
    right: 10px !important;
    bottom: 12px;
    max-width: none;
    width: calc(100% - 20px);
  }
}

/* ═══════════════════════════════════════════════════════════
   SISTEMA DE NOTIFICACIONES TOAST — PREMIUM
   ═══════════════════════════════════════════════════════════ */

#notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 48px);
}

.notification {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: all;
  cursor: pointer;
  overflow: hidden;
  /* Animación entrada */
  opacity: 0;
  transform: translateX(110%) scale(0.95);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.notification.removing {
  opacity: 0;
  transform: translateX(110%) scale(0.92);
  transition:
    opacity 0.28s ease-in,
    transform 0.28s ease-in;
}

/* ── Barra de progreso inferior ── */
.notification::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  border-radius: 0 0 14px 14px;
  animation: notification-progress linear forwards;
  animation-duration: var(--notif-duration, 5000ms);
  transform-origin: left;
}

@keyframes notification-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Icono ── */
.notification-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
  filter: drop-shadow(0 0 6px currentColor);
}

/* ── Contenido ── */
.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  font-family: 'JetBrains Mono', 'Inter', monospace;
}

.notification-message {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}

/* ── Botón cerrar ── */
.notification-close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  font-size: 1rem;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  transition: opacity 0.2s;
  color: inherit;
  margin-top: 1px;
}

.notification-close:hover {
  opacity: 1;
}

/* ══ TIPOS ════════════════════════════════════════════════ */

/* SUCCESS */
.notification.success {
  background: rgba(16, 42, 28, 0.92);
  border-color: rgba(63, 185, 80, 0.45);
  color: #e6f4eb;
}
.notification.success .notification-title { color: #3fb950; }
.notification.success .notification-icon { color: #3fb950; }
.notification.success::after { background: linear-gradient(to right, #3fb950, #29a044); }

/* ERROR */
.notification.error {
  background: rgba(42, 14, 14, 0.92);
  border-color: rgba(255, 77, 77, 0.45);
  color: #f4e6e6;
}
.notification.error .notification-title { color: #ff4d4d; }
.notification.error .notification-icon { color: #ff4d4d; }
.notification.error::after { background: linear-gradient(to right, #ff4d4d, #cc2200); }

/* WARNING */
.notification.warning {
  background: rgba(42, 34, 8, 0.92);
  border-color: rgba(240, 185, 11, 0.45);
  color: #f4f0d8;
}
.notification.warning .notification-title { color: #f0b90b; }
.notification.warning .notification-icon { color: #f0b90b; }
.notification.warning::after { background: linear-gradient(to right, #f0b90b, #c99700); }

/* INFO */
.notification.info {
  background: rgba(8, 24, 42, 0.92);
  border-color: rgba(56, 139, 253, 0.45);
  color: #ddeeff;
}
.notification.info .notification-title { color: #58a6ff; }
.notification.info .notification-icon { color: #58a6ff; }
.notification.info::after { background: linear-gradient(to right, #388bfd, #1a5ccc); }

/* ── Responsive ── */
@media (max-width: 480px) {
  #notification-container {
    top: 16px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   SKELETON SCREENS
   ═══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #1a3026 25%, #244133 50%, #1a3026 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   ALERTAS ESTÁTICAS (IN-PAGE)
   ═══════════════════════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 1.1rem;
}

.alert-error {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.2);
  color: #ff7675;
}
.alert-error::before { content: "\f06a"; }

.alert-success {
  background: rgba(40, 167, 69, 0.08);
  border-color: rgba(40, 167, 69, 0.2);
  color: #55efc4;
}
.alert-success::before { content: "\f058"; }

.alert-info {
  background: rgba(56, 139, 253, 0.08);
  border-color: rgba(56, 139, 253, 0.2);
  color: #74b9ff;
}
.alert-info::before { content: "\f05a"; }

.alert-warning {
  background: rgba(240, 185, 11, 0.08);
  border-color: rgba(240, 185, 11, 0.2);
  color: #ffeaa7;
}
.alert-warning::before { content: "\f071"; }