@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Merriweather:wght@400;700;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0e27;
  --panel: #1a1f3a;
  --panel-2: #151932;
  --text: #ffffff;
  --muted: #a8b2d1;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --border: #2d3561;
  --success: #10b981;
  --danger: #ef4444;
  --bg-image: none;
  --bg-overlay: transparent;
  --shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 4px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-hover: 
    0 20px 50px rgba(99, 102, 241, 0.3),
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-secondary: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
}

body.theme-dark {
  --bg: #0a0e27;
  --panel: #1a1f3a;
  --panel-2: #151932;
  --text: #ffffff;
  --muted: #a8b2d1;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --border: #2d3561;
  --success: #10b981;
  --danger: #ef4444;
  --bg-overlay: transparent;
  --shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 4px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-hover: 
    0 20px 50px rgba(99, 102, 241, 0.3),
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-secondary: linear-gradient(135deg, #1a1f3a 0%, #2d3561 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  color: var(--text);
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}

@media (max-width: 768px) {
  body { background-attachment: scroll, scroll; background-position: center top, center top; }
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 16px; 
  position: relative;
  z-index: 1;
}

/* Header styling - Modern Glassmorphism */
.site-header { 
  position: sticky; 
  top: 0; 
  backdrop-filter: blur(30px) saturate(180%);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.9) 0%, rgba(21, 25, 50, 0.9) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 10;
  transition: all 0.3s ease;
}

.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px;
  padding: 12px 0;
}

.brand { 
  font-weight: 800; 
  letter-spacing: 0.5px; 
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none; 
  font-family: 'Poppins', Merriweather, Georgia, serif;
  font-size: 1.4rem;
  text-shadow: none;
  transition: all 0.3s ease;
  position: relative;
}
.brand:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.main-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.nav-link { 
  color: var(--text); 
  text-decoration: none; 
  padding: 12px 20px; 
  border-radius: 14px; 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26, 31, 58, 0.7);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: -1;
}
.nav-link:hover::before, .nav-link.active::before {
  left: 0;
  opacity: 1;
}
.nav-link:hover, .nav-link.active { 
  color: #ffffff; 
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 20px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.site-footer { 
  border-top: 1px solid rgba(255, 255, 255, 0.1); 
  margin-top: 48px; 
  padding: 32px 0 40px; 
  color: var(--muted); 
  backdrop-filter: blur(30px) saturate(180%);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.9) 0%, rgba(21, 25, 50, 0.9) 100%);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Typography */
h1, h2, h3 { 
  margin: 16px 0 24px; 
  font-family: 'Poppins', Merriweather, Georgia, serif;
  color: var(--text);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.5px;
}
h1 { 
  font-size: 2.5rem; 
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}
h2 { 
  font-size: 2rem; 
  background: linear-gradient(135deg, #ffffff 0%, #a8b2d1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
h3 { 
  font-size: 1.6rem; 
  color: var(--text);
  font-weight: 600;
}

.lead { 
  color: var(--muted); 
  margin-bottom: 28px;
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 400;
  opacity: 0.9;
}

/* Grid and Layout */
.grid { 
  display: grid; 
  grid-template-columns: repeat(1, minmax(0, 1fr)); 
  gap: 24px; 
  animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* Cards - Modern Glassmorphic Style */
.card { 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.9) 0%, rgba(21, 25, 50, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 24px; 
  padding: 28px; 
  box-shadow: var(--shadow);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  transform: scaleX(0);
  transform-origin: left;
}
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}
.card:hover::after {
  opacity: 1;
}
.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.95) 0%, rgba(21, 25, 50, 0.95) 100%);
}
.card a { text-decoration: none; color: inherit; }
.card-title { 
  font-weight: 700; 
  margin-bottom: 12px; 
  color: var(--text);
  font-size: 1.25rem;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #a8b2d1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}
.card:hover .card-title {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-desc { 
  color: var(--muted); 
  font-size: 1rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}
.card:hover .card-desc {
  color: rgba(255, 255, 255, 0.9);
}

.section { 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.8) 0%, rgba(21, 25, 50, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 28px; 
  padding: 36px; 
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  position: relative;
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.5;
}

/* Navigation elements */
.breadcrumbs { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  font-size: 0.95rem; 
  margin: 8px 0 20px; 
  color: var(--muted);
  padding: 12px 0;
}
.breadcrumbs a { 
  color: var(--accent); 
  text-decoration: none;
  font-weight: 500;
}
.breadcrumbs a:hover { text-decoration: underline; }

.pill-row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px; 
  margin: 16px 0 8px; 
}
.pill { 
  padding: 12px 20px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 25px; 
  color: var(--text); 
  text-decoration: none; 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.8) 0%, rgba(21, 25, 50, 0.8) 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.4s ease;
  z-index: -1;
}
.pill:hover::before {
  left: 0;
}
.pill:hover { 
  color: white;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 8px 20px rgba(99, 102, 241, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Buttons - Modern Gradient Style */
.button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  padding: 14px 24px; 
  border-radius: 14px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.9) 0%, rgba(21, 25, 50, 0.9) 100%);
  color: var(--text); 
  text-decoration: none; 
  cursor: pointer; 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.4s ease;
  z-index: -1;
}
.button:hover::before {
  left: 0;
}
.button.primary { 
  border: none;
  background: var(--gradient-primary);
  color: white;
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.button.primary::before {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #f472b6 100%);
}
.button.success { 
  border: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.button:hover { 
  transform: translateY(-3px) scale(1.02); 
  box-shadow: 
    0 10px 30px rgba(99, 102, 241, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  color: white;
}
.button.primary:hover {
  box-shadow: 
    0 12px 35px rgba(99, 102, 241, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.button:active { transform: translateY(-1px) scale(1); }

/* Lists */
.list { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}
.list li { 
  padding: 20px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 18px; 
  margin-bottom: 16px; 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.8) 0%, rgba(21, 25, 50, 0.8) 100%);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.4s ease;
}
.list li:hover::before {
  transform: scaleY(1);
}
.list li:hover {
  transform: translateY(-4px) translateX(4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.95) 0%, rgba(21, 25, 50, 0.95) 100%);
}
.list li a { color: inherit; text-decoration: none; display: block; }

/* Images and media */
.thumbnail { 
  width: 64px; 
  height: 64px; 
  object-fit: cover; 
  border-radius: 8px; 
  border: 2px solid var(--border); 
}
.item-row { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 12px; 
}
.item-main { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.img-wrap { margin: 12px 0; }
.img-wrap img { 
  max-width: 100%; 
  height: auto; 
  border-radius: 12px; 
  border: 2px solid var(--border); 
  box-shadow: var(--shadow);
}

/* Quiz and forms */
.quiz { display: grid; gap: 16px; }
.question { 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 20px; 
  padding: 24px; 
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.7) 0%, rgba(21, 25, 50, 0.7) 100%);
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.3;
}
.question:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}
.question h4 { margin: 0 0 12px; color: var(--text); }
.options { display: grid; gap: 12px; }
.result { margin-top: 16px; font-weight: 600; }
.result.ok { color: var(--success); }
.result.bad { color: var(--danger); }

/* Option labels with letter badges */
.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.5) 0%, rgba(21, 25, 50, 0.5) 100%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.option-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.option-label:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.7) 0%, rgba(21, 25, 50, 0.7) 100%);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.option-label:hover::before {
  transform: scaleY(1);
}

.option-label input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(26, 31, 58, 0.6);
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.option-label input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--gradient-primary);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.2),
    0 0 20px rgba(99, 102, 241, 0.4);
}

.option-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.option-label:hover .option-letter {
  transform: scale(1.1);
  box-shadow: 
    0 6px 16px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.option-label input[type="radio"]:checked ~ .option-letter {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 
    0 6px 16px rgba(16, 185, 129, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.option-text {
  flex: 1;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.option-label input[type="radio"]:checked ~ .option-text {
  color: var(--text);
  font-weight: 600;
}

/* Form elements */
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(21, 25, 50, 0.6) 100%);
  color: var(--text);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 
    0 0 0 4px rgba(99, 102, 241, 0.2),
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(26, 31, 58, 0.8) 0%, rgba(21, 25, 50, 0.8) 100%);
  transform: translateY(-2px);
}

/* Timer */
.timer { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 10px 16px; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 12px; 
  background: rgba(42, 42, 42, 0.9);
  font-weight: 600;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.timer.urgent { 
  color: #fff; 
  background: rgba(239, 68, 68, 0.9); 
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 
    0 4px 12px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Answer key */
.answer-key { 
  margin-top: 20px; 
  padding: 16px; 
  border: 2px dashed rgba(255, 255, 255, 0.2); 
  border-radius: 16px; 
  background: rgba(42, 42, 42, 0.6); 
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.answer-row { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-bottom: 8px;
}
.answer-row .mark { 
  width: 20px; 
  text-align: center; 
  font-weight: bold;
}

/* Dim overlay */
.dim-overlay { 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.5); 
  backdrop-filter: blur(2px); 
  z-index: 9999; 
  display: none; 
  opacity: 0; 
  transition: opacity 0.3s ease; 
}
.dim-overlay.active { display: block; opacity: 1; }

/* Additional school-inspired elements */
.book-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
  line-height: 1.4;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Responsive design */
@media (max-width: 768px) {
  .container { padding: 16px; }
  .site-header { padding: 10px 0; }
  .brand { font-size: 1.2rem; }
  .nav-link { padding: 10px 14px; font-size: 0.85rem; }
  .card, .section { padding: 20px; border-radius: 20px; }
  .grid { gap: 20px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }
}

/* Special styling for educational content */
.section h2 {
  border-bottom: 3px solid;
  border-image: var(--gradient-primary) 1;
  padding-bottom: 12px;
  margin-bottom: 28px;
  position: relative;
}
.section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Additional visual enhancements */
.thumbnail {
  transition: all 0.4s ease;
  border: 2px solid rgba(99, 102, 241, 0.3);
}
.thumbnail:hover {
  transform: scale(1.1);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.img-wrap img {
  transition: all 0.4s ease;
}
.img-wrap:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3);
}

.timer {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Print styles */
@media print {
  .site-header, .site-footer, .button, .nav-link {
    display: none !important;
  }
  .card, .section {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  body::before {
    display: none;
  }
}

/* Video Player Modal */
.video-player-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-player-modal.active {
  display: flex;
  opacity: 1;
}

.video-player-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.video-player-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
}

.video-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-thumbnail-wrapper {
  transition: transform 0.2s ease;
}

.youtube-thumbnail-wrapper:hover {
  transform: scale(1.02);
}

.youtube-play-button {
  transition: all 0.3s ease;
}

.youtube-thumbnail-wrapper:hover .youtube-play-button {
  background: rgba(255, 0, 0, 0.9) !important;
  transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
  .video-player-content {
    width: 95%;
  }
  
  .video-player-close {
    width: 35px;
    height: 35px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }
}