:root {
  --bg-1: #071323;
  --bg-2: #0d1024;
  --surface: rgba(13, 21, 44, 0.72);
  --surface-strong: rgba(20, 30, 62, 0.82);
  --border: rgba(140, 173, 255, 0.28);
  --text: #eef3ff;
  --muted: #adbbdc;
  --accent: #44f2b8;
  --accent-2: #4ca8ff;
  --accent-3: #ffcc66;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #10254b 0%, transparent 45%),
    radial-gradient(circle at 90% 20%, #14275a 0%, transparent 40%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.lang-switcher {
  position: fixed;
  top: 5.1rem;
  right: 0.75rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 18, 40, 0.85);
  backdrop-filter: blur(6px);
}

.lang-switcher label {
  font-size: 0.72rem;
  color: #d5e1fb;
  font-weight: 600;
}

.lang-switcher select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef3ff;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.22rem 0.38rem;
}

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
  z-index: -3;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(75px);
  z-index: -2;
}

.bg-orb-one {
  width: 340px;
  height: 340px;
  background: rgba(68, 242, 184, 0.22);
  top: -80px;
  left: -60px;
}

.bg-orb-two {
  width: 280px;
  height: 280px;
  background: rgba(76, 168, 255, 0.22);
  bottom: -40px;
  right: -50px;
}

.topbar {
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 3rem;
}

.brand-logo {
  width: clamp(170px, 24vw, 260px);
  max-width: 100%;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 0.48rem 0.7rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.home-topbar {
  width: min(1320px, 94vw);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.45rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.home-brand-logo {
  width: clamp(190px, 25vw, 280px);
}

.home-nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.38rem;
  justify-content: center;
}

.home-nav-cta {
  text-decoration: none;
  color: #032c3f;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.45rem 0.92rem;
  border: 1px solid rgba(122, 213, 255, 0.55);
  background: linear-gradient(120deg, #7ad5ff, #9ef6e3);
  box-shadow: 0 8px 20px rgba(122, 213, 255, 0.25);
  transition: all 0.2s ease;
}

.home-nav-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(120deg, #8fe0ff, #b3ffe9);
  color: #02263a;
}

.page-home > .lang-switcher {
  display: none;
}

.home-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  margin-top: 0;
  padding: 0.22rem 0.3rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(11, 21, 45, 0.9);
  backdrop-filter: blur(6px);
}

.home-lang-switcher label {
  display: none;
}

.home-lang-switcher select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef3ff;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
}

.home-main {
  width: min(1320px, 94vw);
  padding-bottom: 4.2rem;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.2rem;
  background: linear-gradient(150deg, rgba(15, 28, 56, 0.9), rgba(8, 16, 36, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: 2.75rem;
  backdrop-filter: blur(8px);
}

.home-hero-tag {
  margin: 0 0 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(68, 242, 184, 0.3);
  background: rgba(68, 242, 184, 0.08);
  color: var(--accent);
  padding: 0.34rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.home-hero-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: clamp(2rem, 4.9vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.home-hero-title .line2 {
  color: var(--accent);
}

.home-hero-sub {
  margin: 1.05rem 0 0;
  max-width: 560px;
  line-height: 1.62;
  color: #aab8d8;
  font-size: 1.04rem;
}

.home-hero-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.home-btn-primary {
  background: linear-gradient(90deg, #00e5b0, #70ffd7);
  color: #06251e;
  box-shadow: 0 10px 28px rgba(0, 229, 176, 0.24);
}

.home-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: #e9f0ff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.home-social-proof {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.home-sp-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.home-sp-num {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-sp-label {
  margin: 0.32rem 0 0;
  font-size: 0.77rem;
  line-height: 1.5;
  color: #9cafce;
}

.home-onboarding {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  padding: 1.35rem;
  background: linear-gradient(150deg, rgba(20, 32, 65, 0.92), rgba(14, 23, 48, 0.9));
}

.home-onboarding-title {
  margin: 0 0 0.9rem;
  color: #f7ca7a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.76rem;
}

.home-steps {
  display: grid;
  gap: 0.65rem;
}

.home-step {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 0.82rem;
  transition: all 0.2s ease;
}

.home-step.is-active,
.home-step:hover {
  border-color: rgba(68, 242, 184, 0.36);
  background: rgba(68, 242, 184, 0.1);
}

.home-step-number {
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-step-content {
  display: flex;
  flex-direction: column;
  gap: 0.13rem;
}

.home-step-label {
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #91a7cd;
  font-weight: 700;
}

.home-step-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ebf2ff;
}

.home-step-desc {
  font-size: 0.8rem;
  color: #9eb0d2;
  line-height: 1.5;
}

.home-step-arrow {
  margin-left: auto;
  color: #8df6d4;
  font-size: 1rem;
  line-height: 1.2;
}

.home-onboarding-btn {
  width: 100%;
  margin-top: 1.15rem;
}

.home-section-grid {
  margin-top: 1.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.home-browse-head {
  margin-top: 1.6rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
}

.home-browse-head h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
}

.home-browse-head p {
  margin: 0.35rem 0 0;
  color: #a5b5d6;
}

.home-view-all {
  text-decoration: none;
  color: #75f6d2;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.home-section-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.2rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-section-card:hover {
  transform: translateY(-3px);
  border-color: rgba(68, 242, 184, 0.36);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.home-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.home-card-head h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
  color: #90fdd8;
}

.home-open-chip {
  text-decoration: none;
  color: #02293d;
  background: linear-gradient(120deg, #7ad5ff, #9ef6e3);
  border-radius: 999px;
  padding: 0.25rem 0.66rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.home-open-chip-muted {
  background: rgba(255, 255, 255, 0.17);
  color: #cad8f4;
}

.home-card-description {
  margin: 0.75rem 0 1rem;
  color: #a9b7d7;
  line-height: 1.56;
}

.home-topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-topic-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.52rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.13);
}

.home-topic-list li::before {
  content: none;
}

.home-topic-list li:last-child {
  border-bottom: 0;
}

.home-topic-link {
  color: #eaf1ff;
  text-decoration: none;
}

.home-topic-link:hover {
  text-decoration: underline;
  color: #8dfad6;
}

.home-level-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 0 0.6rem;
  padding: 0.46rem 0;
}

.home-level-legend .level {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.74rem;
  color: #9fb2d4;
}

.home-level-legend .level i {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 999px;
  display: inline-block;
}

.home-level-legend .easy i,
.home-level-dot.easy {
  background: #20e2bb;
}

.home-level-legend .medium i,
.home-level-dot.medium {
  background: #ffb020;
}

.home-level-legend .hard i,
.home-level-dot.hard {
  background: #ff5a68;
}

.home-level-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  flex: 0 0 0.5rem;
}

.home-topic-list-extra {
  margin-top: 0.22rem;
}

.home-card-footer {
  margin-top: 0.7rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.home-topic-count {
  font-size: 0.78rem;
  color: #93a8cc;
}

.home-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.home-more-btn,
.home-start-btn {
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.home-more-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #d6e3ff;
  cursor: pointer;
}

.home-start-btn {
  border: 1px solid rgba(122, 213, 255, 0.55);
  background: linear-gradient(120deg, #7ad5ff, #9ef6e3);
  color: #02263a;
}

.category-page {
  width: min(1320px, 94vw);
  padding-bottom: 4rem;
}

.category-hero {
  margin-top: 0.55rem;
  padding: 1.45rem 0 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
}

.category-crumb {
  margin: 0;
  font-size: 0.86rem;
  color: #90a6cb;
}

.category-crumb a {
  color: #cad8f5;
  text-decoration: none;
}

.category-crumb span {
  color: #66f1c8;
  font-weight: 700;
}

.category-hero h1 {
  margin: 0.8rem 0 0.45rem;
  font-size: clamp(2rem, 4.1vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.category-hero h1 span {
  color: var(--accent);
}

.category-hero p {
  margin: 0;
  color: #a5b6d6;
  max-width: 640px;
  line-height: 1.54;
}

.category-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
}

.category-tabs {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.category-tabs a {
  text-decoration: none;
  color: #9fb2d3;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 9px;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.category-tabs a.active {
  color: #07372c;
  border-color: rgba(122, 213, 255, 0.55);
  background: linear-gradient(120deg, #7ad5ff, #9ef6e3);
}

.category-meta {
  font-size: 0.82rem;
  color: #8ea3ca;
}

.category-section-quiz-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.56rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #07372c;
  border: 1px solid rgba(122, 213, 255, 0.55);
  background: linear-gradient(120deg, #7ad5ff, #9ef6e3);
}

.category-section-quiz-btn:hover {
  background: linear-gradient(120deg, #8fe0ff, #b3ffe9);
}

.category-controls {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.category-search-group {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: min(760px, 100%);
}

.category-search {
  width: min(430px, 100%);
  flex: 1;
}

.category-search input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #eaf2ff;
  font: inherit;
  padding: 0.75rem 0.92rem;
}

.category-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.category-filters {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.category-filters button {
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #9cb0d2;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.52rem 0.85rem;
  cursor: pointer;
}

.category-filters button:last-child {
  border-right: 0;
}

.category-filters button.active {
  color: #e7f1ff;
  background: rgba(122, 213, 255, 0.17);
}

.category-topic-count {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: #a4b6d8;
}

.category-topic-count strong {
  color: #66f1c8;
}

.category-card-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.15rem;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(68, 242, 184, 0.35);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.category-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.category-card-head h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.18;
}

.category-open {
  text-decoration: none;
  border: 1px solid rgba(68, 242, 184, 0.42);
  background: rgba(68, 242, 184, 0.12);
  color: #7bf8d6;
  border-radius: 999px;
  padding: 0.22rem 0.64rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.category-card p {
  margin: 0.68rem 0 0;
  color: #a5b6d7;
  line-height: 1.55;
}

.category-card-foot {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.category-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.category-quick-btn {
  text-decoration: none;
  border: 1px solid rgba(68, 242, 184, 0.42);
  background: rgba(68, 242, 184, 0.1);
  color: #7ff7d8;
  border-radius: 9px;
  padding: 0.38rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.category-quick-btn:hover {
  background: rgba(68, 242, 184, 0.18);
  color: #dffff3;
}

.category-card-foot p {
  margin: 0;
  color: #8fa6cc;
  font-size: 0.82rem;
}

.category-card-foot .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.3rem;
}

.category-card-foot .dot.easy {
  background: #20e2bb;
}

.category-card-foot .dot.medium {
  background: #ffb020;
}

.category-card-foot .dot.hard {
  background: #ff5a68;
}

.category-arrow {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  text-decoration: none;
  color: #d9e7ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  margin-top: 0.2rem;
  background: linear-gradient(160deg, rgba(76, 168, 255, 0.1), rgba(68, 242, 184, 0.08)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.2rem;
}

.pill {
  margin: 0;
  display: inline-flex;
  border: 1px solid rgba(68, 242, 184, 0.4);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.32rem 0.84rem;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 0.8rem 0 0.55rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.tagline {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.5;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(100deg, var(--accent), #75ffd8);
  color: #053328;
  box-shadow: 0 10px 24px rgba(68, 242, 184, 0.25);
}

.btn-outline {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.start-btn {
  min-width: 170px;
  padding: 0.84rem 1.24rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 1px rgba(68, 242, 184, 0.35),
    0 10px 28px rgba(68, 242, 184, 0.36);
  animation: startPulse 1.6s ease-in-out infinite;
}

.start-btn:hover {
  transform: translateY(-1px) scale(1.01);
}

@keyframes startPulse {
  0% {
    box-shadow:
      0 0 0 1px rgba(68, 242, 184, 0.35),
      0 10px 28px rgba(68, 242, 184, 0.32);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(68, 242, 184, 0.08),
      0 14px 32px rgba(68, 242, 184, 0.48);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(68, 242, 184, 0.35),
      0 10px 28px rgba(68, 242, 184, 0.32);
  }
}

.hero-panel {
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1rem;
}

.panel-title {
  margin: 0 0 0.8rem;
  font-size: 0.86rem;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.path-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.78rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--muted);
}

.path-item span:last-child {
  color: #d6e4ff;
  font-weight: 600;
}

.path-item:last-child {
  border-bottom: 0;
}

.stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat-card {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
}

.stat-value {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
}

.stat-label {
  margin: 0.28rem 0 0;
  color: var(--muted);
}

.grid {
  margin: 1rem 0 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.2rem;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(68, 242, 184, 0.4);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.card h2 {
  margin: 0;
  font-size: 1.28rem;
  color: #87ffd6;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #07273a;
  font-weight: 700;
  background: linear-gradient(120deg, #7ad5ff, #9ff7e2);
}

.chip-link {
  text-decoration: none;
}

.card p {
  margin: 0.6rem 0 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

.card li::before {
  content: "\2192";
  color: var(--accent);
  margin-right: 0.5rem;
}

.topic-link {
  color: var(--text);
  text-decoration: none;
}

.topic-link:hover {
  color: #9df7dc;
  text-decoration: underline;
}

.card li:last-child {
  border-bottom: 0;
}

.compact-hero {
  grid-template-columns: 1fr;
}

.topic-page {
  width: min(1320px, 94vw);
}

.topic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
  align-items: start;
}

.topic-main {
  min-width: 0;
}

.topic-hero {
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 1.15rem;
  background: linear-gradient(165deg, rgba(18, 33, 70, 0.72), rgba(8, 19, 42, 0.9));
}

.topic-pill {
  margin: 0 0 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(68, 242, 184, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  background: rgba(68, 242, 184, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.topic-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.05;
}

.topic-subtitle {
  margin: 0;
  max-width: 860px;
  color: var(--muted);
  line-height: 1.5;
}

.topic-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.topic-side {
  display: grid;
  gap: 0.95rem;
  position: sticky;
  top: 0.8rem;
}

.topic-side-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  padding: 0.95rem;
  background: linear-gradient(170deg, rgba(14, 28, 58, 0.95), rgba(10, 21, 47, 0.92));
}

.topic-side-card h3 {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9db2d8;
}

.topic-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.topic-kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.7rem;
}

.topic-kpi strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  color: #dcf4ff;
}

.topic-kpi span {
  display: block;
  margin-top: 0.32rem;
  color: #9ab3d9;
  font-size: 0.8rem;
}

.topic-mix p {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9db2d8;
  font-weight: 700;
}

.mix-row {
  display: grid;
  grid-template-columns: 56px 1fr 22px;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.38rem;
}

.mix-row span,
.mix-row em {
  font-size: 0.83rem;
  color: #c6d7f5;
  font-style: normal;
}

.mix-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.mix-fill {
  height: 100%;
  border-radius: 999px;
}

.mix-fill.easy {
  background: linear-gradient(90deg, #35dbb0, #60ffd9);
}

.mix-fill.medium {
  background: linear-gradient(90deg, #f7b230, #ffd17f);
}

.mix-fill.hard {
  background: linear-gradient(90deg, #ff6262, #ffa3a3);
}

.topic-related {
  display: grid;
  gap: 0.16rem;
}

.topic-related a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.52rem 0.2rem;
  color: #c8d8f7;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topic-related a:hover {
  color: #f0f7ff;
}

.topic-related a:last-child {
  border-bottom: 0;
}

.quiz-hero {
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, margin 0.2s ease, padding 0.2s ease;
}

.quiz-hero.is-collapsed {
  margin: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  overflow: hidden;
  border: 0;
}

.quiz-game {
  margin: 1.1rem 0 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(18, 33, 70, 0.68), rgba(8, 19, 42, 0.88));
  backdrop-filter: blur(8px);
}

.topic-quiz-game {
  margin-top: 0;
}

.quiz-start-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 2rem 1.1rem;
  text-align: center;
  background: linear-gradient(170deg, rgba(14, 28, 58, 0.86), rgba(10, 21, 47, 0.84));
}

.quiz-start-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(68, 242, 184, 0.42);
  background: rgba(68, 242, 184, 0.14);
  display: grid;
  place-items: center;
  color: #97ffe0;
  font-size: 1.45rem;
}

.quiz-start-panel h2 {
  margin: 0;
}

.quiz-start-panel p {
  margin: 0.55rem auto 0;
  max-width: 540px;
  color: var(--muted);
  line-height: 1.5;
}

.quiz-start-badges {
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.quiz-start-badges span {
  border-radius: 999px;
  padding: 0.36rem 0.64rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #cfe0ff;
  font-size: 0.82rem;
}

.quiz-start-main-btn {
  min-width: 220px;
}

.quiz-game:not(.is-locked) .quiz-start-panel {
  display: none;
}

.quiz-game.is-locked .quiz-live-shell {
  display: none;
}

.quiz-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.quiz-path {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.82rem;
  color: #93abc9;
}

.quiz-path a {
  color: #9eb4d5;
  text-decoration: none;
}

.quiz-path a:hover {
  color: #d8e7ff;
}

.quiz-path strong {
  color: #e8f2ff;
}

.quiz-meta {
  margin: 0;
  padding: 0.45rem 0.74rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.hud-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 150px;
}

.hud-cell small {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ea9ce;
}

.hud-cell strong {
  font-size: 1.7rem;
  line-height: 1;
  color: #e6f2ff;
}

.timer-meta strong {
  color: #ffc45f;
}

.quiz-hud {
  position: static;
  top: auto;
  z-index: 2;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 0;
  background: linear-gradient(170deg, rgba(14, 28, 58, 0.95), rgba(10, 21, 47, 0.92));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.topic-quiz-game .quiz-hud {
  position: static;
  top: auto;
}

.quiz-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
}

.quiz-stats .quiz-meta {
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.8rem 0.9rem;
}

.quiz-stats .quiz-meta:last-child {
  border-right: 0;
}

.quiz-meta span {
  color: var(--text);
}

.quiz-hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.quiz-game.is-locked .progress-track,
.quiz-game.is-locked .progress-wrap,
.quiz-game.is-locked .question-strip,
.quiz-game.is-locked .question-list,
.quiz-game.is-locked .quiz-nav {
  display: none;
}

.progress-wrap {
  margin: 0;
  padding: 0.75rem 0.9rem 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-row {
  display: grid;
  grid-template-columns: 74px 1fr 36px;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.progress-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a8bddd;
}

.progress-value {
  margin: 0;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 700;
  text-align: right;
}

.progress-track {
  height: 6px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #44f2b8, #4ca8ff);
  transition: width 0.25s ease, background 0.25s ease;
}

.time-track {
  background: rgba(255, 255, 255, 0.1);
}

.time-fill {
  background: linear-gradient(90deg, #4ca8ff, #44f2b8);
}

.timer-meta.is-warning {
  border-color: rgba(255, 204, 102, 0.65);
  background: rgba(255, 204, 102, 0.18);
  color: #ffe4ad;
}

.timer-meta.is-warning span {
  color: #ffefcf;
}

.timer-meta.is-danger {
  border-color: rgba(255, 136, 136, 0.72);
  background: rgba(255, 122, 122, 0.22);
  color: #ffd4d4;
}

.timer-meta.is-danger span {
  color: #fff2f2;
}

.question-strip {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.question-dot {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #8ea8ce;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.question-dot:hover {
  transform: translateY(-1px);
  border-color: rgba(76, 168, 255, 0.66);
}

.question-dot.is-current {
  color: #052234;
  border-color: transparent;
  background: linear-gradient(120deg, #12e0b2, #2ff8c4);
  box-shadow: 0 6px 18px rgba(18, 224, 178, 0.3);
}

.question-dot.is-visited:not(.is-current) {
  border-color: rgba(140, 173, 255, 0.45);
}

.question-dot.is-correct {
  border-color: rgba(83, 255, 188, 0.75);
  background: rgba(83, 255, 188, 0.16);
  color: #cbffe9;
}

.question-dot.is-wrong {
  border-color: rgba(255, 145, 145, 0.8);
  background: rgba(255, 145, 145, 0.15);
  color: #ffd2d2;
}

.question-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.question-card {
  display: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0 0 18px 18px;
  padding: 1.2rem;
  min-height: 420px;
}

.question-card.is-active-question {
  display: block;
}

.question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.question-chip-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.question-chip {
  margin: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(68, 242, 184, 0.45);
  border-radius: 7px;
  background: rgba(68, 242, 184, 0.12);
  color: #72ffe0;
  font-size: 0.78rem;
  font-weight: 700;
}

.source-chip {
  border-color: rgba(122, 213, 255, 0.5);
  background: rgba(122, 213, 255, 0.14);
  color: #9deaff;
}

.question-state {
  margin: 0;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 208, 106, 0.4);
  color: #ffd27a;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.question-state.is-visited {
  border-color: rgba(157, 201, 255, 0.55);
  color: #d5e6ff;
}

.question-state.is-correct {
  border-color: rgba(68, 242, 184, 0.8);
  background: rgba(68, 242, 184, 0.14);
  color: #bfffe6;
}

.question-state.is-wrong {
  border-color: rgba(255, 136, 136, 0.75);
  background: rgba(255, 136, 136, 0.14);
  color: #ffd3d3;
}

.question-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.question-card h3 {
  margin: 0.65rem 0 0;
  font-size: 2rem;
  line-height: 1.35;
  font-weight: 700;
}

.question-meta {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: #9fc8ff;
}

.options-group {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.option-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.15s ease, background 0.18s ease;
}

.option-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  color: #7d96bb;
  font-size: 0.78rem;
  font-weight: 700;
}

.option-item:hover {
  border-color: rgba(41, 233, 190, 0.65);
  background: rgba(41, 233, 190, 0.08);
  transform: translateY(-1px);
}

.option-item input {
  margin-top: 0;
  accent-color: #13deb3;
}

.option-item.is-correct {
  border-color: rgba(19, 222, 179, 0.9);
  background: rgba(19, 222, 179, 0.15);
}

.option-item.is-wrong {
  border-color: rgba(255, 130, 130, 0.7);
  background: rgba(255, 130, 130, 0.14);
}

.question-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.55rem 0.84rem;
  font-size: 0.92rem;
}

.result-message {
  margin: 0.85rem 0 0;
  font-weight: 600;
}

.result-message.correct {
  color: #88ffd7;
}

.result-message.wrong {
  color: #ff9b9b;
}

.result-message.warning {
  color: #ffd57f;
}

.explanation-box {
  margin-top: 0.7rem;
  padding: 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(124, 190, 255, 0.4);
  background: rgba(76, 168, 255, 0.1);
  color: #d8e7ff;
  line-height: 1.45;
}

.is-hidden {
  display: none;
}

.quiz-nav {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.live-score-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.live-ring {
  --ring-progress: 0%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(#15deb4 var(--ring-progress), rgba(255, 255, 255, 0.12) 0);
  display: grid;
  place-items: center;
  position: relative;
}

.live-ring::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0c1d3d;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-ring strong {
  position: relative;
  z-index: 1;
  color: #17e3b8;
  font-size: 1.08rem;
}

.live-score-points strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.live-score-points span {
  color: #94acd0;
  font-size: 0.84rem;
}

.live-breakdown p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #a8bddc;
}

.live-breakdown p strong {
  margin-left: auto;
  color: #dfeeff;
}

.dot-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-swatch.good {
  background: #17e3b8;
}

.dot-swatch.bad {
  background: #ff6c6c;
}

.dot-swatch.idle {
  background: #7f95b6;
}

.quiz-nav .btn {
  min-width: 0;
}

.summary-card {
  margin-top: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 1rem;
  background: linear-gradient(170deg, rgba(15, 29, 59, 0.76), rgba(11, 23, 48, 0.9));
}

.summary-card h3 {
  margin: 0 0 0.65rem;
}

.summary-card p {
  margin: 0.32rem 0;
  color: #d9e5ff;
}

.summary-actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.summary-actions .btn {
  min-width: 160px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seo-section {
  margin: 1.4rem 0 2.4rem;
  padding: 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transition: padding 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.seo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.seo-head h2 {
  margin: 0;
}

.seo-toggle {
  white-space: nowrap;
}

.seo-content {
  transition: opacity 0.2s ease;
}

.seo-section.is-collapsed {
  padding: 0.78rem 1rem;
  border-color: rgba(157, 233, 255, 0.24);
  background: rgba(110, 168, 255, 0.05);
}

.seo-section.is-collapsed .seo-head {
  margin-bottom: 0;
}

.seo-section.is-collapsed h2 {
  font-size: 1.04rem;
}

.seo-section h2,
.seo-section h3 {
  margin: 0 0 0.55rem;
}

.seo-section p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.seo-section details {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.seo-section summary {
  cursor: pointer;
  font-weight: 600;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.seo-links a {
  text-decoration: none;
  color: #9de9ff;
  border: 1px solid rgba(157, 233, 255, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
}

.seo-links a:hover {
  color: #d5f8ff;
  border-color: rgba(157, 233, 255, 0.55);
}

.settings-card {
  margin: 1rem 0 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 1.1rem;
}

.quiz-settings-hero {
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}

.quiz-settings-hero h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(2rem, 4.7vw, 3.2rem);
}

.quiz-settings-hero p {
  margin: 0;
  color: var(--muted);
}

.quiz-builder-card {
  background: transparent;
  border: 0;
  padding: 0;
}

.quiz-builder-form {
  display: grid;
  gap: 0.75rem;
}

.builder-block {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(16, 30, 62, 0.92), rgba(10, 21, 47, 0.94));
  padding: 1rem;
}

.builder-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.builder-head h2 {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9db2d8;
}

.builder-head p {
  margin: 0;
  font-size: 0.8rem;
  color: #7f97bd;
}

.question-counter {
  width: 220px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.question-counter button,
.question-counter strong {
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe9ff;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
}

.question-counter button {
  cursor: pointer;
}

.question-counter strong {
  border-inline: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.8rem;
}

.question-choice-row {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.question-chip-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: #b7c9e7;
  font: inherit;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  cursor: pointer;
}

.question-chip-btn.active {
  border-color: rgba(18, 223, 180, 0.6);
  background: rgba(18, 223, 180, 0.14);
  color: #89ffe0;
}

.section-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.section-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.section-pick-card {
  display: grid;
  gap: 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.section-pick-card strong {
  font-size: 1.03rem;
}

.section-pick-card small {
  color: #7f97bd;
}

.section-icon {
  font-size: 1.2rem;
}

.section-pick input:checked + .section-pick-card {
  border-color: rgba(18, 223, 180, 0.7);
  background: rgba(18, 223, 180, 0.12);
}

.choice-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #bcd0ef;
  font-weight: 700;
  padding: 0.52rem 0.9rem;
  cursor: pointer;
}

.choice-pill input:checked + span {
  border-color: rgba(18, 223, 180, 0.66);
  background: rgba(18, 223, 180, 0.14);
  color: #8afee1;
}

.difficulty-row .choice-pill.easy input:checked + span {
  border-color: rgba(18, 223, 180, 0.66);
}

.difficulty-row .choice-pill.medium input:checked + span {
  border-color: rgba(255, 177, 35, 0.7);
  background: rgba(255, 177, 35, 0.13);
  color: #ffd58f;
}

.difficulty-row .choice-pill.hard input:checked + span {
  border-color: rgba(255, 98, 98, 0.7);
  background: rgba(255, 98, 98, 0.13);
  color: #ffb0b0;
}

.time-select-wrap {
  margin-top: 0.7rem;
  max-width: 220px;
}

.time-select-wrap select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  padding: 0.62rem 0.72rem;
}

.quiz-builder-summary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.quiz-builder-summary div {
  padding: 0.82rem 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-builder-summary div:last-child {
  border-right: 0;
}

.quiz-builder-summary small {
  display: block;
  color: #8ea8ce;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
}

.quiz-builder-summary strong {
  font-size: 1.9rem;
  line-height: 1;
}

.quiz-builder-submit {
  width: 100%;
  justify-content: center;
  font-size: 1.22rem;
  padding-block: 0.9rem;
}

.tutorial-grid {
  margin-top: 1rem;
}

.tutorial-pattern.is-active {
  border-color: rgba(68, 242, 184, 0.6);
  box-shadow: 0 8px 20px rgba(68, 242, 184, 0.18);
}

.tutorial-section {
  margin-top: 1rem;
}

.tutorial-steps {
  margin: 0.35rem 0 0.9rem;
  padding-left: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
}

.tutorial-practice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.tutorial-count-links {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tutorial-practice-list {
  display: grid;
  gap: 0.8rem;
}

.tutorial-practice-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.tutorial-options {
  margin: 0 0 0.65rem;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.45;
}

.quiz-settings-form {
  display: grid;
  gap: 0.95rem;
}

.settings-block label,
.settings-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.quiz-settings-form select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  padding: 0.62rem 0.72rem;
}

.checkbox-grid {
  display: grid;
  gap: 0.45rem;
}

.checkbox-grid label,
.radio-row label {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  margin: 0;
}

.radio-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

@media (max-width: 1000px) {
  .topic-layout {
    grid-template-columns: 1fr;
  }

  .topic-side {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .topic-actions .btn {
    flex: 1 1 auto;
  }

  .quiz-stats {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-stats .quiz-meta:nth-child(2n) {
    border-right: 0;
  }

  .quiz-stats .quiz-meta:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .question-card h3 {
    font-size: 1.45rem;
  }

  .category-page {
    width: min(1180px, 93vw);
  }

  .category-hero {
    grid-template-columns: 1fr;
  }

  .category-hero-right {
    align-items: flex-start;
  }

  .category-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .category-search-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .category-filter-wrap {
    justify-content: space-between;
  }

  .category-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-topbar,
  .home-main {
    width: min(1180px, 93vw);
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .home-section-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-browse-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-nav-right {
    width: 100%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

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

  .section-pick-grid {
    grid-template-columns: 1fr;
  }

  .quiz-builder-summary {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .quiz-builder-summary div:nth-child(3n) {
    border-right: 0;
  }

  .quiz-builder-summary div:nth-child(-n + 3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 700px) {
  .topic-page {
    width: min(1160px, 92vw);
  }

  .topic-hero {
    padding: 1rem;
    border-radius: 16px;
  }

  .topic-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topic-side {
    grid-template-columns: 1fr;
  }

  .topic-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-top-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-path {
    flex-wrap: wrap;
  }

  .progress-row {
    grid-template-columns: 64px 1fr 34px;
  }

  .question-card {
    min-height: 360px;
    padding: 1rem;
  }

  .question-card h3 {
    font-size: 1.15rem;
  }

  .option-item {
    padding: 0.7rem;
  }

  .live-score-head {
    grid-template-columns: 84px 1fr;
  }

  .live-ring {
    width: 82px;
    height: 82px;
  }

  .live-ring::after {
    width: 64px;
    height: 64px;
  }

  .mix-row {
    grid-template-columns: 50px 1fr 20px;
  }

  .quiz-start-panel {
    padding: 1.2rem 0.85rem;
  }

  .category-page {
    width: min(1160px, 92vw);
  }

  .category-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .category-filter-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .category-filters {
    width: 100%;
  }

  .category-filters button {
    flex: 1;
  }

  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .category-card-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-topbar,
  .home-main {
    width: min(1160px, 92vw);
  }

  .home-brand-logo {
    width: clamp(170px, 52vw, 230px);
  }

  .home-hero {
    border-radius: 20px;
    padding: 1.25rem;
  }

  .home-hero-sub {
    font-size: 0.95rem;
  }

  .home-social-proof {
    grid-template-columns: 1fr;
  }

  .home-hero-actions .btn {
    width: 100%;
  }

  .home-section-grid {
    grid-template-columns: 1fr;
  }

  .home-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: clamp(160px, 52vw, 230px);
  }

  .lang-switcher {
    top: 4.8rem;
    right: 0.5rem;
    padding: 0.28rem 0.44rem;
  }

  .lang-switcher label {
    display: none;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.55rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 21, 45, 0.9);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.55rem 0.7rem;
  }

  .stats,
  .grid {
    grid-template-columns: 1fr;
  }

  .quiz-nav .btn {
    width: 100%;
  }

  .quiz-nav {
    grid-template-columns: 1fr;
  }

  .question-strip {
    max-height: 132px;
    overflow-y: auto;
    padding-right: 0.15rem;
  }

  .question-dot {
    width: 1.9rem;
    height: 1.9rem;
  }

  .seo-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-game {
    padding: 0.72rem;
  }

  .quiz-hud {
    position: static;
    top: auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem;
  }

  .quiz-stats {
    gap: 0.45rem;
  }

  .quiz-top-actions .btn {
    width: 100%;
  }

  .quiz-meta {
    padding: 0.38rem 0.6rem;
    font-size: 0.8rem;
  }

  .progress-track {
    height: 9px;
    margin-bottom: 0.45rem;
  }

  .builder-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .question-counter {
    width: 100%;
  }

  .choice-row {
    flex-direction: column;
    align-items: stretch;
  }

  .choice-pill span {
    width: 100%;
  }

  .quiz-builder-summary {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-builder-summary div:nth-child(2n) {
    border-right: 0;
  }

  .quiz-builder-summary div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .quiz-builder-summary div:last-child,
  .quiz-builder-summary div:nth-last-child(2) {
    border-bottom: 0;
  }

  .quiz-builder-summary strong {
    font-size: 1.45rem;
  }
}
  .home-nav-right {
    width: auto;
    margin-left: auto;
  }

  .home-nav-cta {
    font-size: 0.8rem;
    padding: 0.36rem 0.64rem;
  }

  .home-lang-switcher label {
    display: none;
  }
.sudoku-visual{margin-top:.85rem;padding:.8rem .85rem;border:1px solid rgba(122,213,255,.28);border-radius:12px;background:rgba(122,213,255,.08)}.sudoku-grid{display:grid;grid-template-columns:repeat(4,minmax(0,56px));gap:.35rem;width:max-content}.sudoku-cell{width:56px;height:56px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.04);display:grid;place-items:center;font-weight:700;font-size:1.15rem;color:#eaf4ff}.sudoku-cell.is-blank{color:#7feacf;border-color:rgba(19,222,179,.48);background:rgba(19,222,179,.1)}.sudoku-target{margin:.55rem 0 0;color:#cbe0ff;font-size:.84rem}.sudoku-target strong{color:#8af7da}
