/* ══════════════════════════════════════════════
   02-splash-guide.css
   Splash Screen & Petunjuk Penggunaan Modal
   ══════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   SPLASH SCREEN
───────────────────────────────────────────── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Particle overlay inside splash */
.splash-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-particle {
  position: absolute;
  border-radius: 50%;
  animation: floatParticle linear infinite;
  opacity: 0;
}

@keyframes floatParticle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* Logo area */
.splash-logo {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: fadeInScale 0.8s ease 0.3s both;
}

.splash-logo-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  animation: spin 8s linear infinite;
  box-shadow: var(--shadow-glow);
}

.splash-logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  animation: spin 3s linear infinite;
}

.splash-logo-inner {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--accent);
  animation: spin 8s linear infinite reverse;
  line-height: 1;
}

.splash-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.splash-title span {
  color: var(--accent);
  font-family: var(--font-mono);
}

.splash-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 380px;
  line-height: 1.6;
}

/* Loading bar */
.splash-loader {
  width: 220px;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.splash-loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  width: 0%;
  transition: width 0.1s linear;
}

.splash-loader-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  min-height: 1.2em;
}

/* Skip button */
.splash-skip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}
.splash-skip:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

/* Version tag */
.splash-version {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  z-index: 2;
}

/* ─────────────────────────────────────────────
   PETUNJUK PENGGUNAAN MODAL
───────────────────────────────────────────── */
#guide-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#guide-modal.open {
  opacity: 1;
  visibility: visible;
}

.guide-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md), 0 0 60px rgba(0,212,161,0.08);
  animation: slideInUp 0.35s ease;
  position: relative;
}

.guide-header {
  padding: 24px 28px 0;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 0;
}

.guide-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.guide-title-wrap { flex: 1; }
.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 99px;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.guide-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

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

.guide-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.guide-close:hover {
  background: rgba(255,77,109,0.1);
  border-color: var(--red);
  color: var(--red);
}

/* Tab nav inside guide */
.guide-tabs {
  display: flex;
  gap: 4px;
  padding: 0 4px;
}

.guide-tab {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.guide-tab:hover { color: var(--text-primary); }
.guide-tab.active {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent);
  font-weight: 600;
}

/* Guide content panes */
.guide-body { padding: 20px 28px 28px; }

.guide-pane { display: none; animation: fadeIn 0.25s ease; }
.guide-pane.active { display: block; }

/* Feature list */
.guide-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.guide-feature-item:hover {
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

.guide-feat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.guide-feat-body { flex: 1; }
.guide-feat-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.guide-feat-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.guide-feat-tag {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  background: var(--accent2-glow);
  border-radius: 99px;
  font-size: 0.65rem;
  color: var(--accent2);
  font-weight: 600;
}

/* Steps */
.guide-steps { display: flex; flex-direction: column; gap: 0; }

.guide-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 20px;
}
.guide-step:last-child { padding-bottom: 0; }

.guide-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--border-accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.guide-step-line {
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.guide-step:last-child .guide-step-line { display: none; }

.guide-step-content { padding-top: 4px; flex: 1; }
.guide-step-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.guide-step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Shortcut table */
.guide-shortcut-table {
  width: 100%;
  border-collapse: collapse;
}
.guide-shortcut-table th,
.guide-shortcut-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.guide-shortcut-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.guide-shortcut-table td { color: var(--text-primary); }
.guide-shortcut-table tr:last-child td { border-bottom: none; }

kbd {
  display: inline-block;
  padding: 2px 7px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
}

/* Guide footer */
.guide-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-btn-start {
  padding: 10px 24px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-btn-start:hover {
  background: #00f0b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,212,161,0.3);
}

/* Guide trigger button (in nav/sidebar) */
.guide-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.guide-trigger-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── Sound toggle in sidebar ── */
.sound-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin: 0 8px 4px;
}
.sound-toggle-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.toggle-switch {
  width: 34px;
  height: 18px;
  background: var(--border);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  outline: none;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform var(--transition);
}
.toggle-switch.on::after { transform: translateX(16px); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .guide-panel { border-radius: var(--radius-lg); }
  .guide-header { padding: 16px 16px 12px; }
  .guide-body   { padding: 16px; }
  .guide-footer { padding: 12px 16px; }
  .guide-tabs   { overflow-x: auto; padding-bottom: 4px; }
  .guide-tab    { font-size: 0.72rem; padding: 6px 10px; }
}
