/**
 * @kaiss.tech V2 — Design System
 * Apple Developer HIG (VisionOS / Reality Composer Pro / Pass Designer / SF Symbols)
 * + Duolingo 3D Tactile Progression Nodes
 * + Authentic Google Display Network Ad Components
 */

/* ─── Google & Apple Web Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Roboto:wght@400;500;700&display=swap');

/* ═══════════════════════ DESIGN TOKENS ═══════════════════════ */
:root {
  /* Obsidian VisionOS Canvas */
  --bg-0: #04050d;
  --bg-1: #090a18;
  --bg-elevated: rgba(18, 20, 36, 0.7);

  /* Apple Glass Surfaces */
  --glass-surface: rgba(255, 255, 255, 0.04);
  --glass-surface-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.18);
  --glass-specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

  /* Typography */
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  /* Brand Accents */
  --core: #6366f1;
  --core-light: #818cf8;
  --core-glow: rgba(99, 102, 241, 0.25);
  --core-depth: #4338ca;

  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.2);

  --success: #10b981;
  --success-depth: #047857;
  --success-glow: rgba(16, 185, 129, 0.25);

  --warning: #f59e0b;
  --danger: #ef4444;

  /* Google Ad Tokens */
  --gad-bg: #ffffff;
  --gad-border: #dadce0;
  --gad-text: #202124;
  --gad-subtext: #5f6368;
  --gad-blue: #1a73e8;
  --gad-blue-hover: #174ea6;
  --gad-url: #188038;
  --gad-stars: #fbbc04;

  /* Geometry & Physics */
  --node-size: 76px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-glass: 0 20px 50px rgba(0, 0, 0, 0.6);

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ═══════════════════════ BASE RESETS ═══════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-0);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Cairo', 'Tajawal', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.en-mode {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Outfit', 'Inter', system-ui, sans-serif;
  direction: ltr;
}

/* ═══════════════════════ AMBIENT VISIONOS LIGHTING ═══════════════════════ */
.ambient-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden; width: 100vw; height: 100vh; max-width: 100%;
  contain: strict; clip-path: inset(0);
}
.ambient-bg__glow {
  position: absolute; border-radius: 50%; filter: blur(80px);
}
.ambient-bg__glow--1 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, var(--core-glow) 0%, transparent 70%);
  top: -240px; right: -120px;
}
.ambient-bg__glow--2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  bottom: 15%; left: -140px;
}
.ambient-bg__glow--3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  top: 45%; right: 10%;
}
.ambient-bg__dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ═══════════════════════ SHARED GLASS MATERIAL ═══════════════════════ */
.glass-card {
  background: var(--bg-elevated);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular), var(--shadow-card);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
}

/* ═══════════════════════ APPLE & DUOLINGO BUTTON COMPONENTS ═══════════════════════ */
.btn-apple-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--core) 0%, #4f46e5 100%);
  color: #ffffff; font-family: inherit; font-size: 0.95rem; font-weight: 700;
  padding: 12px 24px; border-radius: var(--radius-full); border: none;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 0 var(--core-depth), 0 8px 24px var(--core-glow);
  transition: all 0.15s var(--ease);
}
.btn-apple-primary:hover {
  background: linear-gradient(135deg, var(--core-light) 0%, var(--core) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--core-depth), 0 12px 28px var(--core-glow);
}
.btn-apple-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--core-depth), 0 4px 12px var(--core-glow);
}

.btn-apple-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255, 255, 255, 0.05); color: var(--text);
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  padding: 12px 22px; border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  cursor: pointer; text-decoration: none;
  transition: all 0.2s var(--ease);
}
.btn-apple-ghost:hover {
  background: rgba(255, 255, 255, 0.1); border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}
.btn-apple-ghost:active {
  transform: translateY(1px);
}

.btn-apple-small {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--core) 0%, #4f46e5 100%);
  color: #ffffff; font-family: inherit; font-size: 0.85rem; font-weight: 700;
  padding: 8px 16px; border-radius: var(--radius-full); border: none;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 var(--core-depth), 0 6px 16px var(--core-glow);
  transition: all 0.15s var(--ease);
}
.btn-apple-small:hover {
  background: linear-gradient(135deg, var(--core-light) 0%, var(--core) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--core-depth), 0 8px 20px var(--core-glow);
}
.btn-apple-small:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--core-depth), 0 2px 8px var(--core-glow);
}

.btn-apple-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
  color: var(--text-secondary); font-family: inherit; font-size: 0.88rem; font-weight: 700;
  padding: 8px 14px; border-radius: var(--radius-full);
  cursor: pointer; transition: all 0.2s ease; margin-bottom: 16px;
}
.btn-apple-back:hover {
  background: rgba(255, 255, 255, 0.1); color: #fff;
  border-color: var(--glass-border-hover);
}

.btn-apple-arrow {
  display: inline-block; font-size: 1.1rem; line-height: 1;
  transition: transform 0.2s var(--ease);
}
.btn-apple-primary:hover .btn-apple-arrow,
.btn-apple-small:hover .btn-apple-arrow {
  transform: translateX(-3px);
}
body.en-mode .btn-apple-primary:hover .btn-apple-arrow,
body.en-mode .btn-apple-small:hover .btn-apple-arrow {
  transform: translateX(3px);
}

/* ═══════════════════════ APP LAYOUT ═══════════════════════ */
.app-wrapper {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; min-height: 100vh;
  max-width: 100vw; overflow-x: hidden;
}

/* ─── Header ─── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(4, 5, 13, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
}
.app-header__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo a {
  color: var(--core-light); font-size: 1.25rem; font-weight: 900;
  text-decoration: none; display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.02em;
}
.logo a:hover { color: #fff; }
.logo__badge {
  background: linear-gradient(135deg, var(--core), #8b5cf6);
  color: white; padding: 2px 10px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
}

.header-nav {
  display: flex; gap: 4px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.nav-btn {
  border: none; background: none; color: var(--text-muted);
  padding: 7px 22px; border-radius: var(--radius-full);
  cursor: pointer; font-size: 0.9rem; font-weight: 700; font-family: inherit;
  transition: all 0.2s var(--ease);
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-btn.active {
  background: var(--core); color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.lang-switcher {
  display: flex; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); padding: 3px;
}
.lang-btn {
  border: none; background: none; color: var(--text-muted);
  padding: 6px 14px; border-radius: var(--radius-full);
  cursor: pointer; font-size: 0.85rem; font-weight: 700; font-family: inherit;
  transition: all 0.2s var(--ease);
}
.lang-btn.active {
  background: var(--core); color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ─── Main Content & Rail ─── */
.app-main {
  flex: 1; display: flex; max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 0 24px; min-width: 0;
}
.app-main__content {
  flex: 1; max-width: 740px; margin: 0 auto; width: 100%;
  padding: 36px 0 120px 0; min-width: 0;
}
.app-main__rail {
  width: 320px; flex-shrink: 0; padding: 36px 0 36px 28px;
  display: none;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
[dir="rtl"] .app-main__rail {
  padding: 36px 28px 36px 0;
}
@media (min-width: 1120px) {
  .app-main__rail { display: block; }
}

/* ═══════════════════════ APPLE BUTTONS ═══════════════════════ */
.btn-apple-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--core), #4f46e5);
  color: white; border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px rgba(99, 102, 241, 0.4);
  font-size: 0.95rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease);
}
.btn-apple-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 28px rgba(99, 102, 241, 0.55);
}
.btn-apple-primary:active {
  transform: translateY(1px);
}
.btn-apple-arrow { font-size: 1.1rem; transition: transform 0.2s var(--ease); }
.btn-apple-primary:hover .btn-apple-arrow { transform: translateX(3px); }
[dir="rtl"] .btn-apple-primary:hover .btn-apple-arrow { transform: translateX(-3px); }

.btn-apple-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-full);
  background: var(--glass-surface); color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: all 0.2s var(--ease);
}
.btn-apple-ghost:hover {
  background: var(--glass-surface-hover); color: #fff;
  border-color: var(--glass-border-hover);
}

.btn-apple-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-surface); border: 1px solid var(--glass-border);
  color: var(--text-secondary); padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 700; font-family: inherit;
  cursor: pointer; margin-bottom: 20px;
  transition: all 0.2s var(--ease);
}
.btn-apple-back:hover {
  color: #fff; background: var(--glass-surface-hover);
  border-color: var(--core);
}

/* ═══════════════════════ PATH HERO / CONTINUE SECTION ═══════════════════════ */
.path-hero {
  padding: 36px 32px; margin-bottom: 32px;
  text-align: center;
}
.path-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--core-light); font-size: 0.8rem; font-weight: 800;
  padding: 4px 14px; border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.path-hero__title {
  font-size: 2.2rem; font-weight: 900; line-height: 1.25; margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 65%, #94a3b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  white-space: pre-line; letter-spacing: -0.02em;
}
.path-hero__subtitle {
  color: var(--text-muted); font-size: 1rem; max-width: 580px; margin: 0 auto 24px;
}
.path-hero__actions {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}

/* Continue Hero Variant */
.path-hero__continue {
  display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.path-hero__progress-ring {
  position: relative; width: 84px; height: 84px; flex-shrink: 0;
}
.path-hero__ring-svg { transform: rotate(-90deg); width: 84px; height: 84px; }
.path-hero__ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 6; }
.path-hero__ring-fill {
  fill: none; stroke: var(--core); stroke-width: 6;
  stroke-linecap: round; transition: stroke-dashoffset 0.6s ease;
}
.path-hero__ring-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; color: #fff;
}
.path-hero__meta { text-align: start; }
[dir="rtl"] .path-hero__meta { text-align: start; }
.path-hero__label {
  display: flex; align-items: center; gap: 6px;
  color: var(--core-light); font-size: 0.85rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.path-hero__node-title {
  font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; color: #fff;
}

/* ═══════════════════════ WORLD HEADERS (PASS DESIGNER) ═══════════════════════ */
.world-header {
  padding: 22px 28px; margin: 44px 0 16px;
  display: flex; align-items: center; gap: 20px;
}
.world-header__icon-box {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.world-header__info { flex: 1; min-width: 160px; }
.world-header__top-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}
.world-header__step-label {
  font-size: 0.75rem; font-weight: 800; color: var(--core-light);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.world-header__count {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
}
.world-header__title {
  font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.world-header__bar {
  width: 100%; height: 7px; background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full); overflow: hidden;
}
.world-header__bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--core), var(--secondary));
  border-radius: var(--radius-full); transition: width 0.4s var(--ease);
}

/* ═══════════════════════ CHAPTER QUICK NAVIGATOR PILLS ═══════════════════════ */
.chapter-nav-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: -10px auto 28px auto;
  display: flex;
  align-items: center;
}

.chapter-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px 14px 12px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
}
.chapter-nav--dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
}
.chapter-nav::-webkit-scrollbar {
  height: 4px;
  display: block;
}
.chapter-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  margin: 0 36px;
}
.chapter-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 99px;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}
.chapter-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #818cf8, #22d3ee);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7);
}

.chapter-nav__arrow {
  position: absolute;
  top: calc(50% - 3px);
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(99, 102, 241, 0.35);
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.chapter-nav__arrow:hover {
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.65);
  transform: translateY(-50%) scale(1.08);
}
.chapter-nav__arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.chapter-nav__arrow--left {
  left: -8px;
}
.chapter-nav__arrow--right {
  right: -8px;
}
.chapter-nav__arrow[disabled],
.chapter-nav__arrow--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}
@media (max-width: 640px) {
  .chapter-nav__arrow {
    display: none;
  }
}

.chapter-nav__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
  user-select: none;
}
.chapter-nav__pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}
.chapter-nav__pill--active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.25) 100%);
  border-color: rgba(99, 102, 241, 0.6);
  color: #fff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}
.chapter-nav__pill-icon {
  font-size: 1rem;
}
.chapter-nav__pill-count {
  background: rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.2s var(--ease);
}
.chapter-nav__pill--active .chapter-nav__pill-count {
  background: #ffffff;
  color: #4338ca;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

/* ═══════════════════════ SUB-STATION CARDS (MULTI-COURSE CHAPTERS) ═══════════════════════ */
.path-substation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 320px;
  max-width: calc(100% - 16px);
  margin: 36px auto 18px auto;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.path-substation__main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.path-substation__icon {
  font-size: 1.15rem;
}
.path-substation__title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}
.path-substation__count {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ═══════════════════════ DUOLINGO 3D PROGRESSION NODES ═══════════════════════ */
.path-section {
  position: relative; width: 320px; max-width: 100%; margin: 0 auto;
}

.path-connector-svg {
  position: absolute; top: 0; left: 0; width: 100%;
  pointer-events: none; z-index: 1;
}
.path-line {
  fill: none; stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 4; stroke-linecap: round; stroke-dasharray: 6 6;
}
.path-line--active {
  stroke: var(--core); stroke-width: 5; stroke-dasharray: none;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
}

/* ─── 3D Button Physics ─── */
.path-node {
  position: absolute; width: var(--node-size); height: var(--node-size);
  border: none; background: none; cursor: pointer; padding: 0;
  z-index: 5; display: flex; flex-direction: column; align-items: center;
  transition: transform 0.15s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.path-node:focus-visible { outline: none; }

.path-node__disc {
  width: var(--node-size); height: var(--node-size);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all 0.15s var(--spring);
}

/* Top disc layer & Number Illumination */
.path-node__top {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; font-weight: 900;
  transition: all 0.2s var(--spring);
}
.path-node__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s var(--spring);
}

/* ── State 1: Not Started (Illuminated 3D Tactile Disc) ── */
.path-node--not_started .path-node__disc {
  background: radial-gradient(circle at 50% 25%, #252b47 0%, #151829 65%, #0d0f1b 100%);
  box-shadow: 0 6px 0 #080a13, 0 8px 18px rgba(0, 0, 0, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}
.path-node--not_started .path-node__top,
.path-node--not_started .path-node__num {
  color: #f1f5f9;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.9);
}
.path-node--not_started:hover .path-node__disc {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #080a13, 0 0 22px rgba(99, 102, 241, 0.45), inset 0 1px 3px rgba(255, 255, 255, 0.4);
  border-color: rgba(99, 102, 241, 0.6);
}
.path-node--not_started:hover .path-node__top,
.path-node--not_started:hover .path-node__num {
  color: #ffffff;
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.95), 0 0 24px rgba(6, 182, 212, 0.7);
}
.path-node--not_started:active .path-node__disc {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #080a13;
}

/* ── State 2: In Progress (Vibrant Cyber Blue Glow) ── */
.path-node--in_progress .path-node__disc {
  background: radial-gradient(circle at 50% 25%, #818cf8 0%, #6366f1 65%, #4338ca 100%);
  box-shadow: 0 6px 0 #282566, 0 8px 24px rgba(99, 102, 241, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.path-node--in_progress .path-node__top,
.path-node--in_progress .path-node__num {
  color: #ffffff !important;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(255, 255, 255, 1), 0 0 28px rgba(99, 102, 241, 0.9);
}
.path-node--in_progress:hover .path-node__disc {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #282566, 0 12px 32px rgba(99, 102, 241, 0.65);
}
.path-node--in_progress:active .path-node__disc {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #282566;
}

/* ── State 3: Completed (Emerald Energy Check) ── */
.path-node--completed .path-node__disc {
  background: radial-gradient(circle at 50% 25%, #34d399 0%, #10b981 65%, #047857 100%);
  box-shadow: 0 6px 0 #064e3b, 0 8px 24px rgba(16, 185, 129, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}
.path-node--completed .path-node__top,
.path-node--completed .path-node__check-svg {
  color: #ffffff !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 16px rgba(16, 185, 129, 0.8));
}
.path-node--completed:hover .path-node__disc {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #064e3b, 0 12px 32px rgba(16, 185, 129, 0.65);
}
.path-node--completed:active .path-node__disc {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #064e3b;
}

/* ── State 4: Current/Active (Blazing Illuminated Hero Node) ── */
.path-node--current .path-node__disc {
  background: radial-gradient(circle at 50% 25%, #a855f7 0%, #7c3aed 50%, #4f46e5 100%) !important;
  box-shadow: 0 6px 0 #3b0764, 0 0 0 4px rgba(168, 85, 247, 0.4), 0 0 32px rgba(147, 51, 234, 0.7), 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  animation: radarGlow 2.2s ease-in-out infinite;
}
.path-node--current .path-node__top,
.path-node--current .path-node__num {
  color: #ffffff !important;
  font-weight: 900;
  text-shadow: 0 0 16px #ffffff, 0 0 32px rgba(216, 180, 254, 1), 0 0 48px rgba(147, 51, 234, 0.85) !important;
  letter-spacing: -0.02em;
}
.path-node--current:hover .path-node__disc {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #3b0764, 0 0 0 6px rgba(168, 85, 247, 0.5), 0 0 40px rgba(147, 51, 234, 0.85) !important;
}
.path-node--current:active .path-node__disc {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #3b0764;
}

@keyframes radarGlow {
  0%, 100% {
    box-shadow: 0 6px 0 #3b0764, 0 0 0 4px rgba(168, 85, 247, 0.35), 0 0 28px rgba(147, 51, 234, 0.6), 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 6px 0 #3b0764, 0 0 0 9px rgba(168, 85, 247, 0.15), 0 0 45px rgba(168, 85, 247, 0.85), 0 8px 32px rgba(0, 0, 0, 0.75), inset 0 1px 3px rgba(255, 255, 255, 0.7);
  }
}

.path-node__pill {
  position: absolute; bottom: -12px;
  background: #ffffff; color: #04050d;
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.05em;
  padding: 3px 12px; border-radius: var(--radius-full);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6), 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════ SPECIALIZATION STATIONS (VISIONOS CARD) ═══════════════════════ */
.specialization-station {
  padding: 28px; margin: 36px 0;
}
.specialization-station__header { margin-bottom: 20px; }
.specialization-station__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--secondary); font-size: 0.75rem; font-weight: 800;
  padding: 3px 12px; border-radius: var(--radius-full); margin-bottom: 10px;
}
.specialization-station__title {
  font-size: 1.35rem; font-weight: 800; color: #fff; margin-bottom: 6px;
}
.specialization-station__desc {
  color: var(--text-muted); font-size: 0.92rem; line-height: 1.5;
}

.specialization-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.spec-tile {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; font-family: inherit; color: var(--text);
  text-align: start; width: 100%;
  transition: all 0.2s var(--ease);
}
[dir="rtl"] .spec-tile { text-align: start; }
.spec-tile:hover {
  background: rgba(255, 255, 255, 0.07); border-color: var(--core-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.spec-tile__icon-box {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.spec-tile__info { flex: 1; min-width: 0; }
.spec-tile__title {
  font-size: 0.92rem; font-weight: 800; margin-bottom: 3px;
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.spec-tile__count { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.spec-tile__arrow { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }

.spec-tile--featured {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.ad-slot { margin: 32px 0; max-width: 100%; }
.ad-slot--sheet { margin: 14px 0 0 0; }
.ad-slot--track-mid { margin: 12px 0; width: 100%; }
.ad-slot--explore-mid { margin: 32px 0; }
.ad-slot--explore-bottom { margin: 32px 0; }
.rail-ad-slot--banner { margin-top: 18px; }

/* ── Thin Google Image Banner ── */
.google-thin-banner {
  background: var(--gad-bg);
  border: 1px solid var(--gad-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60,64,67,0.18), 0 1px 2px rgba(60,64,67,0.12);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: start;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
[dir="rtl"] .google-thin-banner { text-align: start; }
.google-thin-banner:hover {
  box-shadow: 0 4px 14px rgba(60,64,67,0.28);
  transform: translateY(-1px);
}

.google-thin-banner__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 12px; border-bottom: 1px solid #e8eaed;
  background: #f8f9fa; font-size: 11px;
  gap: 8px; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Google Sans', 'Roboto', Arial, sans-serif;
  color: var(--gad-text);
}

.google-thin-banner__badge-group {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; overflow: hidden;
}
.google-thin-banner__badge {
  background: #fff; border: 1px solid #5f6368;
  color: #202124; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px; line-height: 1.2; flex-shrink: 0;
}
.google-thin-banner__url {
  color: var(--gad-url); font-weight: 500; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.google-thin-banner__tagline {
  color: var(--gad-subtext); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.google-thin-banner__controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.google-thin-banner__adchoices {
  display: flex; align-items: center; gap: 4px; color: var(--gad-subtext);
  cursor: pointer; white-space: nowrap;
}
.google-thin-banner__adchoices-text { font-size: 10px; }
.google-thin-banner__close-btn {
  background: none; border: none; color: #5f6368;
  cursor: pointer; font-size: 14px; padding: 6px 8px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; min-width: 28px; min-height: 28px;
  -webkit-tap-highlight-color: transparent;
}
.google-thin-banner__close-btn:hover,
.google-thin-banner__close-btn:active {
  background: rgba(0, 0, 0, 0.08); color: #202124;
}

.google-thin-banner__link {
  display: block;
  width: 100%;
  line-height: 0;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  background: #020b18;
}

.google-thin-banner__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.google-thin-banner__link:hover .google-thin-banner__img {
  filter: brightness(1.06);
}

@media (max-width: 640px) {
  .google-thin-banner__tagline { display: none; }
  .google-thin-banner__adchoices-text { display: none; }
  .google-thin-banner__header { padding: 4px 8px; }
}

.rail-ad-slot .google-thin-banner__tagline,
.rail-ad-slot .google-thin-banner__adchoices-text,
.rail-ad-slot--banner .google-thin-banner__tagline,
.rail-ad-slot--banner .google-thin-banner__adchoices-text,
.ad-slot--sheet .google-thin-banner__tagline,
.ad-slot--sheet .google-thin-banner__adchoices-text,
.google-thin-banner--path_rail_banner .google-thin-banner__tagline,
.google-thin-banner--path_rail_banner .google-thin-banner__adchoices-text,
.google-thin-banner--sheet .google-thin-banner__tagline,
.google-thin-banner--sheet .google-thin-banner__adchoices-text {
  display: none !important;
}

.google-ad {
  background: var(--gad-bg);
  border: 1px solid var(--gad-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60,64,67,0.18), 0 1px 2px rgba(60,64,67,0.12);
  color: var(--gad-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Google Sans', 'Roboto', Arial, sans-serif;
  text-align: start;
  width: 100%; max-width: 100%; box-sizing: border-box;
}
[dir="rtl"] .google-ad { text-align: start; }

/* ── Google Ad Header Bar ── */
.google-ad__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; border-bottom: 1px solid #f1f3f4;
  background: #f8f9fa; font-size: 11px;
  gap: 8px; overflow: hidden;
}
.google-ad__badge-group {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 1; overflow: hidden;
}
.google-ad__badge {
  background: #fff; border: 1px solid #5f6368;
  color: #202124; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 3px; line-height: 1.2; flex-shrink: 0;
}
.google-ad__url {
  color: var(--gad-url); font-weight: 500; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.google-ad__rating-inline {
  color: #d97706; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.google-ad__controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.google-ad__adchoices {
  display: flex; align-items: center; gap: 4px; color: var(--gad-subtext);
  cursor: pointer; white-space: nowrap;
}
.google-ad__adchoices-text { font-size: 10px; }
.google-ad__close-btn {
  background: none; border: none; color: #5f6368;
  cursor: pointer; font-size: 13px; padding: 2px 4px; line-height: 1;
}
.google-ad__close-btn:hover { color: #202124; }

/* ── Google Blue CTA Button ── */
.google-ad__btn-blue {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--gad-blue);
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Google Sans', 'Roboto', Arial, sans-serif;
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 8px 20px; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(60,64,67,0.3);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.google-ad__btn-blue:hover {
  background-color: var(--gad-blue-hover);
  box-shadow: 0 2px 6px rgba(60,64,67,0.35);
}

/* ── In-Feed Banner Layout (Between Worlds) ── */
.google-ad--between_worlds,
.google-ad--track_inline,
.google-ad--career_context {
  width: 100%;
}
.google-ad__banner-content {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
}
.google-ad__banner-visual {
  width: 64px; height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f1f3f4; border-radius: 8px; overflow: hidden;
}
.google-ad__banner-bot {
  width: 52px; height: auto; object-fit: contain;
}
.google-ad__banner-text { flex: 1; min-width: 0; }
.google-ad__banner-headline {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; line-height: 1.35;
}
.google-ad__banner-headline a {
  color: #1a0dab; text-decoration: none;
}
.google-ad__banner-headline a:hover {
  text-decoration: underline;
}
.google-ad__banner-desc {
  color: var(--gad-subtext); font-size: 0.85rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.google-ad__banner-action { flex-shrink: 0; }

@media (max-width: 640px) {
  .google-ad__banner-content {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .google-ad__banner-action { width: 100%; }
  .google-ad__btn-blue { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .google-ad__header { padding: 5px 8px; }
  .google-ad__adchoices-text { display: none; }
  .google-ad__rating-inline { display: none; }
  .google-ad__banner-content { padding: 14px 14px; gap: 10px; }
}

/* ── Right Rail Google Display Card (300px) ── */
.google-ad--path_right_rail {
  width: 100%; border-radius: 8px;
}
.google-ad__rail-body {
  padding: 20px; text-align: center;
}
.google-ad__mascot-wrapper {
  width: 100px; height: 100px; margin: 0 auto 12px;
  background: #f8f9fa; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.google-ad__mascot-img {
  width: 80px; height: auto; object-fit: contain;
}
.google-ad__rating {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.8rem; margin-bottom: 8px;
}
.google-ad__stars { color: var(--gad-stars); letter-spacing: 2px; }
.google-ad__rating-num { font-weight: 700; color: #202124; }
.google-ad__tagline { color: var(--gad-subtext); font-size: 0.75rem; }
.google-ad__rail-headline {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.35;
}
.google-ad__rail-headline a { color: #1a0dab; text-decoration: none; }
.google-ad__rail-headline a:hover { text-decoration: underline; }
.google-ad__rail-desc {
  color: var(--gad-subtext); font-size: 0.82rem; line-height: 1.5; margin-bottom: 16px;
}
.google-ad__rail-body .google-ad__btn-blue {
  width: 100%;
}

/* ═══════════════════════ EXPLORE VIEW ═══════════════════════ */
.explore-header {
  padding: 32px; text-align: center; margin-bottom: 32px;
}
.explore-header__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--core-light); font-size: 0.8rem; font-weight: 800;
  padding: 4px 14px; border-radius: var(--radius-full); margin-bottom: 12px;
}
.explore-header__title {
  font-size: 2rem; font-weight: 900; color: #fff; margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.explore-header__subtitle { color: var(--text-muted); font-size: 0.95rem; }

.explore-group { margin-bottom: 36px; }
.explore-group__header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.explore-group__icon-box {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--glass-surface); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.explore-group__title { font-size: 1.25rem; font-weight: 800; color: #fff; }

.explore-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.track-card {
  padding: 20px; cursor: pointer; text-align: start; font-family: inherit;
  display: flex; flex-direction: column; gap: 12px; color: var(--text);
  border-radius: var(--radius-lg);
}
[dir="rtl"] .track-card { text-align: start; }
.track-card:hover {
  transform: translateY(-3px);
  border-color: var(--core-light);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}
.track-card__top {
  display: flex; justify-content: space-between; align-items: center;
}
.track-card__icon { font-size: 1.8rem; }
.track-card__count {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05); padding: 2px 10px; border-radius: var(--radius-full);
}
.track-card__title { font-size: 1.1rem; font-weight: 800; color: #fff; }
.track-card__progress { display: flex; align-items: center; gap: 10px; }
.track-card__bar {
  flex: 1; height: 6px; background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full); overflow: hidden;
}
.track-card__bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--core), var(--secondary));
  border-radius: var(--radius-full); transition: width 0.3s ease;
}
.track-card__percent { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.track-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.track-card__cta { color: var(--core-light); font-size: 0.85rem; font-weight: 800; }
.track-card__arrow { color: var(--core-light); transition: transform 0.2s var(--ease); }
.track-card:hover .track-card__arrow { transform: translateX(3px); }
[dir="rtl"] .track-card:hover .track-card__arrow { transform: translateX(-3px); }

/* ═══════════════════════ TRACK VIEW HEADER ═══════════════════════ */
.track-header {
  padding: 28px; margin-bottom: 28px;
}
.track-header__title-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.track-header__icon-box {
  width: 60px; height: 60px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.track-header__badge {
  font-size: 0.72rem; font-weight: 800; color: var(--secondary);
  letter-spacing: 0.08em; display: block; margin-bottom: 2px;
}
.track-header__title { font-size: 1.8rem; font-weight: 900; color: #fff; }
.track-header__progress { display: flex; align-items: center; gap: 14px; }
.track-header__bar {
  flex: 1; height: 8px; background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full); overflow: hidden;
}
.track-header__bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--core), var(--secondary));
  border-radius: var(--radius-full); transition: width 0.4s ease;
}
.track-header__count {
  color: var(--text-muted); font-size: 0.85rem; font-weight: 700; white-space: nowrap;
}

.knowledge-note {
  padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; border-color: rgba(99, 102, 241, 0.25);
}
.knowledge-note__icon { color: var(--core-light); flex-shrink: 0; }
.knowledge-note__text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ── Track Curriculum Directory (Apple Pass Style) ── */
.track-directory {
  margin-top: 36px; margin-bottom: 24px;
}
.track-directory__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding: 0 4px;
}
.track-directory__title {
  font-size: 1.25rem; font-weight: 800; color: #fff;
}
.track-directory__count {
  font-size: 0.82rem; font-weight: 700; color: var(--text-muted);
}
.track-directory__list {
  display: flex; flex-direction: column; gap: 12px;
}
.track-lesson-card {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; border-radius: var(--radius-md); transition: all 0.2s var(--ease);
  cursor: pointer;
}
.track-lesson-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.track-lesson-card--completed {
  border-color: rgba(16, 185, 129, 0.3);
}
.track-lesson-card__body {
  flex: 1; min-width: 0;
}
.track-lesson-card__meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.track-lesson-card__part {
  font-size: 0.72rem; font-weight: 800; color: var(--secondary);
  background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 2px 8px; border-radius: var(--radius-full);
}
.track-lesson-card__status {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-full);
}
.track-lesson-card__status--not_started {
  background: rgba(255, 255, 255, 0.06); color: var(--text-muted);
}
.track-lesson-card__status--in_progress {
  background: rgba(99, 102, 241, 0.2); color: var(--core-light);
}
.track-lesson-card__status--completed {
  background: var(--success-glow); color: var(--success);
}
.track-lesson-card__title {
  font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.35;
}
.track-lesson-card__actions {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.track-lesson-card__open-btn {
  padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.track-lesson-card__toggle {
  display: flex; align-items: center; gap: 6px; font-size: 0.78rem;
  font-weight: 600; color: var(--text-secondary); cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
  padding: 6px 12px; border-radius: var(--radius-full);
  transition: all 0.2s ease;
}
.track-lesson-card__toggle:hover {
  background: rgba(255, 255, 255, 0.08); color: #fff;
}
.track-check-input {
  accent-color: var(--success); cursor: pointer; width: 15px; height: 15px;
}
@media (max-width: 640px) {
  .track-lesson-card {
    flex-direction: column; align-items: flex-start; gap: 14px;
  }
  .track-lesson-card__actions {
    width: 100%; justify-content: space-between;
  }
}

/* ═══════════════════════ NODE DETAIL SHEET (APPLE VISIONOS SHEET) ═══════════════════════ */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.sheet-overlay.overlay--visible { opacity: 1; pointer-events: auto; }

.node-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 151;
  background: rgba(14, 16, 32, 0.94);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 16px 20px 44px; max-height: 80vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  box-sizing: border-box; width: 100%; max-width: 100vw;
}
.node-sheet.sheet--open { transform: translateY(0); }

@media (min-width: 768px) {
  .node-sheet {
    left: auto; right: 28px; bottom: 28px; top: auto;
    width: 420px; border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    max-height: 85vh;
  }
  [dir="rtl"] .node-sheet { right: auto; left: 28px; }
}

.sheet__handle {
  width: 40px; height: 5px; background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full); margin: 0 auto 16px;
}
@media (min-width: 768px) { .sheet__handle { display: none; } }

.sheet__close-btn {
  position: absolute; top: 16px; right: 18px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border);
  color: var(--text-muted); width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all 0.2s ease;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
[dir="rtl"] .sheet__close-btn { right: auto; left: 18px; }
.sheet__close-btn:hover,
.sheet__close-btn:active { background: rgba(255,255,255,0.18); color: #fff; }

.sheet__content { display: flex; flex-direction: column; gap: 16px; }

.sheet__status {
  display: inline-block; padding: 4px 14px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; align-self: flex-start;
}
.sheet__status--not_started { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
.sheet__status--in_progress { background: rgba(99, 102, 241, 0.2); color: var(--core-light); }
.sheet__status--completed { background: var(--success-glow); color: var(--success); }

.sheet__title { font-size: 1.45rem; font-weight: 800; color: #fff; line-height: 1.3; }
.sheet__track { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

.sheet__rec {
  background: var(--glass-surface); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 0.85rem; border: 1px solid var(--glass-border);
}
.sheet__rec-label { color: var(--text-muted); font-weight: 700; }
.sheet__rec-list { color: var(--text-secondary); }

.sheet__branches {
  background: rgba(6, 182, 212, 0.06); border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.sheet__branches-label {
  display: block; font-size: 0.8rem; font-weight: 800; color: var(--secondary);
  margin-bottom: 8px;
}
.sheet__branches-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet__branch-chip {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-border);
  color: var(--text); padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all 0.15s ease;
}
.sheet__branch-chip:hover {
  background: var(--core); border-color: var(--core); color: #fff;
}

.sheet__knowledge {
  background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: 0.85rem; color: var(--text-secondary);
}

.sheet__actions { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.sheet__open-btn { width: 100%; text-align: center; }

.sheet__toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 0; user-select: none;
}
.sheet__checkbox {
  width: 22px; height: 22px; accent-color: var(--success); cursor: pointer;
}
.sheet__toggle-label { font-size: 0.95rem; font-weight: 700; color: var(--text-secondary); }

/* ═══════════════════════ FLOATING JUMP BUTTON ═══════════════════════ */
.jump-to-current {
  position: fixed; bottom: 32px; right: 28px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20, 22, 42, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: #fff; border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), var(--shadow-card);
  padding: 10px 20px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: all 0.2s var(--ease);
}
[dir="rtl"] .jump-to-current { right: auto; left: 28px; }
.jump-to-current:hover {
  transform: translateY(-2px); border-color: var(--core-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 28px rgba(99, 102, 241, 0.35);
}

@media (max-width: 768px) {
  .jump-to-current {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    right: 16px; padding: 8px 14px; font-size: 0.78rem;
  }
  [dir="rtl"] .jump-to-current { right: auto; left: 16px; }
}

/* ═══════════════════════ MOBILE BOTTOM NAVIGATION ═══════════════════════ */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(4, 5, 13, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--glass-border);
  padding: 6px 16px calc(env(safe-area-inset-bottom, 0px) + 6px) 16px;
}
.mobile-nav__inner {
  display: flex; justify-content: space-around; max-width: 480px; margin: 0 auto;
}
.mobile-nav .nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.72rem; padding: 6px 20px;
}
.mobile-nav .nav-btn__icon { stroke-width: 2.2; }

@media (max-width: 768px) {
  .mobile-nav { display: block; }
  .header-nav { display: none; }
  .app-header { padding: 0 16px; }
  .app-header__inner { height: 56px; }
  .app-main { padding: 0 16px; }
  .app-main__content { padding: 24px 0 140px 0; }
  .logo a { font-size: 1.15rem; }
  .lang-btn { padding: 5px 11px; font-size: 0.8rem; }
}

/* ═══════════════════════ FOOTER ═══════════════════════ */
.app-footer {
  border-top: 1px solid var(--glass-border);
  padding: 28px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.85rem;
}
.app-footer a { color: var(--core-light); text-decoration: none; font-weight: 700; }
.app-footer a:hover { color: #fff; }

/* ═══════════════════════ RESPONSIVE BREAKPOINTS ═══════════════════════ */
@media (max-width: 640px) {
  .app-header { padding: 0 14px; }
  .app-main { padding: 0 14px; }
  .world-header { padding: 18px 16px; }
  .path-hero { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .app-header { padding: 0 12px; }
  .app-main { padding: 0 12px; }
  .world-header { padding: 16px 14px; gap: 12px; }
  .world-header__icon-box { width: 44px; height: 44px; font-size: 1.4rem; }
  .world-header__title { font-size: 1.1rem; }
  .path-hero { padding: 22px 14px; }
  .path-hero__title { font-size: 1.55rem; }
  .path-hero__subtitle { font-size: 0.9rem; }
  .specialization-station { padding: 18px 14px; }
  .specialization-grid { grid-template-columns: 1fr; }
  .explore-grid { grid-template-columns: 1fr; }
  .track-header { padding: 20px 14px; }
  .track-header__title { font-size: 1.35rem; }
  .track-header__icon-box { width: 48px; height: 48px; font-size: 1.6rem; }
}

@media (max-width: 360px) {
  .app-header { padding: 0 8px; }
  .app-main { padding: 0 8px; }
  .path-section {
    transform: scale(0.92);
    transform-origin: top center;
    margin-bottom: -30px;
  }
}

/* ═══════════════════════ ACCESSIBILITY ═══════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible {
  outline: 3px solid var(--core-light);
  outline-offset: 2px;
}
