.bg-navy { background-color: #0A2540; }
.bg-navy-hover { background-color: #001229; }
.bg-navy-slate { background-color: #1C3B5E; }
.bg-navy-light { background-color: #1f4e79; }
.bg-navy-dark { background-color: #0F172A; }
.bg-navy-darker { background-color: #020617; }
.bg-gold { background-color: #D4AF37; }
.bg-gold-hover { background-color: #b08d23; }
.bg-gold-light { background-color: #F9F5E8; }
.bg-gold-darkbg { background-color: #2A2518; }
.text-navy { color: #0A2540; }
.text-gold { color: #D4AF37; }
.border-navy { border-color: #0A2540; }
.border-gold { border-color: #D4AF37; }
.hover\:bg-navy:hover { background-color: #0A2540; }
.hover\:bg-navy-hover:hover { background-color: #001229; }
.hover\:bg-gold:hover { background-color: #D4AF37; }
.hover\:bg-gold-hover:hover { background-color: #b08d23; }
.hover\:text-navy:hover { color: #0A2540; }
.hover\:text-gold:hover { color: #D4AF37; }
.hover\:border-gold:hover { border-color: #D4AF37; }
.toast-container { position: fixed; right: 1rem; bottom: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .75rem; }
.toast { display: flex; align-items: center; gap: .75rem; max-width: min(360px, calc(100vw - 2rem)); padding: .85rem 1rem; border-radius: 8px; color: white; background: #0A2540; box-shadow: 0 16px 42px rgba(15, 23, 42, .2); opacity: 0; transform: translateY(8px); transition: .2s ease; }
.toast.active { opacity: 1; transform: translateY(0); }
.toast-success { background: #16785c; }
.toast-warning { background: #b7791f; }
.toast-error { background: #b42318; }
.toast-info { background: #1C3B5E; }
.btn-loading { opacity: .72; pointer-events: none; }
.dark .dark\:bg-navy-dark { background-color: #0F172A; }
.dark .dark\:bg-navy-slate { background-color: #1C3B5E; }
.dark .dark\:bg-gold { background-color: #D4AF37; }
.dark .dark\:bg-gold-darkbg { background-color: #2A2518; }
.dark .dark\:text-gold { color: #D4AF37; }
.dark .dark\:text-navy { color: #0A2540; }
.dark .dark\:border-gold { border-color: #D4AF37; }
  .hero-animated-gradient,
  .ru-animated-surface,
  .ru-course-cover {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
      radial-gradient(circle at 14% 16%, rgba(255, 222, 128, 0.34) 0%, transparent 31%),
      radial-gradient(circle at 88% 18%, rgba(76, 156, 255, 0.24) 0%, transparent 30%),
      radial-gradient(circle at 72% 86%, rgba(212, 175, 55, 0.2) 0%, transparent 34%),
      linear-gradient(125deg, #06172f 0%, #082c59 34%, #0e5f9f 58%, #a87d18 80%, #f1ca5f 100%) !important;
    background-size: cover !important;
    animation: none !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
  }

  .hero-animated-gradient::before,
  .hero-animated-gradient::after,
  .ru-animated-surface::before,
  .ru-animated-surface::after,
  .ru-course-cover::before,
  .ru-course-cover::after {
    content: "";
    position: absolute;
    border-radius: 9999px;
    filter: blur(56px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.62;
    mix-blend-mode: screen;
    animation: none !important;
    transform: none !important;
  }

  .hero-animated-gradient::before,
  .ru-animated-surface::before {
    width: min(34rem, 58vw);
    height: min(34rem, 58vw);
    top: -12rem;
    right: -8rem;
    background: rgba(255, 211, 91, 0.3);
  }

  .hero-animated-gradient::after,
  .ru-animated-surface::after {
    width: min(30rem, 55vw);
    height: min(30rem, 55vw);
    bottom: -12rem;
    left: -8rem;
    background: rgba(52, 133, 255, 0.24);
  }

  .ru-course-cover::before {
    width: 11rem;
    height: 11rem;
    top: -4rem;
    right: -3rem;
    background: rgba(255, 212, 96, 0.26);
  }

  .ru-course-cover::after {
    width: 9rem;
    height: 9rem;
    bottom: -4rem;
    left: -3rem;
    background: rgba(75, 145, 255, 0.18);
  }

  .hero-animated-gradient > *,
  .ru-animated-surface > *,
  .ru-course-cover > * {
    position: relative;
    z-index: 1;
  }

  .hero-shine {
    display: none !important;
    animation: none !important;
  }
}

/* =================================================================
   PWA Components
   ================================================================= */

/* ── Offline Status Bar ──────────────────────────────────────── */
.pwa-offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #b42318, #991b1b);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pwa-offline-bar.active {
  transform: translateY(0);
}

.pwa-offline-bar svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Push navbar down when offline bar is visible */
.pwa-offline-bar.active ~ #navbar,
.pwa-offline-bar.active + header {
  top: 32px;
}

/* ── SW Update Toast ─────────────────────────────────────────── */
.pwa-update-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1.25rem;
  background: #0A2540;
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.pwa-update-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pwa-update-toast__content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  font-size: 0.82rem;
  font-weight: 500;
}

.pwa-update-toast__icon {
  flex-shrink: 0;
  color: #D4AF37;
}

.pwa-update-toast__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-update-toast__btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.pwa-update-toast__btn--refresh {
  background: #D4AF37;
  color: #0A2540;
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
}

.pwa-update-toast__btn--refresh:hover {
  background: #b08d23;
}

.pwa-update-toast__btn--dismiss {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
}

.pwa-update-toast__btn--dismiss:hover {
  color: #fff;
}

/* ── iOS Install Guide ───────────────────────────────────────── */
.pwa-ios-guide {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10001;
  max-width: min(360px, calc(100vw - 2rem));
  width: 100%;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.pwa-ios-guide.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pwa-ios-guide__content {
  position: relative;
  background: #fff;
  color: #0F172A;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.pwa-ios-guide__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #F1F5F9;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: all 0.15s;
}

.pwa-ios-guide__close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.pwa-ios-guide__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.pwa-ios-guide__header svg {
  color: #D4AF37;
  flex-shrink: 0;
}

.pwa-ios-guide__header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0A2540;
  margin: 0;
}

.pwa-ios-guide__content p {
  font-size: 0.82rem;
  color: #64748B;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.pwa-ios-guide__content ol {
  list-style: none;
  counter-reset: ios-steps;
  padding: 0;
  margin: 0;
}

.pwa-ios-guide__content ol li {
  counter-increment: ios-steps;
  position: relative;
  padding-left: 2rem;
  padding-bottom: 0.6rem;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.6;
}

.pwa-ios-guide__content ol li::before {
  content: counter(ios-steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.4rem;
  height: 1.4rem;
  background: #0A2540;
  color: #D4AF37;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-ios-guide__content ol li:last-child {
  padding-bottom: 0;
}

.pwa-ios-guide__arrow {
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  margin: -8px auto 0;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.05);
}

/* ── Install Button Animation ────────────────────────────────── */
.pwa-install-visible {
  animation: pwaInstallPulse 2s ease-in-out 1;
}

@keyframes pwaInstallPulse {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.08); }
  30% { transform: scale(1); }
  45% { transform: scale(1.05); }
  60% { transform: scale(1); }
}

/* ── Dark mode overrides ─────────────────────────────────────── */
.dark .pwa-ios-guide__content {
  background: #1C3B5E;
  color: #F8FAFC;
}

.dark .pwa-ios-guide__close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.dark .pwa-ios-guide__close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.dark .pwa-ios-guide__header h3 {
  color: #F8FAFC;
}

.dark .pwa-ios-guide__content p {
  color: rgba(255, 255, 255, 0.55);
}

.dark .pwa-ios-guide__content ol li {
  color: rgba(255, 255, 255, 0.75);
}

.dark .pwa-ios-guide__arrow {
  background: #1C3B5E;
}
