/* Custom Stylesheet for Media Pembelajaran Teks Biografi */
/* SMK Negeri 1 Mundu - Kelas X APAT */

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

:root {
  --primary-navy: #091a2b;
  --secondary-navy: #102a43;
  --sea-blue: #0284c7;
  --ocean-teal: #0891b2;
  --aqua-cyan: #06b6d4;
  --emerald-fresh: #10b981;
  --golden-amber: #f59e0b;
  --crimson-rose: #f43f5e;
  --bg-gradient: radial-gradient(130% 120% at 50% 0%, #172554 0%, #09131f 50%, #030712 100%);
}

* {
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Outfit', sans-serif;
}

body {
  background: #060e18;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(2, 132, 199, 0.12) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 60%);
  background-attachment: fixed;
}

/* Subtle Animated Wave Background */
.hero-ocean-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 80%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Card */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-panel-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.3);
}

/* Navigation Tab Active Indicator */
.nav-btn {
  position: relative;
  transition: all 0.25s ease;
}
.nav-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(6, 182, 212, 0.2));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px -5px rgba(56, 189, 248, 0.3);
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: #38bdf8;
  border-radius: 999px;
  box-shadow: 0 0 10px #38bdf8;
}

/* Custom badges for text structure */
.badge-orientasi {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-peristiwa {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.badge-reorientasi {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

/* Interactive Text Segment Card Styles */
.text-segment {
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}
.text-segment.orientasi {
  border-left-color: #38bdf8;
  background: rgba(2, 132, 199, 0.05);
}
.text-segment.orientasi:hover, .text-segment.orientasi.highlighted {
  background: rgba(2, 132, 199, 0.12);
  border-left-color: #0284c7;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.text-segment.peristiwa {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.text-segment.peristiwa:hover, .text-segment.peristiwa.highlighted {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #059669;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.text-segment.reorientasi {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}
.text-segment.reorientasi:hover, .text-segment.reorientasi.highlighted {
  background: rgba(245, 158, 11, 0.12);
  border-left-color: #d97706;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Quiz Option Hover & Selection */
.quiz-opt {
  transition: all 0.2s ease;
}
.quiz-opt:hover:not(.disabled) {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 0.9);
}
.quiz-opt.selected {
  border-color: #38bdf8;
  background: rgba(2, 132, 199, 0.18);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}
.quiz-opt.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.2) !important;
  color: #a7f3d0 !important;
}
.quiz-opt.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fecaca !important;
}

/* Page Animation Transition */
.page-view {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #09131f;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Hero Portrait Avatar & Framing */
.hero-avatar-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
}
.hero-avatar-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.25rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), transparent, rgba(16, 185, 129, 0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Certificate Preview Modal */
#certificate-container {
  background: #ffffff;
  color: #0f172a;
  position: relative;
}

/* Print Stylesheet for Certificate & Reflection */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  /* Sembunyikan elemen non-cetak */
  .no-print, header, nav, footer, #bottom-nav, #toast, .hero-ocean-glow, 
  #page-beranda, #page-tujuan, #page-teks, #page-struktur, #page-pahlawan, #page-kuis, #modal-review, #modal-hero-detail {
    display: none !important;
  }

  /* Jika modal sertifikat aktif */
  #modal-certificate {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
  }

  #modal-certificate > div {
    max-width: 100% !important;
    box-shadow: none !important;
    border: 6px solid #0d2a4a !important;
    margin: 0 auto !important;
  }

  /* Jika mencetak halaman refleksi */
  #page-refleksi:not(.hidden) {
    display: block !important;
    color: #000 !important;
  }
  #page-refleksi .glass-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: none !important;
  }
  #page-refleksi textarea {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
  }

  .printable-area {
    display: block !important;
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
  }
}
