/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --primary: #7c3aed;
  --primary-rgb: 124, 58, 237;
  --primary-light: #a78bfa;
  --secondary: #3b82f6;
  --accent: #06b6d4;
  --dark-bg: #0a0a1a;
  --dark-surface: #1a1a3e;
  --dark-card: #252550;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Offset anchor-link scroll targets so they clear the fixed navbar */
  scroll-padding-top: 72px;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  text-align: center;
}
.big-box {
  transition: transform 0.3s ease-in;
}
.big-box {
  transition: transform 0.3s ease-in-out;
}

.big-box:hover {
  transform: scale(1.05);
}
.infinity-loader {
  font-size: 6rem;
  font-weight: 900;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.loading-bar {
  width: 300px;
  height: 6px;
  background: var(--dark-card);
  border-radius: 3px;
  margin: 20px auto;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  background: var(--gradient-1);
  width: 0%;
  animation: loadProgress 2s ease-in-out forwards;
}

@keyframes loadProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-1);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--glass-shadow);
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top-btn:hover {
  transform: translateY(-5px);
}

/* ===== AUTHENTICATION ===== */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 7rem 1rem 3rem;
  background:
    radial-gradient(
      circle at top left,
      rgba(6, 182, 212, 0.18),
      transparent 34rem
    ),
    radial-gradient(
      circle at bottom right,
      rgba(124, 58, 237, 0.2),
      transparent 32rem
    ),
    var(--dark-bg);
}

.auth-panel {
  width: min(100%, 460px);
  padding: 2rem;
  border-radius: 8px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-mark {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--gradient-1);
  color: white;
  font-family: "Orbitron", sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
}

.auth-brand h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.auth-brand p,
.auth-switch,
.form-group small {
  color: var(--text-secondary);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: grid;
  gap: 0.45rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  font: inherit;
  padding: 0.75rem 0.9rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

.auth-submit[data-loading="true"] {
  opacity: 0.75;
  cursor: wait;
}

.auth-message {
  min-height: 1.4rem;
  font-size: 0.94rem;
}

.auth-message.error {
  color: #fca5a5;
}

.auth-message.success {
  color: #86efac;
}

.auth-message.info {
  color: var(--text-secondary);
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
}

.auth-switch a {
  color: var(--primary-light);
  font-weight: 600;
}

.password-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.password-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: #ef4444;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.password-meter[data-score="1"] span {
  width: 20%;
}

.password-meter[data-score="2"] span {
  width: 40%;
  background: #f97316;
}

.password-meter[data-score="3"] span {
  width: 60%;
  background: #facc15;
}

.password-meter[data-score="4"] span {
  width: 80%;
  background: #22c55e;
}

.password-meter[data-score="5"] span {
  width: 100%;
  background: var(--gradient-4);
}

/* ===== NAVIGATION BAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.875rem 2rem;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 2rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.logo-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.75rem;
  align-items: center;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.nav-link:hover::after {
  width: 80%;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-toggle:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.dropdown-toggle[aria-expanded="true"] {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-icon {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}

.has-dropdown {
  position: relative;
}

.has-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 8px;
  background: transparent;
  z-index: 99;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  max-width: 280px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
  pointer-events: none;
  max-height: 65vh; 
  overflow-y: auto;
}

.dropdown-menu-end {
  left: auto;
  right: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--text-primary);
  background: var(--primary);
  outline: none;
}

.dropdown-item.nav-auth-link {
  border: none;
  background: none;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.dropdown-item.nav-auth-link:hover {
  background: var(--primary);
  color: var(--text-primary);
}

.dropdown-item i {
  font-size: 0.875rem;
  width: 16px;
  text-align: center;
  color: var(--accent);
}

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

.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0.5rem 0;
}

.nav-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-auth-link:hover {
  background: var(--primary);
  color: var(--text-primary);
  border-color: var(--primary);
}

.nav-cta {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--glass-border);
}

.nav-cta-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--glass-border);
}

.nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
}

.nav-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.dark-mode-btn,
.menu-toggle {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-btn:hover,
.menu-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
}

/* Hide on mobile */
.desktop-only {
  display: flex;
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 100vw;
    height: 100vh;
    background: var(--dark-bg);
    border-left: 1px solid var(--glass-border);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 5rem 1.5rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9995;
    overflow-y: auto;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--glass-border);
  }

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

  .nav-link,
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 1rem;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--dark-card);
    border-radius: 8px;
    margin: 0.5rem 0 0.5rem 0.5rem;
    padding: 0.25rem 0;
    max-width: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    pointer-events: auto;
  }

  .has-dropdown.open .dropdown-menu {
    max-height: 500px;
    padding: 0.5rem 0;
  }

  .dropdown-item {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-profile-dropdown .dropdown-menu-end {
    left: 0.5rem;
    right: 0;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .logo-title {
    font-size: 1rem;
  }

  .logo-text {
    font-size: 1.75rem;
  }

  .nav-links {
    width: 100%;
    max-width: 100%;
    padding: 4.5rem 1rem 2rem;
  }

  .nav-link,
  .dropdown-toggle {
    padding: 0.875rem 0.75rem;
    font-size: 0.9375rem;
  }

  .dropdown-item {
    padding: 0.75rem 1.25rem;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-links {
    gap: 0.25rem;
  }

  .nav-link,
  .dropdown-toggle {
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
  }
}

/* Active state for current page */
.nav-link.active,
.dropdown-toggle.active {
  color: var(--primary-light);
}

.nav-link.active::after,
.dropdown-toggle.active::after {
  width: 80%;
  background: var(--gradient-1);
}

/* Dropdown arrow rotation on mobile */
.has-dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

/* Focus visible for accessibility */
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.dropdown-item:focus-visible,
.nav-cta-btn:focus-visible,
.dark-mode-btn:focus-visible,
.menu-toggle:focus-visible,
.favorite-btn:focus-visible,
.notes-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dropdown-menu,
  .nav-links,
  .dropdown-toggle .dropdown-icon,
  .nav-link::after {
    transition: none;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2rem;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 72px;
}

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

/* Starfield effect */
.stars,
.stars2,
.stars3 {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
}

.stars {
  background-image:
    radial-gradient(2px 2px at 20px 30px, white, transparent),
    radial-gradient(
      2px 2px at 40px 70px,
      rgba(255, 255, 255, 0.8),
      transparent
    ),
    radial-gradient(2px 2px at 50px 160px, white, transparent),
    radial-gradient(2px 2px at 90px 40px, white, transparent),
    radial-gradient(
      2px 2px at 130px 80px,
      rgba(255, 255, 255, 0.8),
      transparent
    ),
    radial-gradient(2px 2px at 160px 120px, white, transparent);
  background-size: 200px 200px;
  animation: stars 120s linear infinite;
}

.stars2 {
  background-image:
    radial-gradient(
      1px 1px at 150px 150px,
      rgba(255, 255, 255, 0.6),
      transparent
    ),
    radial-gradient(1px 1px at 100px 50px, white, transparent),
    radial-gradient(
      1px 1px at 50px 200px,
      rgba(255, 255, 255, 0.6),
      transparent
    );
  background-size: 300px 300px;
  animation: stars 80s linear infinite reverse;
}

.stars3 {
  background-image:
    radial-gradient(
      3px 3px at 300px 400px,
      rgba(167, 139, 250, 0.8),
      transparent
    ),
    radial-gradient(2px 2px at 200px 600px, #3b82f6, transparent);
  background-size: 500px 500px;
  animation: stars 100s linear infinite;
}

@keyframes stars {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-1000px);
  }
}

.hero-content {
  max-width: 100%;
  text-align: center;
}

.hero-title {
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.main-title {
  font-family: "Orbitron", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 1rem;
}

.subtitle {
  display: block;
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 300;
}

.typing-container {
  height: 40px;
  margin: 2rem 0;
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.typing-text {
  color: var(--primary-light);
  font-weight: 600;
}

.typing-cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: space-around;
  margin-top: 3rem;
  gap: 2rem;
}

.stat-box {
  text-align: center;
  padding: 2.5rem;
  background: var(--glass-bg);
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  min-width: 0;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
  position: relative;
  /* Ensure anchor jumps land below the fixed navbar */
  scroll-margin-top: 72px;
}

/* Universal safety-net: any section/div with an id used as an anchor target */
section[id] {
  scroll-margin-top: 72px;
  /* Contain stacking contexts (backdrop-filter on cards) so they can't
     overflow onto the fixed navbar */
  isolation: isolate;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-icon {
  font-size: 2.5rem;
  background: none;
  -webkit-text-fill-color: initial;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* ===== TOPICS GRID ===== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.topic-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
}

.topic-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glass-shadow);
  border-color: var(--primary-light);
}

.topic-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.topic-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.topic-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.topic-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Topic Mastery Progress */
.topic-mastery {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--glass-border);
}

.mastery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.mastery-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.mastery-stats {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mastery-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.mastery-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-1);
  transition: width 0.6s ease;
}

.mastery-percentage {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* Color the fill based on progress level */
.mastery-fill[style*="width: 10"],
.mastery-fill[style*="width: 2"],
.mastery-fill[style*="width: 3"],
.mastery-fill[style*="width: 4"] {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.mastery-fill[style*="width: 5"],
.mastery-fill[style*="width: 6"],
.mastery-fill[style*="width: 7"] {
  background: linear-gradient(90deg, #f97316, #eab308);
}

.mastery-fill[style*="width: 8"],
.mastery-fill[style*="width: 9"],
.mastery-fill[style*="width: 100"] {
  background: linear-gradient(90deg, #22c55e, #06b6d4);
}

.difficulty-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.easy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.medium {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}
.hard {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ===== PRACTICE SECTION ===== */
.practice-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 400px;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-bar input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  padding-right: 3rem;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* ===== CLEAR SEARCH BUTTON ===== */

.clear-search-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);

  cursor: pointer;

  display: none;

  align-items: center;
  justify-content: center;

  font-size: 1rem;
  font-weight: bold;

  transition: all 0.3s ease;
}

.clear-search-btn:hover {
  background: rgba(255, 77, 109, 0.2);
  color: #ff4d6d;
  transform: translateY(-50%) scale(1.1);
}

.clear-search-btn.visible {
  display: flex;
}

.search-bar {
  position: relative;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Problem Counter CSS */
.problem-counter-container {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
  font-weight: 500;
}

.problem-counter-container span {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.problem-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
/* ===== RECENTLY VIEWED PROBLEMS ===== */

.recent-problem {
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.recent-problem:hover {
  transform: translateX(5px);
}

.recent-problem:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.problem-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glass-shadow);
  border-color: var(--accent);
}

/* ===== FAVORITE BUTTON ===== */

.favorite-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.3s ease;

  margin-left: auto;
  margin-right: 0.7rem;

  backdrop-filter: blur(10px);
}

.favorite-btn:hover {
  transform: scale(1.12);
  color: #ff4d6d;
  border-color: #ff4d6d;
  box-shadow: 0 0 15px rgba(255, 77, 109, 0.35);
}

.favorite-btn.active {
  background: rgba(255, 77, 109, 0.15);
  color: #ff4d6d;
  border-color: #ff4d6d;
}

.notes-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
  backdrop-filter: blur(10px);
}

.notes-btn:hover {
  transform: scale(1.12);
  color: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.35);
}

.notes-btn.active {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: #fbbf24;
}

.notes-btn i {
  pointer-events: none;
}

.favorite-btn i {
  pointer-events: none;
}

/* Favorites filter special style */

.filter-btn[data-filter="favorites"] {
  color: #ff4d6d;
}

.filter-btn[data-filter="favorites"].active {
  background: #ff4d6d;
  color: white;
  border-color: #ff4d6d;
}

.problem-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.6rem;
}

.problem-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.problem-id {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.problem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.problem-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: var(--dark-card);
  color: var(--accent);
}

.problem-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.problem-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.solve-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  background: var(--gradient-3);
  border: none;
  color: var(--dark-bg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.solve-btn:hover {
  transform: scale(1.05);
}

/* ===== ROADMAP SECTION ===== */
.roadmap-container {
  position: relative;
  padding: 2rem 0;
}

.roadmap-progress {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--dark-card);
  transform: translateY(-50%);
  z-index: 0;
}

#roadmapProgress {
  height: 100%;
  background: var(--gradient-4);
  width: 0%;
  transition: width 1.5s ease;
  border-radius: 3px;
}

.roadmap-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.stage {
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.stage.active {
  background: var(--gradient-1);
  transform: scale(1.05);
}

.stage-marker {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--dark-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 3px solid var(--accent);
}

.stage.active .stage-marker {
  background: var(--dark-bg);
  border-color: var(--text-primary);
}

.stage h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.stage ul {
  list-style: none;
  text-align: left;
}

.stage ul li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.stage ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== ROADMAP TABS & TIMELINE ===== */
.roadmap-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.roadmap-tab {
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.roadmap-tab.active,
.roadmap-tab:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.roadmap-content {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.roadmap-content.active {
  display: block;
  opacity: 1;
}

.roadmap-timeline {
  position: relative;
  padding-left: 3.5rem;
  margin: 2rem 0;
}

.roadmap-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.roadmap-step {
  position: relative;
  margin-bottom: 2.5rem;
}

.step-marker-dot {
  position: absolute;
  left: -3.5rem;
  top: 0.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--dark-surface);
  border: 3px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 1;
  transition: all 0.3s ease;
}

.roadmap-step.completed .step-marker-dot {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.roadmap-step.active .step-marker-dot {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.roadmap-step.locked .step-marker-dot {
  opacity: 0.6;
}

.roadmap-step-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.roadmap-step.locked .roadmap-step-card {
  opacity: 0.6;
  pointer-events: none;
}

.roadmap-step.active .roadmap-step-card {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.15);
}

.roadmap-step.completed .roadmap-step-card {
  border-color: rgba(34, 197, 94, 0.4);
}

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

.step-number {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
}

.step-status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.step-status-tag.locked-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.step-status-tag.active-tag {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary);
}

.step-status-tag.completed-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.step-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.step-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.step-progress {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  max-width: 250px;
}

.step-progress-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.step-progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--dark-card);
  border-radius: 3px;
  overflow: hidden;
}

.step-progress-bar-fill {
  height: 100%;
  background: var(--gradient-4);
  width: 0%;
  transition: width 0.6s ease;
  border-radius: 3px;
}

.roadmap-step.completed .step-progress-bar-fill {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

/* ===== ROADMAP DETAIL MODAL ===== */
.roadmap-modal-content {
  max-width: 750px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
}

.step-badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  background: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.8rem;
}

.roadmap-step-theory h4,
.roadmap-step-complexity h4,
.roadmap-step-quiz h4,
.roadmap-step-problems h4 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.4rem;
}

.theory-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.theory-text p {
  margin-bottom: 0.8rem;
}

.theory-text strong {
  color: var(--text-primary);
}

.complexity-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.complexity-table th,
.complexity-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.complexity-table th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.complexity-table td {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.roadmap-problems-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.roadmap-problem-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.roadmap-problem-item:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.roadmap-problem-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.roadmap-problem-title {
  font-weight: 600;
  color: var(--text-primary);
}

.roadmap-problem-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.roadmap-problem-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.roadmap-problem-status.completed {
  color: #22c55e;
}

.roadmap-problem-status.pending {
  color: var(--text-secondary);
}

/* Roadmap Quiz Styles */
.quiz-question-container {
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.2rem;
}

.quiz-question-text {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.quiz-options-list {
  list-style: none;
  padding: 0;
}

.quiz-option-item {
  padding: 0.6rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.quiz-option-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.quiz-option-item.selected {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
}

.quiz-option-item.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  color: white;
}

.quiz-option-item.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: white;
}

.quiz-feedback {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.quiz-feedback.correct {
  color: #22c55e;
}

.quiz-feedback.incorrect {
  color: #ef4444;
}

.quiz-instruction-text,
.problems-instruction-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}

#roadmapStepSubmitQuizBtn {
  margin-bottom: 1.5rem;
}

/* ===== INTERVIEW SECTION ===== */
.interview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.interview-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.interview-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.interview-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.interview-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  position: relative;
}

.interview-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
}

.card-btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.card-btn:hover {
  background: var(--accent);
  color: var(--dark-bg);
}

/* ===== DASHBOARD SECTION ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.dashboard-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(124,58,237,.25);
}

.dashboard-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  position: relative;
  transition: color 0.3s ease;
}

.dashboard-card:hover h3 {
  color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item {
  border-radius: 14px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255,255,255,0.05);
  transform: scale(1.05);
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stat-value {
  transition: transform 0.3s ease;
}

.stat-item:hover .stat-value {
  transform: scale(1.15);
}

.activity-list,
.leaderboard-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item,
.leaderboard-item {
  padding: 1rem;
  margin-bottom: 0.8rem;
  background: var(--dark-card);
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.leaderboard-item.current-user {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.leader-rank {
  min-width: 3rem;
  font-weight: 700;
  color: var(--accent);
}

.leader-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.leader-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.leaderboard-item {
  flex-wrap: wrap;
}

.leader-xp {
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}

.activity-item .activity-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-item {
  justify-content: space-between;
}

.activity-icon {
  color: var(--accent);
}

.badges-container,
.badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.badge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gradient-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.badge:hover {
  transform: scale(1.1);
}

.badge.locked {
  background: var(--dark-card);
  opacity: 0.5;
}

.badge-tooltip {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-card);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: normal;
  text-align: center;
  width: min(220px, max-content);
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.badge:hover .badge-tooltip,
.badge:focus .badge-tooltip {
  opacity: 1;
}

.empty-state {
  color: var(--text-secondary);
  font-style: italic;
}

/* ===== ACTIVITY HEATMAP ===== */
.heatmap-card {
  grid-column: 1 / -1;
}

.heatmap-card .heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.heatmap-card .legend-swatches {
  display: flex;
  gap: 4px;
}

.heatmap-card .legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
}

.heatmap-card .legend-swatch[data-level="0"] {
  background: rgba(255, 255, 255, 0.05);
}

.heatmap-card .legend-swatch[data-level="1"] {
  background: rgba(124, 58, 237, 0.35);
}

.heatmap-card .legend-swatch[data-level="2"] {
  background: rgba(124, 58, 237, 0.6);
}

.heatmap-card .legend-swatch[data-level="3"] {
  background: rgba(124, 58, 237, 0.8);
}

.heatmap-card .legend-swatch[data-level="4"] {
  background: rgba(124, 58, 237, 1);
}

.heatmap-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: auto;
  padding: 0.5rem 0;
  position: relative;
}

.heatmap-months-row {
  display: grid;
  grid-template-columns: 30px repeat(52, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 2px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1;
  min-height: 14px;
}

.heatmap-month-label {
  grid-row: 1;
  white-space: nowrap;
  overflow: visible;
}

.heatmap-grid {
  display: flex;
  gap: 3px;
  width: 100%;
  overflow: hidden;
  min-width: 750px;
}

.heatmap-container {
  overflow-x: auto;
}

.heatmap-weekday-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 6px;
  min-width: 26px;
  flex-shrink: 0;
}

.heatmap-weekday-label {
  flex: 1;
  min-width: 26px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: visible;
  white-space: nowrap;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 0;
  min-width: 0;
}

.heatmap-day {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
  flex-shrink: 0;
}

.heatmap-day:hover {
  border-color: var(--accent);
  filter: brightness(1.3);
}

.heatmap-day[data-level="0"] {
  background: rgba(255, 255, 255, 0.05);
}

.heatmap-day[data-level="1"] {
  background: rgba(124, 58, 237, 0.35);
}

.heatmap-day[data-level="2"] {
  background: rgba(124, 58, 237, 0.6);
}

.heatmap-day[data-level="3"] {
  background: rgba(124, 58, 237, 0.8);
}

.heatmap-day[data-level="4"] {
  background: rgba(124, 58, 237, 1);
}

.heatmap-day[data-future="true"] {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.heatmap-day[data-future="true"]:hover {
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.heatmap-tooltip {
  position: fixed;
  background: var(--dark-card);
  color: var(--text-primary);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 99999;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  left: 0;
  top: 0;
}

.heatmap-tooltip.visible {
  opacity: 1;
}

.heatmap-tooltip strong {
  color: var(--accent);
  display: block;
  margin-bottom: 0.2rem;
}

/* ===== GAMIFICATION SECTION ===== */
.gamification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.xp-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.xp-bar-container {
  position: relative;
  height: 30px;
  background: var(--dark-card);
  border-radius: 15px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.xp-bar {
  height: 100%;
  background: var(--gradient-4);
  width: 0%;
  transition: width 1s ease;
  border-radius: 15px;
}

.xp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.level-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--gradient-2);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
}

.badges-showcase {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.badge-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.badge-lg:hover {
  transform: scale(1.1) rotate(10deg);
}

#dailyChallengeCard {
  min-height: 250px;
  position: relative;
  overflow: hidden;
}

#dailyChallengeCard p {
  margin-bottom: 1rem;
}

#dailyChallengeCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.08),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

#dailyChallengeCard:hover::before {
  transform: translateX(100%);
}


.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.profile-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.profile-level {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.profile-join {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.profile-stats {
  display: grid;
  /* Automatically wraps columns if they shrink below 110px */
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.8rem; /* Slightly reduced gap for better fit */
  margin-bottom: 1.5rem;
}

.profile-stat {
  text-align: center;
  padding: 0.8rem; /* Slightly reduced padding to prevent text squishing */
  background: var(--dark-card);
  border-radius: 12px;
}

.profile-stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bar-container {
  padding: 0.5rem;
  background: var(--dark-card);
  border-radius: 10px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--dark-surface);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-4);
  border-radius: 5px;
  transition: width 1s ease;
  width: 0%;
}
/* ===== CHATBOT WIDGET ===== */
.chatbot-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-1);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

.chatbot-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--dark-surface);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chatbot-window.hidden {
  display: none;
}

.chatbot-header {
  background: var(--gradient-1);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h4 {
  font-size: 1.1rem;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.8rem;
  border-radius: 15px;
  animation: fadeIn 0.3s ease;
}

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

.message.bot {
  align-self: flex-start;
  background: var(--dark-card);
  color: var(--text-primary);
}

.message.user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
}

.chatbot-input {
  padding: 1rem;
  background: var(--dark-card);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text-primary);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chatbot-input button:hover {
  background: var(--primary-light);
}

.quick-questions {
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--dark-card);
}

.quick-q {
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quick-q:hover {
  background: var(--primary);
  color: white;
}

/* ===== IMPROVED ALGO ASSISTANT ===== */

.assistant-response h4 {
  color: var(--accent);
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.assistant-response p {
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.assistant-response pre {
  background: #111827;
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  border-left: 3px solid var(--primary);
}

.assistant-response code {
  color: #22c55e;
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
}

.message.loading {
  opacity: 0.8;
  animation: pulse-message 1s infinite;
}

@keyframes pulse-message {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.chatbot-messages {
  scroll-behavior: smooth;
}

.message.bot {
  line-height: 1.6;
}

.message.bot pre {
  margin-top: 0.8rem;
}

.message.bot::-webkit-scrollbar {
  height: 6px;
}

.message.bot::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--dark-surface);
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.modal-header {
  padding: 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--dark-surface);
  z-index: 10;
}

.modal-header h3 {
  font-size: 1.8rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-primary);
}

#notesEditor {
  width: 100%;
  min-height: 200px;
  background: var(--dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem;
  color: var(--text-primary);
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  resize: vertical;
  line-height: 1.6;
}

#notesEditor:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.modal-body {
  padding: 2rem;
}

/* ===== NOTES MODAL ===== */

.notes-modal-content {
  max-width: 900px;
}

.modal-body label {
  display: block;

  margin-bottom: 1rem;

  font-size: 1rem;
  font-weight: 600;

  color: var(--text-primary);
}

.notes-textarea {
  width: 100%;

  min-height: 220px;

  padding: 1rem 1.2rem;

  border-radius: 14px;

  border: 1px solid var(--glass-border);

  background: rgba(255, 255, 255, 0.05);

  color: var(--text-primary);

  font-size: 1rem;

  font-family: "Poppins", sans-serif;

  line-height: 1.7;

  resize: vertical;

  outline: none;

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.notes-textarea:focus {
  border-color: var(--primary);

  background: rgba(255, 255, 255, 0.08);

  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.notes-textarea::placeholder {
  color: var(--text-secondary);

  line-height: 1.6;
}
.topic-theory,
.topic-problems,
.topic-difficulty {
  margin-bottom: 2rem;
}

.topic-theory h4,
.topic-problems h4,
.topic-difficulty h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.topic-theory p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.topic-problems ul {
  list-style: none;
}

.topic-problems li {
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  background: var(--dark-card);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.topic-problems li:hover {
  background: var(--primary);
  transform: translateX(5px);
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--glass-border);
  text-align: right;
  position: sticky;
  bottom: 0;
  background: var(--dark-surface);
}

/* ===== QUIZ EDITOR MODAL ===== */
/* ===== QUIZ LOADING SCREEN ===== */
.quiz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
}

.quiz-loading h3 {
    font-family: Orbitron, sans-serif;
    font-size: 1.6rem;
    margin-top: 1rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
  background-clip: text;
    -webkit-text-fill-color: transparent;
}

#loadingTopicName {
    font-family: 'Fira Code', monospace;
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}
#quizEditorModal {
  z-index: 3000;
}
#quizEditorModal.active {
  display: flex;
}

.modal.quiz-modal.active {
  display: flex;
}

.quiz-modal-content {
  max-width: 1000px;
  width: 95%;
  max-height: 95vh;
  border-radius: 20px;
  overflow-y: auto;
  overflow-x: hidden;
}

.quiz-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--dark-surface);
  z-index: 10;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-problem-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quiz-topic-badge {
  background: var(--primary);
  color: var(--dark-bg);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quiz-difficulty {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.quiz-modal-header h3 {
  width: 100%;
  font-size: 1.5rem;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.5rem 0 0 0;
}

.quiz-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.quiz-modal-close:hover {
  color: var(--text-primary);
}

.quiz-modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.quiz-layout {
  display: flex;
  min-height: 500px;
  height: 100%;
}

.quiz-problem-panel {
  flex: 1;
  padding: 2rem;
  border-right: 1px solid var(--glass-border);
  background: var(--dark-bg);
  min-width: 0;
  overflow-y: auto;
}

.quiz-editor-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.problem-description h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.problem-description p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.problem-examples h5 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.problem-examples {
  background: var(--dark-card);
  padding: 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background: var(--dark-surface);
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
  gap: 0.8rem;
}

.language-select {
  background: var(--dark-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
}

.language-select:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.editor-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--dark-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.editor-btn:hover {
  background: var(--primary);
  color: var(--dark-bg);
  border-color: var(--primary);
}

.code-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--dark-bg);
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 0 0 10px 10px;
}

.editor-container {
    flex: 1;
    display: flex;
    position: relative;
    background: var(--dark-bg);
    min-height: 0;
}


.code-editor {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    overflow: hidden;
}

.code-textarea {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 45px;
    right: 0;
    width: calc(100% - 45px);
    height: 100%;
    padding: 1rem 1.5rem;
    margin: 0;
    background: transparent;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    caret-color: var(--text-primary);
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
    word-spacing: normal;
    border: none;
    outline: none;
    resize: none;
    tab-size: 4;
    overflow: auto;
    white-space: pre;
    overflow-x: auto;
    z-index: 2;
    box-sizing: border-box;
}

.code-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    -webkit-text-fill-color: var(--text-secondary);
}

.line-numbers {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 45px;
  background: var(--dark-surface);
  border-right: 1px solid var(--glass-border);
  padding: 1rem 0.5rem;
  text-align: right;
  color: var(--text-secondary);
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;
  user-select: none;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
    white-space: pre;
    box-sizing: border-box;
}

.editor-shortcuts {
  padding: 0.5rem 1.5rem;
  background: var(--dark-surface);
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: flex;
  gap: 1.5rem;
}

.editor-shortcuts kbd {
  background: var(--dark-card);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
}

.quiz-modal-footer {
  padding: 0;
  border-top: 1px solid var(--glass-border);
}

.quiz-output-container {
  background: var(--dark-surface);
}

.output-header {
  padding: 0.8rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.output-header:hover {
  background: rgba(0, 0, 0, 0.3);
}

.clear-output-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.clear-output-btn:hover {
  color: #ef4444;
}

.output-content {
  padding: 1rem 1.5rem;
  font-family: "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  color: var(--text-secondary);
}

.output-placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
  font-style: italic;
}

.output-success {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  border-left: 3px solid #22c55e;
  white-space: pre-wrap;
}

.output-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  border-left: 3px solid #ef4444;
  white-space: pre-wrap;
}

.output-running {
  color: var(--accent);
  padding: 1rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  border-left: 3px solid var(--accent);
}

.test-cases-container {
  border-top: 1px solid var(--glass-border);
  padding: 1rem;
  max-height: 150px;
  overflow-y: auto;
}

.test-case {
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  background: var(--dark-card);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  transition: all 0.2s ease;
}

.test-case:last-child {
  margin-bottom: 0;
}

.test-case:hover {
  transform: translateX(3px);
}

.test-case.passed {
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.test-case.failed {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.quiz-actions {
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background: var(--dark-surface);
}

.problem-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer {
  background: var(--dark-surface);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-light);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.8rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text-primary);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-3);
  border: none;
  color: var(--dark-bg);
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  transform: scale(1.1);
}

/* ===== NEWSLETTER FORM VALIDATION ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.newsletter-error {
  display: block;
  width: 100%;
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 6px;
  min-height: 1.2em;
}

.newsletter-form input.input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.newsletter-form input.input-success {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

/* ===== QUIZ SECTION ===== */
.quiz-section {
  background: linear-gradient(
    180deg,
    var(--dark-bg) 0%,
    var(--dark-surface) 100%
  );
  padding: 6rem 2rem;
  position: relative;
  scroll-margin-top: 72px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.quiz-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    pointer-events: auto !important;
    display: flex;
  flex-direction: column;
  min-height: 320px;
}
.start-quiz-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

/* .quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-4);
} */
 
.quiz-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-4);
}


.quiz-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glass-shadow);
  border-color: var(--accent);
}

.quiz-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.quiz-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.quiz-card-desc {

    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    pointer-events: none;

  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;

}

.quiz-card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.quiz-count {
  color: var(--text-secondary);
}

.quiz-progress-bar {
  height: 8px;
  background: var(--dark-card);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gradient-4);
  width: 0%;
  transition: width 1s ease;
  border-radius: 4px;
}

.quiz-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.quiz-stats strong {
  color: var(--accent);
}

.start-quiz-btn {
  width: 100%;
  justify-content: center;
}

/* ===== QUIZ MODAL ===== */
.modal.quiz-modal {
  z-index: 3000;
}

.modal.quiz-modal.active {
  display: flex;
}

.quiz-modal-content {
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quiz-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--dark-surface);
  z-index: 10;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-modal-header h3 {
  width: 100%;
  font-size: 1.5rem;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0.5rem 0 0 0;
}

.quiz-modal-body {
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.quiz-problem-panel {
  flex: 1.5;
  min-width: 0;
  padding: 2rem;
  background: var(--dark-bg);
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
}

.quiz-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quiz-progress-bar-container {
  height: 8px;
  background: var(--dark-card);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--gradient-1);
  width: 10%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

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

.quiz-timer-box,
.quiz-best-time-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);

  padding: 0.7rem 1rem;
  border-radius: 14px;

  display: flex;
  align-items: center;
  gap: 0.7rem;

  min-width: 150px;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.quiz-timer-box i,
.quiz-best-time-box i {
  color: var(--accent);
  font-size: 1rem;
}

.quiz-timer-content,
.quiz-best-time-content {
  display: flex;
  flex-direction: column;
}

.quiz-timer-label,
.quiz-best-time-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.quiz-timer,
.quiz-best-time {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "Orbitron", sans-serif;
}

.quiz-counter {
  color: var(--text-secondary);
  font-size: 0.9rem;

  padding: 0.7rem 1rem;

  background: var(--glass-bg);

  border-radius: 14px;

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(10px);

  font-weight: 600;
}

.quiz-timer-box,
.quiz-best-time-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);

  padding: 0.7rem 1rem;
  border-radius: 14px;

  display: flex;
  align-items: center;
  gap: 0.7rem;

  min-width: 150px;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.quiz-timer-box i,
.quiz-best-time-box i {
  color: var(--accent);
  font-size: 1rem;
}

.quiz-timer-content,
.quiz-best-time-content {
  display: flex;
  flex-direction: column;
}

.timer-label,
.quiz-timer-label,
.quiz-best-time-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.timer-value,
.quiz-timer,
.quiz-best-time {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: Orbitron, sans-serif;
}

.quiz-counter {
  color: var(--text-secondary);
  font-size: 0.9rem;

  padding: 0.7rem 1rem;

  background: var(--glass-bg);

  border-radius: 14px;

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(10px);

  font-weight: 600;
}

.quiz-question {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.6;
  clear: both;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--dark-card);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateX(5px);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.2);
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.option-letter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary-light);
  flex-shrink: 0;
}

.quiz-option.correct .option-letter {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
}

.quiz-option.incorrect .option-letter {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.option-text {
  color: var(--text-primary);
  line-height: 1.5;
}

/* Quiz Info Panel */
.quiz-info-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 20px;
  margin: 1.5rem;
}

.quiz-info-panel h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.quiz-info-panel ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.quiz-info-panel ul li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.quiz-info-panel ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
}


.quiz-xp-display {
  background: var(--gradient-4);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--dark-bg);
  font-size: 1rem;
}

.quiz-xp-display i {
  margin-right: 0.5rem;
}

/* Quiz Result */
.quiz-result {
  text-align: center;
  padding: 2rem;
  width: 100%;
  color: white;
}

.quiz-result h3,
.quiz-result p,
.quiz-result span {
  color: white;
}

.quiz-result.hidden {
  display: none;
}

.quiz-result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.quiz-result-icon {
  font-size: 4rem;
  animation: bounce 1s ease;
}

.quiz-result h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.quiz-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
}

.score-number {
  font-size: 3rem;
  font-weight: bold;
  color: #00d4ff;
}

.xp-gained {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}

.quiz-time-result {
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.8rem 1.2rem;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid var(--glass-border);

  backdrop-filter: blur(10px);
}

.quiz-time-result strong {
  color: var(--accent);
  font-family: "Orbitron", sans-serif;
}

.quiz-review-container {
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
}

.review-item {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.review-question {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.review-answer,
.review-correct,
.review-explanation {
  margin: 8px 0;
  line-height: 1.6;
}

/* Profile Edit Modal */
.profile-edit-modal {
  max-width: 500px;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.avatar-selector h4,
.name-editor label {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  display: block;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.avatar-option {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 3px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-option:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--accent);
  background: var(--gradient-1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.name-editor input {
  width: 100%;
  padding: 1rem;
  background: var(--dark-card);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.name-editor input:focus {
  outline: none;
  border-color: var(--accent);
}

.name-editor input::placeholder {
  color: var(--text-secondary);
}

/* Profile edit button */
.profile-edit-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-edit-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.profile-card {
  position: relative;
}

.profile-card:hover .profile-avatar {
  transform: scale(1.1) rotate(8deg);
}

/* ====== FOOTER QUESTIONS ====== */
.footer-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-question {
  padding: 0.6rem 1rem;
  border-radius: 15px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-question:hover {
  background: var(--primary);
  color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .main-title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.3rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: visible;
  }

  .stat-box {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
  }

  .roadmap-stages {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .progress-bar {
    display: none;
  }

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

  .search-bar {
    max-width: 100%;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
  }

  .chatbot-window {
    width: 300px;
    height: 450px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .newsletter-form {
    justify-content: center;
  }

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

  .quiz-layout {
    flex-direction: column;
  }

  .quiz-editor-panel {
    order: -1;
  }

  .avatar-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .profile-edit-modal .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .quiz-top-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quiz-timer-box,
  .quiz-best-time-box {
    width: 100%;
    min-width: 0;
  }

  .quiz-counter {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4rem 1rem;
    scroll-margin-top: 64px;
  }

  section[id] {
    scroll-margin-top: 64px;
  }

  .navbar {
    padding: 1rem;
  }

  .logo-title {
    display: none;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ===== DARK/LIGHT MODE ===== */
body.light-mode {
  --dark-bg: #ffffff;
  --dark-surface: #f8fafc;
  --dark-card: #e2e8f0;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* ADD THIS BELOW — fixes navbar hardcoded backgrounds */
body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-links {
  background: #ffffff;
}

body.light-mode .logo-title {
  color: #1a202c;
}

body.light-mode .nav-link,
body.light-mode .dropdown-toggle {
  color: #4a5568;
}

body.light-mode .nav-link:hover,
body.light-mode .dropdown-toggle:hover {
  color: #1a202c;
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .dropdown-menu {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .dropdown-item {
  color: #4a5568;
}

body.light-mode .dropdown-item:hover {
  background: var(--primary);
  color: white;
}

body.light-mode .dark-mode-btn,
body.light-mode .menu-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a202c;
}

body.light-mode .nav-auth-link {
  color: #4a5568;
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.03);
}

body.light-mode .nav-auth-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-card);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-1);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  padding: 0.8rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.output-info {
  color: var(--accent);
  padding: 1rem;
  border-left: 3px solid var(--accent);
  margin: 0.5rem 1rem;
}

.output-warning {
  color: #fbbf24;
  padding: 1rem;
  border-left: 3px solid #fbbf24;
  margin: 0.5rem 1rem;
}

.output-legend {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.output-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.output-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.syntax-highlight {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 45px;
    right: 0;
    width: calc(100% - 45px);
    height: 100%;
    padding: 1rem 1.5rem;
    margin: 0;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
    word-spacing: normal;
    white-space: pre;
    pointer-events: none;
    overflow: hidden;
    color: var(--text-primary);
    z-index: 1;
    box-sizing: border-box;
    background: transparent;
}

.output-panel {
    background: var(--dark-surface);
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.output-panel.collapsed .output-content,
.output-panel.collapsed .test-cases-container {
    display: none;
}

.syntax-highlight .token.keyword {
  color: #c792ea;
 
}
.syntax-highlight .token.string {
  color: #c3e88d;
}
.syntax-highlight .token.number {
  color: #f78c6c;
}
.syntax-highlight .token.comment {
  color: #546e7a;
 
}
.syntax-highlight .token.operator {
  color: #89ddff;
}
.syntax-highlight .token.function {
  color: #82aaff;
}

.syntax-highlight-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Editor line highlight */
.code-textarea:focus ~ .syntax-highlight {
  display: block;
}

/* Code completion dropdown */
.code-completion {
  position: absolute;
  bottom: 200px;
  left: 100px;
  width: 300px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
  display: none;
  z-index: 10;
}

.code-completion.active {
  display: block;
}

.completion-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: background 0.2s ease;
}

.completion-item:hover,
.completion-item.selected {
  background: rgba(124, 58, 237, 0.2);
}

.completion-type {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  background: var(--glass-bg);
  border-radius: 4px;
}

.completion-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Editor minimap */
.editor-minimap {
  width: 80px;
  background: var(--dark-surface);
  border-left: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.minimap-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 2px;
  line-height: 2px;
  color: var(--text-secondary);
  opacity: 0.6;
  white-space: pre;
  padding: 0.5rem;
}

/* Editor tabs */
.editor-tabs {
  display: flex;
  background: var(--dark-surface);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 1rem;
}

.editor-tab {
  padding: 0.8rem 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-tab.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
}

.editor-tab:hover {
  color: var(--text-primary);
}

.tab-close {
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.editor-tab:hover .tab-close {
  opacity: 1;
}

/* Status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  background: var(--primary);
  color: white;
  font-size: 0.8rem;
  position: relative;
  z-index: 5;
}

.status-left,
.status-right {
  display: flex;
  gap: 1.5rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.9;
}

/* Matching brackets highlight */
.matching-bracket {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 2px;
}

/* Code folding */
.fold-region {
  color: var(--text-secondary);
  cursor: pointer;
}

.fold-region:hover {
  color: var(--accent);
}

/* Terminal/Console output styling */
.console-output {
  padding: 1rem;
  font-family: "Fira Code", monospace;
}

.console-line {
  margin: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-error {
  color: #ef4444;
}

.console-warning {
  color: #fbbf24;
}

.console-success {
  color: #22c55e;
}

.console-info {
  color: var(--accent);
}

.console-timestamp {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Test case results */
.test-case {
  padding: 1rem;
  margin: 0.5rem 0;
  background: var(--dark-card);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.test-case.passed {
  border-color: #22c55e;
}

.test-case.failed {
  border-color: #ef4444;
}

.test-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.test-result {
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Code editor shortcuts panel */
.shortcuts-panel {
  position: absolute;
  bottom: 200px;
  right: 20px;
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem;
  width: 250px;
  display: none;
  box-shadow: var(--glass-shadow);
  z-index: 20;
}

.shortcuts-panel.active {
  display: block;
}

.shortcuts-title {
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.shortcuts-list {
  list-style: none;
}

.shortcuts-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.shortcut-key {
  background: var(--dark-card);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  color: var(--text-primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.8);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-5 {
  animation-delay: 0.5s;
}

/* ===== TOPIC OF THE DAY ===== */
.totd-section {
  padding: 2rem 0;
  scroll-margin-top: 72px;
}

.totd-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  margin: 2px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.totd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
}

.totd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-1);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.totd-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.totd-icon {
  font-size: 3.5rem;
  flex-shrink: 0;
}

.totd-info {
  flex: 1;
}

.totd-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.totd-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.totd-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.totd-problems {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.totd-btn {
  width: fit-content;
}

.totd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
}

.totd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-1);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.totd-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.totd-icon {
  font-size: 3.5rem;
  flex-shrink: 0;
}

.totd-info {
  flex: 1;
}

.totd-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-5 {
  animation-delay: 0.5s;
}
.recommendation-card {
  margin-top: 15px;
  padding: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.recommendation-card h4 {
  margin-bottom: 8px;
}

.back-to-top {
  position: fixed;
  bottom: 105px;
  right: 40px;

  width: 40px;
  height: 40px;

  border: none;
  border-radius: 50%;

  background: #7c3aed;
  color: white;

  font-size: 18px;

  cursor: pointer;

  display: none;

  z-index: 1000;

  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);

  transition: all 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-4px);

  background: #8b5cf6;
}

.back-to-top.show {
  display: flex;

  align-items: center;

  justify-content: center;
}


.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.hidden {
    display: none;
}

.quiz-loader {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #6c63ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.quiz-problem-panel {
    display: block !important;
}




.quiz-card * {
    pointer-events: auto;
}
.section-title {
    pointer-events: none !important;
}


.quiz-grid,
.quiz-card,
.start-quiz-btn {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}
.quiz-card * {
    position: relative;
}

@media (max-width: 768px) {
  .totd-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .totd-icon {
    font-size: 2.5rem;
  }

  .totd-title {
    font-size: 1.4rem;
  }

  .totd-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .dashboard-card {
    padding: 1.5rem;
  }
}
/* ===== GAME MODAL ===== */
.game-modal .game-modal-content {
  max-width: 700px;
  width: 95%;
  background: var(--dark-surface);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.game-modal-header {
  padding: 1.5rem 2rem;
  background: var(--dark-card);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-modal-header h3 {
  font-size: 1.5rem;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-modal-body {
  padding: 2rem;
  max-height: 80vh;
  overflow-y: auto;
}

.game-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.game-type-card {
  background: var(--dark-card);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-type-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-type-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.game-type-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.game-type-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.game-xp-reward {
  background: var(--gradient-4);
  color: var(--dark-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}


/*AUTH GATE MODAL*/
#authGateModal {
  z-index: 11000;
}

.auth-gate-modal-content {
  position: relative;
  max-width: 420px;
  width: 90%;
  margin: auto;
  padding: 2.5rem 2rem 2rem;
  background: linear-gradient(
    145deg,
    rgba(26, 26, 62, 0.98) 0%,
    rgba(37, 37, 80, 0.98) 100%
  );
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 24px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  animation: authGateSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes authGateSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Lock icon ring */
.auth-gate-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-gate-lock-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  position: relative;
  box-shadow:
    0 0 0 8px rgba(124, 58, 237, 0.15),
    0 0 0 16px rgba(124, 58, 237, 0.07);
  animation: authLockPulse 2.4s ease-in-out infinite;
}

@keyframes authLockPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.15), 0 0 0 16px rgba(124, 58, 237, 0.07); }
  50%       { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0.22), 0 0 0 22px rgba(124, 58, 237, 0.10); }
}

.auth-gate-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.auth-gate-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Perks list */
.auth-gate-perks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  text-align: left;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.auth-gate-perk {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.auth-gate-perk i {
  width: 18px;
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Action buttons */
.auth-gate-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.auth-gate-btn {
  flex: 1;
  min-width: 130px;
  max-width: 180px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.auth-gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* Dismiss */
.auth-gate-dismiss {
  margin: 0;
}

.auth-gate-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s ease;
  font-family: inherit;
}

.auth-gate-dismiss-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Shake animation for already-locked elements */
@keyframes authGateShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.auth-gate-shake {
  animation: authGateShake 0.4s ease;
}
.game-stats-bar {
  display: flex;
  justify-content: space-around;
  background: var(--dark-card);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.game-stat {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.game-stat span {
  color: var(--accent);
}

.game-question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  padding: 1rem;
  background: var(--dark-card);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.game-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.game-option {
  padding: 1rem;
  background: var(--dark-card);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: center;
}

.game-option:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

.game-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.game-option.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.game-explanation {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(108, 99, 255, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.game-results-content {
  text-align: center;
  padding: 2rem;
}

.game-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.game-results-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
}

.result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.game-results-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Badge locked state for gamification */
.badge-lg.locked {
  opacity: 0.4;
  filter: grayscale(100%);
}

.badge-lg:hover .badge-tooltip,
.badge-lg:focus .badge-tooltip {
  opacity: 1;
}
