* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Dark theme body */
body.dark-theme {
  background: linear-gradient(180deg, #0a0a0f 0%, #0f0f18 100%);
  background-attachment: fixed;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container.wide {
  max-width: 1200px;
}

/* Header */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Dark Header */
header.dark-header {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
}

.header-bar {
  width: 100%;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  font-family:
    "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

.logo-link:hover {
  color: var(--primary);
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-icon-img {
  width: auto;
  height: 30px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.12));
}

.logo-icon-img--light {
  display: none;
  filter: none;
}

body.light-theme .logo-icon-img--dark {
  display: none;
}

body.light-theme .logo-icon-img--light {
  display: inline-block;
}

.logo-text {
  letter-spacing: 0.03em;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .btn,
.header-actions .language-trigger,
.header-actions .theme-toggle,
.header-actions .user-trigger {
  height: 40px;
  border-radius: 12px;
}

.header-actions .language-trigger,
.header-actions .theme-toggle,
.header-actions .user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-actions .theme-toggle {
  width: 40px;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  position: relative;
}

.user-email {
  color: var(--text-muted);
  font-weight: 600;
}

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.user-trigger:hover {
  border-color: var(--primary);
}

.chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-width: 180px;
  padding: 0.25rem 0;
  z-index: 20;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.9rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: block;
}

.dropdown-item:hover {
  background: #f8fafc;
}

/* Cards - Dark Theme */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-bottom: 1rem;
  color: var(--text);
}

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

.card-header-row h2 {
  margin-bottom: 0;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card h3 {
  color: var(--text);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-success {
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    var(--success-dark) 100%
  );
  color: #052e16;
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-group.center {
  justify-content: center;
}

/* Dark theme buttons */
.btn-dark {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-dark:hover {
  filter: brightness(1.1);
}

.btn-small-dark {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Forms - Dark Theme */
input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
  color: var(--text-muted);
}

/* Breadcrumb - Dark Theme */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

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

.breadcrumb .separator {
  color: var(--text-muted);
}

.breadcrumb .current {
  font-weight: 600;
  color: var(--primary);
}

/* Article content - Dark Theme */
.article-content {
  line-height: 1.8;
  color: var(--text);
}

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

.article-content a {
  color: var(--primary);
  text-decoration: underline;
}

.article-content a:hover {
  color: var(--primary-dark);
}

/* Wiki links - inline clickable links in article */
.article-content a.wiki-link {
  color: var(--primary);
  text-decoration: none;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    var(--primary-glow) 60%
  );
  padding: 0 2px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.article-content a.wiki-link:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

/* Links list - Dark Theme */
.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.links-list a {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.links-list a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* Quiz - Dark Theme */
.question {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.question h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.question label {
  display: block;
  padding: 0.75rem;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s;
}

.question label:hover {
  background: rgba(255, 255, 255, 0.08);
}

.question input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: var(--primary);
}

.question textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  resize: vertical;
  min-height: 80px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.question textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Results - Dark Theme */
.result {
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
}

.result.pass {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.result.fail {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.result h2 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Profile - Dark Theme */
.run-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.run-item:last-child {
  border-bottom: none;
}

.run-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.run-titles {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.run-score {
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Alerts - Dark Theme */
.alert {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--error);
}

.alert-info {
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--primary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Canvas page - full viewport */
.canvas-page {
  height: 100vh;
  overflow: hidden;
}

.canvas-page header,
.header-compact {
  margin-bottom: 0;
}

.canvas-container {
  height: calc(100vh - 60px);
  width: 100vw;
}

/* Utility classes */
.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary);
}
.text-success {
  color: var(--success);
}
.font-bold {
  font-weight: 600;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}

/* Stats grid - Dark Theme */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Subtitle */
.subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Quiz Loader - Dark Theme */
.quiz-loader {
  text-align: center;
  padding: 3rem 1rem;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loader-spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

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

.loader-text {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.loader-subtext {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Quiz Progress - Dark Theme */
.quiz-progress {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Loading next question */
.loading-next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Question answered state */
.question.answered {
  border-left: none;
}

/* Warning button */
.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Landing page */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.landing-container {
  width: 100%;
  max-width: 900px;
  padding: 0 1rem 3rem;
  margin: 3.5rem auto 0;
  display: flex;
  justify-content: center;
}

.welcome-box {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.welcome-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.welcome-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.category-card:hover {
  border-color: var(--primary);
  background: #f0f4ff;
  transform: translateY(-2px);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.category-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.landing-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Canvas tiles view */
.canvas-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.canvas-tile {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

body.light-theme .canvas-tile {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.light-theme .canvas-tile:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

body.light-theme .progress-dot {
  background: rgba(15, 23, 42, 0.14);
}

body.light-theme .progress-dot.mastered {
  background: rgba(129, 140, 248, 0.8);
}

body.light-theme .tree-node.start {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
}

body.light-theme .tree-node.mastered {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border: 2px solid rgba(34, 197, 94, 0.4);
}

body.light-theme .tree-node.failed {
  background: rgba(255, 255, 255, 0.92);
  color: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(15, 23, 42, 0.12);
}

.canvas-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.canvas-tile-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.canvas-tile-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.canvas-tile-progress {
  margin-top: 0.75rem;
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
}

.progress-dot.mastered {
  background: #86efac;
}

/* Tree node colors */
.tree-node {
  position: absolute;
  padding: 14px 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  min-width: 120px;
  max-width: 160px;
  cursor: default;
}

.tree-node.start {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.tree-node.mastered {
  background: linear-gradient(135deg, #86efac 0%, #22c55e 100%);
  color: #166534;
  border: 2px solid #22c55e;
}

.tree-node.failed {
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #e5e7eb;
}

/* Canvas back button */
.canvas-back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  transition: all 0.2s;
}

.canvas-back-btn:hover {
  background: #f8fafc;
}

/* Empty canvas state */
.canvas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.canvas-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.canvas-empty h2 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Timer styles */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quiz-title-row .quiz-timer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.quiz-title-row {
  position: relative;
}

.quiz-title {
  margin: 0 !important;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.quiz-title-progress {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.quiz-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-muted);
}

.quiz-timer.urgent {
  color: var(--text);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Large button */
.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Article Layout - Dark Theme */
.article-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.article-top-bar-embedded {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 1rem;
  padding: 0;
}

.sidebar-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.article-top-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.article-parent-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.article-parent-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.article-parent-back:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.55);
  outline-offset: 2px;
}

.article-top-title {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  line-height: 1;
}

.article-top-right {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-success-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(74, 222, 128, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.22);
  color: rgba(240, 253, 244, 0.92);
  box-shadow: none;
}

.btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(129, 140, 248, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.22);
  color: rgba(240, 248, 255, 0.95);
}

.btn-success-muted:hover {
  background: rgba(74, 222, 128, 0.18);
  box-shadow: 0 4px 18px rgba(74, 222, 128, 0.18);
}

.quiz-answer-detail {
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.quiz-answer-detail--correct {
  border-color: rgba(74, 222, 128, 0.18);
  background: rgba(34, 197, 94, 0.1);
}

.quiz-answer-detail--incorrect {
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(248, 113, 113, 0.1);
}

.quiz-answer-detail__prompt {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.quiz-answer-detail__meta {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.quiz-answer-detail__feedback {
  display: block;
  font-weight: 650;
}

.quiz-answer-detail__feedback--correct {
  color: rgba(74, 222, 128, 0.95);
}

.quiz-answer-detail__feedback--incorrect {
  color: rgba(248, 113, 113, 0.92);
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.05s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.sidebar-toggle-btn:active {
  transform: translateY(1px);
}

.sidebar-toggle-btn:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.55);
  outline-offset: 2px;
}

.sidebar-toggle-btn__icon {
  line-height: 1;
  font-size: 1.1rem;
}

.sidebar-toggle-btn__icon svg {
  display: block;
}

.sidebar-toggle-btn__tree-icon {
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("/treechart.svg") no-repeat center / contain;
  mask: url("/treechart.svg") no-repeat center / contain;
}

.sidebar-toggle-btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
}

.sidebar-toggle-btn--pill {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.85rem;
  color: rgba(240, 253, 244, 0.92);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-toggle-btn--pill .sidebar-toggle-btn__icon {
  font-size: 1rem;
  opacity: 0.9;
}

.article-shell {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 1.5rem;
  transition: gap 0.25s ease;
}

.sidebar-toggle:not(:checked) ~ .article-shell {
  gap: 0;
}

.sidebar-toggle:not(:checked) ~ .article-shell .article-sidebar {
  width: 0;
  flex: 0 0 0;
  padding: 0;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  border-color: transparent;
}

.article-main {
  min-width: 0;
  flex: 1 1 auto;
}

.article-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  position: sticky;
  top: 5rem;
  width: 250px;
  flex: 0 0 250px;
  transform: translateX(0);
  opacity: 1;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    width 0.25s ease,
    flex 0.25s ease,
    padding 0.25s ease,
    margin 0.25s ease;
  overflow: hidden;
}

.article-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.article-content-wrapper {
  min-width: 0;
}

.article-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .article-actions-bar {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.article-actions-bar form {
  display: flex;
}

.article-actions-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-content-wrapper .card {
  margin-bottom: 0;
}

/* Accordion Tree - Dark Theme */
.accordion-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.accordion-node {
  position: relative;
}

.accordion-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
  font-size: 0.85rem;
  background: transparent;
  border: none;
  position: relative;
  width: 100%;
}

.accordion-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.accordion-node.current .accordion-link {
  color: var(--primary);
  font-weight: 600;
}

.accordion-node.visited .accordion-link {
  color: var(--text);
}

.accordion-branch {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.accordion-node.current .accordion-branch {
  color: var(--primary);
}

.accordion-marker {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 0.75rem;
}

.accordion-node.visited:not(.current) .accordion-marker {
  color: var(--text-muted);
}

.accordion-title {
  line-height: 1.3;
  word-break: break-word;
}

/* Responsive */
@media (max-width: 768px) {
  .article-shell {
    flex-direction: column;
  }

  .article-sidebar {
    position: static;
    width: 100%;
    flex: 0 0 auto;
  }

  .article-top-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    text-align: center;
  }

  .article-top-left {
    justify-content: center;
  }

  .article-top-title {
    font-size: 1.25rem;
  }
}

/* Quiz Navigation - Dark Theme */
.quiz-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.nav-progress {
  font-weight: 600;
  color: var(--text);
}

.quiz-navigation .btn-group {
  gap: 0.5rem;
}

.quiz-navigation button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Profile Accordion - Dark Theme */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.accordion-item:hover {
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.accordion-item.expanded {
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.15);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.accordion-header-content {
  flex: 1;
  min-width: 0;
}

.accordion-item .accordion-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.accordion-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.accordion-score {
  font-weight: 600;
}

.accordion-score.passed {
  color: var(--success);
}

.accordion-score.failed {
  color: var(--error);
}

.accordion-progress {
  color: var(--primary);
}

.accordion-articles-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-chip.mastered {
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
}

.article-chip.more {
  background: rgba(129, 140, 248, 0.2);
  color: var(--primary);
}

.accordion-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.accordion-canvas {
  padding-top: 0.75rem;
}

.canvas-legend {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 10;
}

/* Accordion tree content - Dark Theme */
.accordion-tree-content {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
}

.tree-legend-inline {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

.accordion-tree-content .accordion-node {
  margin-bottom: 2px;
}

.accordion-tree-content .accordion-node.mastered .accordion-link {
  color: var(--success);
}

.accordion-tree-content .accordion-node.start .accordion-link {
  color: var(--primary);
}

.accordion-tree-content .accordion-link {
  cursor: default;
}

.accordion-tree-content .accordion-marker.mastered {
  color: var(--success);
}

@media (max-width: 600px) {
  .accordion-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Auth Form Styles - Dark Theme */
.auth-form {
  text-align: left;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input:disabled {
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-toggle p {
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--primary-dark);
}

.alert-success {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--success);
}

/* User Menu in Header - Dark Theme */
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-email {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

header nav {
  display: flex;
  align-items: center;
}

/* Dropdown Menu - Dark Theme */
.dropdown-menu {
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
  color: var(--text);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-trigger {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  transition: all 0.2s ease;
  text-decoration: none;
}

.user-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Language Selector */
.language-selector {
  position: relative;
}

.language-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.language-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.lang-flag {
  font-size: 1rem;
}

.lang-code {
  font-weight: 600;
}

.lang-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 140px;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 100;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: background 0.2s;
  text-align: left;
}

.language-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.language-option.active {
  background: rgba(129, 140, 248, 0.2);
  color: var(--primary);
}

.lang-name {
  flex: 1;
}

/* Light Theme Styles */
body.light-theme {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  background-attachment: fixed;
}

body.light-theme .dark-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .logo-link {
  color: #1e293b;
}

body.light-theme .card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .card h2,
body.light-theme .card h3 {
  color: #1e293b;
}

body.light-theme .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme .language-trigger {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

body.light-theme .language-trigger:hover {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme .language-dropdown {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body.light-theme .language-option {
  color: #1e293b;
}

body.light-theme .language-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .btn-dark {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

body.light-theme .btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #374151;
}

body.light-theme .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.light-theme .article-top-bar-embedded {
  background: transparent;
  border: none;
}

body.light-theme .btn-success-muted {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
  color: #166534;
}

body.light-theme .btn-success-muted:hover {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.4);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

body.light-theme .btn-badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #4338ca;
}

body.light-theme .stat-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .question {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .question h3,
body.light-theme .question label {
  color: #1e293b;
}

body.light-theme .accordion-item {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .accordion-header {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .accordion-header:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .accordion-link {
  background: transparent;
}

body.light-theme .article-top-bar,
body.light-theme .article-sidebar {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .breadcrumb {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .quiz-progress,
body.light-theme .quiz-navigation {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .progress-bar {
  background: rgba(0, 0, 0, 0.1);
}

body.light-theme input[type="text"],
body.light-theme input[type="email"],
body.light-theme input[type="password"],
body.light-theme .question textarea {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

body.light-theme .form-group input {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

body.light-theme .article-content {
  color: #1e293b;
}

body.light-theme .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

body.light-theme .dropdown-item {
  color: #1e293b;
}

body.light-theme .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .user-trigger {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

/* =====================================================
   MODERN GRADIENT LANDING PAGE
   ===================================================== */

/* Transparent Header for Landing Page */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem;
  background: transparent;
  box-sizing: border-box;
}

.landing-header .header-bar {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.landing-header .logo-link {
  color: white;
}

.landing-header .logo-link:hover {
  color: var(--primary);
}

.landing-page-modern {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  overflow: hidden;
  background-color: #050505;
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

body.light-theme.landing-page-modern {
  background-color: var(--bg);
  color: var(--text);
}

body.light-theme.landing-page-modern .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}

body.light-theme.landing-page-modern .noise-overlay {
  opacity: 0.04;
}

body.light-theme .landing-header .logo-link {
  color: var(--text);
}

body.light-theme .landing-header .logo-link:hover {
  color: var(--primary);
}

body.light-theme.landing-page-modern .landing-title {
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

body.light-theme.landing-page-modern .landing-subtitle {
  color: var(--text-muted);
}

body.light-theme.landing-page-modern .category-card-modern {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text);
}

body.light-theme.landing-page-modern .category-name-modern {
  color: var(--text);
}

body.light-theme.landing-page-modern .category-count-modern {
  color: var(--text-muted);
}

body.light-theme.landing-page-modern .alert-modern {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text);
}

.gradient-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.sphere-1 {
  width: 70vw;
  height: 70vw;
  background: linear-gradient(
    40deg,
    rgba(255, 100, 150, 0.25),
    rgba(255, 150, 100, 0.15)
  );
  top: -30%;
  left: -20%;
  animation: float-1 15s ease-in-out infinite alternate;
}

.sphere-2 {
  width: 80vw;
  height: 80vw;
  background: linear-gradient(
    240deg,
    rgba(100, 80, 200, 0.25),
    rgba(80, 160, 220, 0.15)
  );
  bottom: -40%;
  right: -25%;
  animation: float-2 18s ease-in-out infinite alternate;
}

.sphere-3 {
  width: 50vw;
  height: 50vw;
  background: linear-gradient(
    120deg,
    rgba(140, 100, 200, 0.2),
    rgba(100, 180, 220, 0.1)
  );
  top: 50%;
  left: 15%;
  animation: float-3 20s ease-in-out infinite alternate;
}

.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

@keyframes float-2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-10%, -5%) scale(1.15);
  }
}

@keyframes float-3 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translate(-5%, 10%) scale(1.05);
    opacity: 0.6;
  }
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  z-index: 2;
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

body.light-theme .particle {
  background: #4f46e5 !important;
  box-shadow: 0 0 6px 2px rgba(99, 102, 241, 0.4);
}

/* Landing Content */
.landing-content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  max-width: 700px;
  padding: 2rem;
}

.landing-title {
  font-family:
    "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  font-size: 3.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  background: linear-gradient(to right, #fff, #acacac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.landing-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
}

.landing-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.landing-header-row > div:first-child {
  flex: 1;
}

.landing-header-row .landing-title {
  text-align: left;
}

.landing-header-row .landing-subtitle {
  text-align: left;
  margin-bottom: 0;
}

.admin-button {
  flex-shrink: 0;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .landing-header-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .landing-header-row .landing-title,
  .landing-header-row .landing-subtitle {
    text-align: center;
  }

  .admin-button {
    align-self: center;
  }
}

/* Category Grid Modern */
.category-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.category-card-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  color: white;
}

.category-card-modern:disabled,
.category-card-modern.category-card-modern--disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  pointer-events: none; /* no hover/click */
}

.category-card-modern:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(255, 58, 130, 0.2);
}

.category-card-modern:disabled:hover,
.category-card-modern.category-card-modern--disabled:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: none;
  box-shadow: none;
}

/* Completed category state */
.category-card-modern.category-card-modern--completed {
  cursor: default;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  position: relative;
  pointer-events: none;
}

.category-card-modern.category-card-modern--completed:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  transform: none;
  box-shadow: none;
}

.category-card-modern.category-card-modern--completed .category-count-modern {
  color: #22c55e;
  font-weight: 600;
}

.category-icon-modern {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.category-name-modern {
  font-weight: 600;
  font-size: 1rem;
  color: white;
  text-transform: capitalize;
}

.category-count-modern {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

/* Alert Modern */
.alert-modern {
  padding: 1rem;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 12px;
  color: #fca5a5;
  margin-bottom: 1.5rem;
}

/* Landing Actions */
.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Modern Buttons */
.btn-modern {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary-modern {
  background: linear-gradient(90deg, #ff3a82, #5233ff);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 58, 130, 0.3);
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 58, 130, 0.4);
}

.btn-secondary-modern {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-modern:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline-modern {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

.btn-outline-modern:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

/* User Badge */
.user-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Modern Landing */
@media (max-width: 600px) {
  .landing-title {
    font-size: 2.4rem;
  }

  .landing-subtitle {
    font-size: 1rem;
  }

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

  .landing-content {
    padding: 1rem;
  }

  .sphere-1 {
    width: 60vw;
    height: 60vw;
  }

  .sphere-2 {
    width: 65vw;
    height: 65vw;
  }

  .sphere-3 {
    width: 50vw;
    height: 50vw;
  }
}

/* Admin Panel Styles */
.admin-title {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.admin-header .admin-title {
  margin: 0;
}

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.05);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-tab-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  min-width: 1.25rem;
  text-align: center;
}

.admin-tab-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-generate-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.admin-generate-section .admin-section-title {
  margin-top: 0;
}

.admin-pending-section {
  margin-bottom: 2rem;
}

.admin-articles-section {
  margin-top: 2rem;
}

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

.admin-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-pending-count {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.admin-generate-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-form-select {
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.admin-form-input {
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.admin-count-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-count-input {
  width: 50px;
}

.admin-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-stats-centered {
  justify-content: center;
}

.admin-stat {
  text-align: center;
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.admin-stat-large {
  padding: 2rem 3rem;
}

.admin-stat-large .admin-stat-value {
  font-size: 3rem;
}

.admin-stat-large .admin-stat-label {
  font-size: 1rem;
  margin-top: 0.5rem;
}

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

.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-filter-bar .btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.btn-active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.admin-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.admin-category-group {
  margin-bottom: 2rem;
}

.admin-category-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
  display: block;
}

.admin-card:hover {
  border-color: var(--primary);
}

.admin-card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-new-card {
  border: 2px dashed var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.admin-new-card:hover {
  background: rgba(99, 102, 241, 0.1);
}

.admin-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.admin-badge-existing {
  background: rgba(113, 113, 122, 0.2);
  color: var(--text-muted);
}

.admin-badge-new {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.admin-badge-root {
  background: rgba(34, 197, 94, 0.3);
  color: var(--success);
  font-weight: 600;
}

.admin-badge-child {
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-muted);
  font-size: 0.65rem;
}

.admin-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
}

.admin-back:hover {
  text-decoration: underline;
}

.admin-article-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.admin-article-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.admin-article-category {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.admin-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-extract {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.admin-question-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--text-muted);
}

.admin-question-pending {
  border-left-color: var(--primary);
}

.admin-question-prompt {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.admin-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-options-label {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-options {
  list-style: none;
}

.admin-options li {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.admin-options li.correct {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success);
}

.admin-answer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary);
}

.admin-btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.admin-edit-form {
  max-width: 900px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.admin-form-textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.admin-form-textarea:focus,
.admin-form-input:focus,
.admin-form-select:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.admin-loader {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

.admin-loader-text {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.admin-loader-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-loader-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

.admin-progress-bar {
  width: 300px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

.admin-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

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

.admin-path-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 8px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.admin-path-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-path-stat-value {
  font-weight: 600;
  color: var(--primary);
}

.admin-preview-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-path-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  width: 320px;
  flex: 0 0 320px;
}

.admin-path-sidebar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.admin-path-tree {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-path-node {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.admin-path-node:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.admin-tree-item {
  position: relative;
}

.admin-tree-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.admin-tree-item:first-child::before {
  top: 50%;
}

.admin-tree-item:last-child::before {
  bottom: 50%;
}

.admin-tree-item:only-child::before {
  display: none;
}

.admin-path-tree > .admin-tree-item::before {
  display: none;
}

.admin-tree-children {
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid var(--border);
}

.admin-path-node.current {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  font-weight: 500;
}

.admin-path-node.visited {
  color: var(--success);
}

.admin-path-indicator {
  font-size: 0.7rem;
  flex-shrink: 0;
}

.admin-path-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.admin-preview-main {
  min-width: 0;
}

.admin-article-content {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

.admin-article-content .wiki-link {
  color: var(--primary);
  text-decoration: none;
  background: linear-gradient(to bottom, transparent 60%, var(--primary-glow) 60%);
  padding: 0 2px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.admin-article-content .wiki-link:hover {
  background: var(--primary-glow);
  color: var(--primary);
}

.admin-article-content .wiki-link-broken {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 2px;
  border-radius: 2px;
}

.admin-nav-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.admin-leaderboard-table {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.admin-leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-leaderboard-table th,
.admin-leaderboard-table td {
  padding: 0.875rem 1rem;
  text-align: left;
}

.admin-leaderboard-table th {
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.admin-leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.admin-leaderboard-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.admin-leaderboard-table tbody tr.top-three {
  background: rgba(255, 215, 0, 0.05);
}

.admin-leaderboard-table .rank {
  font-size: 1.1rem;
  font-weight: 700;
  width: 50px;
}

.admin-leaderboard-table .username {
  font-weight: 500;
}

.admin-leaderboard-table .completed {
  font-weight: 600;
  color: var(--primary);
}

.admin-leaderboard-table .correct {
  color: var(--text-muted);
}

.admin-leaderboard-table .accuracy-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-leaderboard-table .accuracy-badge.high {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.admin-leaderboard-table .accuracy-badge.medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.admin-leaderboard-table .accuracy-badge.low {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

@media (max-width: 900px) {
  .admin-preview-layout {
    grid-template-columns: 1fr;
  }

  .admin-path-sidebar {
    position: static;
  }

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

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

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

  .admin-leaderboard-table th,
  .admin-leaderboard-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
  }
}
