/* ==========================================================================
   HIND STUDIO - منصة «رحلة إلى الفضاء: اكتشفي كواكب المجموعة الشمسية»
   التصميم والأنماط البصرية المتجاوبة للواجهة الفضائية التفاعلية
   ========================================================================== */

:root {
  --bg-deep-space: #070913;
  --bg-space-dark: #0d1224;
  --bg-card: rgba(18, 24, 43, 0.75);
  --bg-card-hover: rgba(28, 36, 64, 0.85);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(56, 189, 248, 0.4);
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.5);
  --accent-gold: #fbbf24;
  --accent-gold-glow: rgba(251, 191, 36, 0.4);
  --accent-purple: #a855f7;
  --accent-pink: #f43f5e;
  --success: #10b981;
  --danger: #ef4444;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  
  --shadow-space: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-neon: 0 0 20px rgba(56, 189, 248, 0.35);
}

/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  direction: rtl;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-deep-space);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Background Stars Animation Canvas */
#space-stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Space HUD Top Bar */
.space-hud {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 28, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hud-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  font-size: 1.4rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hud-link:hover, .hud-link.active {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.student-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.star-counter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(217, 119, 6, 0.2));
  border: 1px solid var(--accent-gold);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.9rem;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.audio-mute-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.audio-mute-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: var(--shadow-neon);
}

/* Main Container */
.main-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1350px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Common Section Header */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
}

/* SECTION 1: HERO & MISSION LAUNCH */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1.2rem;
}

.hero-title span.highlight {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 580px;
}

/* Student Launch Board Card */
.launch-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-space);
  position: relative;
  overflow: hidden;
}

.launch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #fbbf24);
}

.launch-card-header {
  margin-bottom: 1.5rem;
}

.launch-card-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.launch-card-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.name-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.name-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.launch-btn {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #0b0f19;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: inherit;
  transition: var(--transition-normal);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, #7dd3fc, #0284c7);
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
}

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

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-floating-ship {
  width: 280px;
  height: 280px;
  animation: floatShip 4s ease-in-out infinite;
  filter: drop-shadow(0 15px 35px rgba(56, 189, 248, 0.4));
}

@keyframes floatShip {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(3deg); }
}

/* SECTION 2: WHAT IS THE SOLAR SYSTEM? */
.section-solar-intro {
  margin: 5rem 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.intro-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition-normal);
  position: relative;
}

.intro-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.2);
}

.intro-icon {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
}

.intro-card h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: #fff;
}

.intro-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* SECTION 3: THE SUN (CENTER OF THE SOLAR SYSTEM) */
.sun-showcase-section {
  margin: 5rem 0;
}

.sun-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(220, 38, 38, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}

.sun-visual-box {
  text-align: center;
  position: relative;
}

.sun-image {
  width: 320px;
  height: 320px;
  animation: sunPulse 6s ease-in-out infinite alternate;
}

@keyframes sunPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.5)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 45px rgba(239, 68, 68, 0.7)); }
}

.sun-info-content h3 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.sun-badge-pill {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.sun-desc {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

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

.spec-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

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

.spec-val {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.tts-speak-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.tts-speak-btn:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* SECTION 4: INTERACTIVE 8-PLANET ORRERY */
.orrery-section {
  margin: 5rem 0;
}

.orrery-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

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

.ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
}

.ctrl-btn.active, .ctrl-btn:hover {
  background: var(--primary);
  color: #0b0f19;
  font-weight: 700;
}

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

.orrery-canvas-container {
  width: 100%;
  height: 520px;
  background: radial-gradient(circle at center, #111827 0%, #070913 70%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

#orrery-interactive-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.orrery-hud-overlay {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(11, 15, 28, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  pointer-events: none;
}

/* SECTION 5: PLANET CARDS EXPLORER */
.planets-explorer-section {
  margin: 5rem 0;
}

.planet-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.planet-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.planet-tab-btn:hover, .planet-tab-btn.active {
  background: var(--primary);
  color: #0b0f19;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

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

.planet-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.planet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.8);
  border-color: var(--card-accent, var(--primary));
}

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

.planet-order-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.planet-type-badge {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}

.planet-visual-center {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
  position: relative;
}

.planet-img {
  width: 140px;
  height: 140px;
  transition: transform 0.5s ease;
}

.planet-card:hover .planet-img {
  transform: scale(1.1) rotate(5deg);
}

.planet-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.25rem;
}

.planet-eng-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.planet-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  min-height: 40px;
}

.planet-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

.p-stat {
  font-size: 0.75rem;
}

.p-stat span.lbl {
  color: var(--text-muted);
  display: block;
}

.p-stat span.val {
  color: #fff;
  font-weight: 700;
}

.planet-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.card-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.card-btn:hover {
  background: var(--primary);
  color: #0b0f19;
  border-color: var(--primary);
}

/* SECTION 6: FUN FACTS & SPACE CALCULATORS */
.facts-calculator-section {
  margin: 5rem 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.calculator-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}

.calculator-card p.calc-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.calc-input-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.calc-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  padding-left: 0.5rem;
}

.calc-result-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.calc-res-planet {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.calc-res-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

/* SECTION 7: AI EDUCATIONAL VIDEO SHOWCASE («شاهدي رحلتنا الفضائية») */
.video-showcase-section {
  margin: 5rem 0;
}

.video-player-container {
  max-width: 960px;
  margin: 0 auto;
  background: #000;
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.25);
  overflow: hidden;
  position: relative;
}

.video-frame-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.video-title-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-engine-tag {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.video-viewport {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #070913;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-space-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Custom Video Overlay / Poster */
.video-custom-poster {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(30, 27, 75, 0.85) 0%, rgba(7, 9, 19, 0.95) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 10;
  transition: opacity 0.4s ease;
}

.video-custom-poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.poster-ship-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 1.5rem;
  animation: floatShip 3s ease-in-out infinite;
}

.poster-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.5rem;
}

.poster-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 1.5rem;
}

.play-video-hero-btn {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border: none;
  border-radius: var(--radius-full);
  padding: 0.9rem 2.2rem;
  color: #0b0f19;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: inherit;
  transition: var(--transition-normal);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

.play-video-hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.8);
}

.video-controls-bar {
  background: rgba(11, 15, 28, 0.95);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.v-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.v-ctrl-btn:hover {
  color: var(--primary);
}

.video-progress-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
}

.video-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  border-radius: var(--radius-full);
  position: relative;
}

.v-time-display {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 80px;
  direction: ltr;
  text-align: center;
}

/* SECTION 8: MULTIPLE CHOICE QUIZ */
.quiz-section {
  margin: 5rem 0;
}

.quiz-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-space);
  position: relative;
}

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

.quiz-counter {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.quiz-score-badge {
  font-size: 0.9rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.quiz-question-text {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: #fff;
  line-height: 1.5;
}

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

.quiz-opt-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  text-align: right;
  color: #fff;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary);
  transform: translateX(-5px);
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--success) !important;
  color: #6ee7b7 !important;
}

.quiz-opt-btn.wrong {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: var(--danger) !important;
  color: #fca5a5 !important;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.quiz-feedback-box {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1.5rem;
  display: none;
}

.quiz-feedback-box.active {
  display: block;
}

.feedback-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.quiz-next-btn {
  background: var(--primary);
  color: #0b0f19;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

/* SECTION 9: MATCHING ACTIVITY */
.matching-section {
  margin: 5rem 0;
}

.matching-board {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.matching-col-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}

.matching-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.match-item:hover {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
}

.match-item.selected {
  border-color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.match-item.matched {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  pointer-events: none;
}

/* SECTION 10: ORBIT ORDERING CHALLENGE */
.ordering-section {
  margin: 5rem 0;
}

.ordering-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.order-slots-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin: 2rem 0;
}

.order-slot {
  aspect-ratio: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0.25rem;
}

.order-slot.filled {
  border-style: solid;
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.15);
}

.order-pool-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.planet-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.planet-chip:hover {
  background: var(--accent-purple);
}

.planet-chip.used {
  opacity: 0.3;
  pointer-events: none;
}

.order-actions-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* SECTION 11: FINAL ASTRO-CHALLENGE */
.speed-challenge-section {
  margin: 5rem 0;
}

.challenge-card {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(76, 29, 149, 0.2), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.challenge-timer-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.challenge-timer-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  transition: width 1s linear;
}

/* SECTION 12: CELEBRATION & CERTIFICATE */
.celebration-section {
  margin: 5rem 0 3rem;
  text-align: center;
}

.cert-card-wrapper {
  max-width: 950px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.15);
}

.certificate-canvas-container {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

#certificate-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.cert-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0b0f19;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.6);
}

/* Footer */
.space-footer {
  border-top: 1px solid var(--border-glass);
  padding: 2.5rem 1.5rem;
  background: rgba(11, 15, 28, 0.95);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-brand {
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin: 0 auto 2rem;
  }
  .sun-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .matching-board {
    grid-template-columns: 1fr;
  }
  .order-slots-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hud-nav {
    display: none;
  }
  .order-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
