/* ================================================================
   css/pages.css — Virtual Lab TJKT
   Halaman SPA: Splash Screen, Halaman Intro, Halaman Petunjuk
   ================================================================ */

/* ================================================================
   SPLASH SCREEN
   ================================================================ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.hiding {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.splash-screen.hidden-final { display: none; }

/* ---- Partikel latar ---- */
.splash-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.splash-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: particleFloat linear infinite;
}

/* ---- Konten tengah ---- */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xl);
  max-width: 500px;
  width: 100%;
}

/* ---- Ikon / Logo ---- */
.splash-icon-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.splash-icon {
  width: 90px;
  height: 90px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 16px var(--accent));
  animation: splashIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.splash-ring {
  animation: splashRingSpin 2.5s linear infinite;
  transform-origin: 40px 40px;
}

.splash-led {
  animation: splashLedBlink 1s ease-in-out infinite alternate;
}

.splash-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, transparent 70%);
  animation: splashGlowPulse 2s ease-in-out infinite;
}

/* ---- Teks splash ---- */
.splash-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: var(--space-md);
  animation: splashFadeUp 0.5s 0.3s both ease;
}

.splash-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  animation: splashFadeUp 0.5s 0.45s both ease;
  letter-spacing: -0.02em;
}

.splash-title-accent {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.splash-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  animation: splashFadeUp 0.5s 0.55s both ease;
}

/* ---- Loading bar ---- */
.splash-loader-wrap {
  width: 100%;
  max-width: 320px;
  margin-bottom: var(--space-lg);
  animation: splashFadeUp 0.5s 0.65s both ease;
}

.splash-loader-bar {
  height: 3px;
  background: rgba(0, 240, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.splash-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent-dim), var(--accent));
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent);
}

.splash-loader-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: block;
  text-align: center;
}

/* ---- Kredit pembuat ---- */
.splash-credit {
  font-size: 0.78rem;
  color: var(--text-muted);
  animation: splashFadeUp 0.5s 0.75s both ease;
}

.splash-credit strong { color: var(--text-secondary); }

/* ================================================================
   HALAMAN INTRO / ABOUT
   ================================================================ */

.intro-page {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg-base);
  overflow-y: auto;
  animation: introPageIn 0.5s ease both;
}

.intro-page.hiding {
  animation: introPageOut 0.35s ease forwards;
}

/* Grid latar samar */
.intro-bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.intro-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

/* ---- Hero ---- */
.intro-hero {
  text-align: center;
  padding: var(--space-xl) 0;
}

.intro-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-active);
  background: var(--accent-glow);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: var(--space-lg);
}

.intro-hero-badge svg { width: 12px; height: 12px; }

.intro-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

.intro-hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Tombol CTA intro */
.intro-cta-row {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.intro-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-base);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
  letter-spacing: 0.01em;
}

.intro-btn-primary svg { width: 18px; height: 18px; }

.intro-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 240, 255, 0.5);
}

.intro-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: transparent;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.intro-btn-secondary svg { width: 18px; height: 18px; }

.intro-btn-secondary:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ---- Grid fitur ---- */
.intro-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.intro-feat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition);
  text-align: center;
}

.intro-feat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.feat-icon { font-size: 2rem; display: block; margin-bottom: var(--space-sm); }

.intro-feat-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

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

/* ---- Profil pembuat ---- */
.intro-author-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.intro-author-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.intro-author-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-purple));
}

.author-avatar-wrap { position: relative; flex-shrink: 0; }

.author-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 20px rgba(0, 240, 255, 0.2));
}

.author-verified-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--bg-base);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.4);
}

.author-info { flex: 1; min-width: 0; }

.author-role-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: var(--space-sm);
}

.author-name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.author-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.author-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.author-meta-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.author-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }

.author-quote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
}

/* ---- Statistik ---- */
.intro-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.intro-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition: var(--transition);
}

.intro-stat:hover {
  border-color: var(--border-active);
  box-shadow: 0 0 20px var(--accent-glow);
}

.stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ---- Strip teknologi ---- */
.intro-tech-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.tech-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.tech-sep { color: var(--text-muted); }

/* ---- Footer intro ---- */
.intro-footer {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.intro-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.intro-footer strong { color: var(--text-secondary); }

/* ================================================================
   HALAMAN PETUNJUK PENGGUNAAN
   ================================================================ */

.guide-page {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--bg-base);
  overflow-y: auto;
  animation: introPageIn 0.4s ease both;
}

.guide-page.hiding {
  animation: introPageOut 0.3s ease forwards;
}

.guide-container {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* ---- Header petunjuk ---- */
.guide-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10;
  padding-top: var(--space-md);
}

.guide-back-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.guide-back-btn svg { width: 16px; height: 16px; }

.guide-back-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.guide-header-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.guide-header-title svg   { width: 22px; height: 22px; flex-shrink: 0; }
.guide-header-title h1    { font-size: clamp(0.9rem, 2.5vw, 1.2rem); font-weight: 700; color: var(--text-primary); }

/* ---- Body petunjuk ---- */
.guide-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.guide-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gc, var(--accent)), transparent);
  opacity: 0.7;
}

.guide-card:hover { border-color: var(--border-active); }

.guide-card-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--gc, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gc, var(--accent)) 25%, transparent);
  border-radius: var(--radius-md);
}

.guide-card-body    { flex: 1; min-width: 0; }

.guide-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.guide-ol {
  padding-left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.guide-ol li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--space-sm);
}

.guide-ol li::marker { color: var(--accent); font-weight: 700; }

.guide-ol code {
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82em;
}

/* Steps bergaya */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.gs-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.gs-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.gs-item > div {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.gs-item > div strong { color: var(--text-primary); }
.gs-item > div em    { color: var(--text-muted); font-style: normal; }

kbd {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: var(--text-primary);
}

.guide-tip {
  background: rgba(0, 240, 255, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: var(--space-sm);
}

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

.guide-p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

/* Grid efek suara */
.guide-sound-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.sound-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.sound-icon { font-size: 1rem; flex-shrink: 0; }

/* Grid kompatibilitas */
.guide-compat-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.compat-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.compat-item.compat-ok   { border-color: rgba(34, 197, 94, 0.2); }
.compat-item.compat-warn { border-color: rgba(245, 158, 11, 0.2); }

.compat-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

.compat-item div   { display: flex; flex-direction: column; gap: 2px; }
.compat-item strong { font-size: 0.85rem; color: var(--text-primary); }
.compat-item span  { font-size: 0.78rem; color: var(--text-secondary); }

/* ---- Navigasi bawah petunjuk ---- */
.guide-bottom-nav {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-xl) 0 var(--space-2xl);
  border-top: 1px solid var(--border);
}
