:root {
  --page-bg: #f5f6fb;
  --panel: #ffffff;
  --panel-soft: #f2f3f8;
  --panel-soft-2: #efeefa;
  --text: #191d2d;
  --muted: #5c6177;
  --line: rgba(22, 28, 45, 0.08);
  --purple: #6f4ef6;
  --purple-deep: #563ee9;
  --purple-soft: #f0ebff;
  --navy: #091a2f;
  --navy-2: #131b39;
  --shadow: rgba(18, 24, 41, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

a { text-decoration: none; color: inherit; }

button,
input,
select,
textarea {
  font: inherit;
}

.hidden { display: none !important; }

.gate-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #040d1c 0%, #0d1830 54%, #1b1640 100%);
  padding: 24px;
}

.gate-card {
  width: min(1100px, 100%);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 34px 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  box-shadow: 0 30px 80px rgba(5, 8, 18, 0.42);
}

.brand-mini {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #6f4ef6 0%, #8b63ff 100%);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(111, 78, 246, 0.38);
}

.brand-name,
.brand-sub {
  display: block;
  line-height: 1;
}

.brand-name {
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-sub {
  color: rgba(255,255,255,0.72);
  font-weight: 500;
  font-size: 0.75rem;
}

.kicker {
  display: inline-block;
  padding: 7px 12px;
  background: rgba(161, 177, 255, 0.08);
  border: 1px solid rgba(161, 177, 255, 0.18);
  border-radius: 999px;
  color: #d9e4ff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

.gate-copy h2 {
  color: white;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 18px 0 14px;
}

.gate-copy p {
  color: rgba(255,255,255,0.72);
  max-width: 58ch;
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

.gate-panel {
  background: rgba(12, 18, 28, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-form label {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.access-form input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 14px 16px;
  color: white;
  font-size: 1rem;
  outline: none;
}

.access-form input:focus {
  border-color: rgba(135, 155, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(119, 122, 255, 0.16);
}

.access-form button,
.primary-btn,
.secondary-btn,
.login-button,
.ghost-button,
.icon-button,
.mini-link {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.18s ease;
}

.access-form button,
.primary-btn,
.login-button {
  background: linear-gradient(135deg, #6f4ef6, #8f5bf9);
  color: white;
  padding: 14px 18px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(111, 78, 246, 0.3);
}

.secondary-btn,
.ghost-button,
.icon-button,
.mini-link {
  background: transparent;
  border: 1px solid rgba(111, 78, 246, 0.25);
  color: #2f1b6f;
  padding: 13px 18px;
  font-weight: 700;
}

.status-text {
  min-height: 22px;
  margin-top: 16px;
  color: #ffd6d6;
  font-size: 0.95rem;
}

.landing-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 40px;
}

.topbar {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(17, 24, 43, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6f4ef6, #8e63ff);
  color: white;
  font-weight: 800;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text .brand-name {
  color: #171d32;
  font-size: 1rem;
  font-weight: 800;
}

.brand-text .brand-sub {
  color: #5b647b;
  font-size: 0.72rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.main-nav a { transition: color 0.18s ease; }
.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--text);
}

.login-button {
  padding-inline: 20px;
}

.content-shell {
  margin-top: 24px;
}

.hero-section {
  background: linear-gradient(135deg, #051425 0%, #091a2f 44%, #17163c 100%);
  border-radius: 30px;
  min-height: 500px;
  padding: 44px clamp(18px, 4vw, 54px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 60px rgba(8, 12, 26, 0.09);
}

.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-section::before {
  width: 420px;
  height: 420px;
  background: rgba(111, 78, 246, 0.18);
  right: -110px;
  bottom: -120px;
}

.hero-section::after {
  width: 320px;
  height: 320px;
  background: rgba(46, 182, 255, 0.16);
  left: -80px;
  top: -100px;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(2.4rem, 4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.hero-copy h1 span {
  display: block;
  color: #d9d4ff;
}

.hero-copy p {
  margin-top: 18px;
  max-width: 610px;
  color: rgba(232,236,255,0.74);
  line-height: 1.7;
  font-size: 1.04rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-btn,
.secondary-btn {
  padding: 15px 24px;
  font-weight: 700;
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.26);
  color: white;
  box-shadow: none;
}

.hero-visual {
  min-height: 330px;
  display: grid;
  place-items: center;
}

.globe {
  position: relative;
  width: min(500px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(131, 214, 255, 0.82) 0%, rgba(86, 117, 255, 0.38) 28%, rgba(14, 25, 41, 0.7) 60%, rgba(9, 17, 29, 0.96) 100%);
  border: 2px solid rgba(190, 210, 255, 0.2);
  box-shadow: inset 0 0 32px rgba(154, 182, 255, 0.28), 0 30px 76px rgba(76, 95, 196, 0.22);
  overflow: hidden;
}

.globe::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background: radial-gradient(circle at 25% 30%, rgba(255,255,255,0.18), transparent 18%);
  border: 1px solid rgba(255,255,255,0.08);
}

.globe::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255,255,255,0.1) 0 1px, transparent 1px 14px);
  opacity: 0.5;
}

.label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(127, 111, 255, 0.9);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(111, 78, 246, 0.31);
}

.label-top { top: 18%; left: 18%; }
.label-right { top: 26%; right: 7%; }
.label-left { bottom: 24%; left: 8%; }
.label-bottom { bottom: 11%; right: 12%; }
.label-small { left: 18%; bottom: 38%; }
.label-arabic { right: 12%; bottom: 38%; }

.language-section {
  margin-top: 28px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon,
.panel-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 800;
}

.section-title-wrap h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.section-title-wrap p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ghost-button {
  background: transparent;
  border-color: rgba(111, 78, 246, 0.22);
  color: var(--purple-deep);
  white-space: nowrap;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 14px;
}

.language-card {
  background: #f9f9fc;
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 132px;
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 18px rgba(22, 28, 45, 0.02);
}

.flag { font-size: 2.1rem; margin-bottom: 12px; }
.language-card strong { font-size: 1rem; }
.language-card small { color: var(--muted); margin-top: 6px; }
.more-card { background: #f0ebff; }

.stats-strip {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 41, 0.03);
}

.stat-card strong {
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--text);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.08fr 1.52fr 1.08fr;
  gap: 18px;
}

.feature-panel {
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 10px 30px rgba(17, 24, 41, 0.04);
}

.workspace-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.mini-panel {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 12px 28px rgba(17, 24, 41, 0.04);
}

.progress-box {
  display: grid;
  gap: 12px;
}

.score-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--purple-soft);
}

.score-pill strong {
  font-size: 1.7rem;
  color: var(--purple-deep);
}

.score-pill small {
  color: var(--muted);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #ececff;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6f4ef6, #8d63ff);
  transition: width 0.2s ease;
}

.saved-word-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.saved-word-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fafaff;
  border-radius: 12px;
  padding: 10px 12px;
}

.saved-word-list li span {
  font-weight: 700;
}

.saved-word-list li small {
  color: var(--muted);
}

.empty-state {
  justify-content: center !important;
  color: var(--muted);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h4 {
  margin: 0;
  font-size: 1.25rem;
}

.feature-list-panel ul,
.process-panel ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list-panel li,
.process-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
}

.feature-list-panel li:last-child,
.process-panel li:last-child { border-bottom: none; }

.mini-link {
  width: 100%;
  margin-top: 14px;
  background: transparent;
  color: var(--purple-deep);
}

.translator-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.select-row select,
.translator-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 12px 14px;
  color: var(--text);
}

.swap {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-weight: 800;
}

.translator-form textarea {
  min-height: 100px;
  resize: vertical;
}

.translate-btn { width: 100%; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.trust-row span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.process-panel ol {
  display: grid;
  gap: 10px;
}

.process-panel li {
  justify-content: flex-start;
  gap: 12px;
}

.process-panel li span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-weight: 800;
}

.process-panel p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.learning-paths {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 28px;
}

.path-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: 0 12px 30px rgba(17, 24, 41, 0.04);
}

.path-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.mini-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.path-card h4 {
  margin: 0;
  font-size: 1.5rem;
}

.path-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.path-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 500;
}

.bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(111, 78, 246, 0.18);
  border: 2px solid rgba(111, 78, 246, 0.5);
}

.bullet.active {
  background: var(--purple);
  border-color: var(--purple);
}

.accent-card {
  background: linear-gradient(135deg, #0d1a30 0%, #120f34 100%);
  color: white;
}

.accent-card .mini-badge {
  background: rgba(255,255,255,0.12);
  color: #e6e0ff;
}

.accent-card p {
  margin: 0;
  color: rgba(255,255,255,0.76);
  line-height: 1.7;
}

.cta-banner {
  margin-top: 24px;
  background: linear-gradient(135deg, #f0edff 0%, #f7f4ff 100%);
  border: 1px solid rgba(111, 78, 246, 0.12);
  border-radius: 24px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 16px 30px rgba(111, 78, 246, 0.06);
}

.cta-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.award-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(111, 78, 246, 0.12);
  font-size: 1.8rem;
}

.cta-copy h4 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.cta-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .gate-card,
  .hero-section,
  .feature-grid,
  .learning-paths,
  .workspace-panel {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .language-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 760px) {
  .landing-page {
    padding: 14px 14px 30px;
  }

  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav {
    justify-content: center;
  }

  .stats-strip,
  .language-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .section-header,
  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
