/* Global Scuba Theme & Design System */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Outfit:wght@400;600;800;900&display=swap');

:root {
  --bg-deep-ocean: #020813;
  --bg-dark-blue: #071329;
  --bg-surface-glass: rgba(10, 25, 50, 0.45);
  --bg-surface-card: rgba(15, 32, 67, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(22, 190, 224, 0.35);

  --color-primary: #06b6d4;      /* Bioluminescent Cyan */
  --color-secondary: #0d9488;    /* Deep Sea Teal */
  --color-accent-coral: #fb7185; /* Coral Reef Pink */
  --color-accent-emerald: #10b981; /* Healthy Algae Green */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  
  --shadow-neon-cyan: 0 0 15px rgba(6, 182, 212, 0.4);
  --shadow-neon-coral: 0 0 15px rgba(251, 113, 133, 0.4);
  --shadow-neon-emerald: 0 0 15px rgba(16, 185, 129, 0.4);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--bg-deep-ocean);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep-ocean);
  color: var(--color-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(13, 148, 136, 0.08) 0%, transparent 45%);
}

/* Custom Scrollbar for modern browsers */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep-ocean);
}
::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Background Bubbles Animation */
.bubble-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  animation: float-bubble 15s infinite linear;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.15), 0 2px 4px rgba(255, 255, 255, 0.05);
}

@keyframes float-bubble {
  0% {
    transform: translateY(0) scale(1) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-110vh) scale(0.9) translateX(30px);
    opacity: 0;
  }
}

/* Glassmorphism General Card Styling */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: var(--shadow-glass);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
}

/* App Header & Navigation */
header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  background: rgba(2, 8, 19, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.logo i {
  font-size: 1.75rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--color-primary);
  background: rgba(6, 182, 212, 0.08);
}

.nav-btn.active {
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

/* User Progress Overview on Nav */
.user-xp {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  color: var(--color-accent-emerald);
}

/* Main Layout Viewport */
main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

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

/* Dashboard / Home View */
.hero {
  text-align: center;
  margin-bottom: 3.5rem;
  padding: 3rem 1.5rem;
  border-radius: 24px;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  position: relative;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 40px;
}

.wave-divider .shape-fill {
  fill: var(--bg-deep-ocean);
}

/* Course Catalog Grid */
.course-section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.course-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-banner {
  height: 200px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.course-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.course-card:hover .course-banner img {
  transform: scale(1.05);
}

.course-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 19, 41, 0.95), transparent 60%);
}

.course-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(2, 8, 19, 0.75);
  border: 1px solid var(--border-glass-hover);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  backdrop-filter: blur(8px);
}

.course-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.course-body h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
}

.course-body p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.course-progress-container {
  margin-bottom: 1.5rem;
}

.course-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.course-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.course-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.course-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Premium Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-neon-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.6);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent-coral), #f43f5e);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-neon-coral);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(251, 113, 133, 0.6);
  filter: brightness(1.1);
}

/* Course Viewer Shell */
.viewer-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar-toc {
  position: sticky;
  top: 100px;
  padding: 1.5rem;
}

.sidebar-toc h4 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.toc-item {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-glass);
}

.toc-item.active {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--color-primary);
}

.toc-status-icon {
  font-size: 0.9rem;
}

.viewer-content-panel {
  padding: 2.5rem;
}

/* Custom Video Wrapper */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-neon-cyan);
  margin-bottom: 1.5rem;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Chapter header block */
.chapter-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1.5rem;
}

.chapter-header h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.chapter-header p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* Slide Player Interface */
.slide-player {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slide-content-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .slide-content-layout {
    grid-template-columns: 1fr;
  }
  .viewer-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-toc {
    position: relative;
    top: 0;
  }
}

.slide-text-section h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
}

.slide-text-section p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-line;
}

.slide-media-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.slide-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-neon-cyan);
}

.media-caption {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

.media-caption a {
  color: var(--color-primary);
  text-decoration: none;
}

.media-caption a:hover {
  text-decoration: underline;
}

/* Slide Controller Bar */
.slide-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.slide-progress {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Species Explorer Interactive Component */
.species-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
}

.species-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.species-tab-btn:hover, .species-tab-btn.active {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.species-explorer-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 1rem;
  min-height: 400px;
}

@media (max-width: 768px) {
  .species-explorer-card {
    grid-template-columns: 1fr;
  }
}

.species-img-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-neon-cyan);
  background: rgba(0, 0, 0, 0.2);
}

.species-img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.species-overlay-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(2, 8, 19, 0.85);
  border: 1px solid var(--border-glass-hover);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  backdrop-filter: blur(8px);
}

.species-details-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.species-details-panel h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.species-grid-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.species-info-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.species-info-box label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.species-info-box span {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.fun-fact-alert {
  background: rgba(251, 113, 133, 0.07);
  border: 1px dashed rgba(251, 113, 133, 0.35);
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.fun-fact-alert i {
  color: var(--color-accent-coral);
  font-size: 1.2rem;
  margin-top: 0.1rem;
}

.fun-fact-alert p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.species-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.wiki-link {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.wiki-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Quiz Setup View */
.quiz-setup-container {
  max-width: 600px;
  margin: 3rem auto;
  padding: 3rem;
  text-align: center;
}

.quiz-setup-container h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.quiz-setup-container p {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.number-selector-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  color: #fff;
}

.number-selector-btn:hover {
  border-color: var(--color-primary);
  background: rgba(6, 182, 212, 0.05);
}

.number-selector-btn.selected {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-neon-cyan);
}

.selector-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-title);
  margin-bottom: 0.25rem;
}

.selector-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
}

.toggle-container label {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--border-glass);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Quiz Active Screen */
.quiz-active-container {
  max-width: 800px;
  margin: 1rem auto;
  padding: 2.5rem;
}

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

.quiz-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent-coral);
}

.quiz-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

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

.quiz-question-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .quiz-question-layout {
    grid-template-columns: 1fr;
  }
}

.quiz-media-box {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-neon-cyan);
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  min-height: 250px;
}

.quiz-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-question-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.quiz-question-text {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 1.1rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option-btn:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.06);
  border-color: var(--border-glass-hover);
  color: #fff;
  transform: translateX(4px);
}

.quiz-option-btn.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--color-accent-emerald) !important;
  color: #fff !important;
  box-shadow: var(--shadow-neon-emerald);
}

.quiz-option-btn.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.option-badge {
  font-size: 1rem;
}

.feedback-alert {
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  gap: 0.75rem;
  animation: slideUp 0.3s ease;
  margin-top: 1rem;
}

.feedback-alert.correct {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--color-accent-emerald);
}

.feedback-alert.incorrect {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

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

.quiz-control-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Quiz Loading Overlay */
.quiz-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1.5rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(6, 182, 212, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  box-shadow: var(--shadow-neon-cyan);
}

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

/* Quiz Results Screen */
.results-container {
  max-width: 650px;
  margin: 2rem auto;
  padding: 3rem;
  text-align: center;
}

.badge-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.results-badge {
  font-size: 5rem;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.25) 0%, rgba(2, 8, 19, 0.6) 80%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-neon-cyan), inset 0 0 20px rgba(6, 182, 212, 0.4);
}

.results-score-text {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.results-headline {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.results-summary-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.summary-metric {
  text-align: center;
}

.summary-metric label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.summary-metric value {
  font-size: 1.5rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--color-primary);
}

.summary-metric.correct-metric value {
  color: var(--color-accent-emerald);
}

.results-btn-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Review details table */
.review-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem 0;
  text-align: left;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  margin-bottom: 2rem;
}

.review-item {
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
}

.review-item.correct-item {
  border-left: 4px solid var(--color-accent-emerald);
}

.review-item.incorrect-item {
  border-left: 4px solid var(--color-accent-coral);
}

.review-q-text {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.review-ans-grid {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.review-ans-span {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.review-ans-span.your-ans {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
}

.review-ans-span.correct-ans {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Achievements view */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.badge-card {
  padding: 1.5rem;
  text-align: center;
  filter: grayscale(1);
  opacity: 0.5;
  transition: var(--transition-smooth);
}

.badge-card.unlocked {
  filter: grayscale(0);
  opacity: 1;
  border-color: var(--border-glass-hover);
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.1) 0%, transparent 80%);
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.badge-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fff;
}

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

/* Monetization & Google Ads Styling */
.footer-ad-wrapper {
  max-width: 760px;
  margin: 4rem auto 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.5rem;
  z-index: 5;
  position: relative;
}

.ad-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ad-container-box {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(10, 25, 50, 0.25);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Sidebar Ad Panels */
.sidebar-ad-wrapper {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-ad-box {
  width: 100%;
  min-height: 250px; /* 300x250 Medium Rectangle */
  background: rgba(10, 25, 50, 0.2);
  border: 1px dashed var(--border-glass);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  transition: var(--transition-fast);
}

.sidebar-ad-box:hover {
  border-color: var(--border-glass-hover);
}

.sidebar-ad-box::after {
  content: "Monetization Panel (300x250 Ad Slot)";
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* In-Content Ads */
.in-content-ad-wrapper {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

