/* Bento Grid Dark — Ekosistem Web Hadiansyah (tryout.edithhadiansyah.com) */
:root {
  --bg-main: #09090b;
  --bg-card: #121217;
  --bg-card-hover: #17171f;
  --bg-elevated: #1b1b24;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.55);
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.16);
  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.14);
  --accent-rose: #f43f5e;
  --accent-rose-bg: rgba(244, 63, 94, 0.14);
  --accent-cyan: #06b6d4;
  --radius-bento: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

/* Notice Bar Atas */
.notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6ee7b7;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald-glow);
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-bento);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.span-12 { grid-column: span 12; }
.span-8  { grid-column: span 8; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-4  { grid-column: span 4; }

@media (max-width: 900px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 {
    grid-column: span 12;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 65ch;
}

/* Input & Form Lobby */
.input-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.bento-input {
  flex: 1;
  min-width: 210px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.bento-input:focus {
  border-color: var(--accent-emerald);
}

/* Paket Cards */
.paket-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
}

.paket-card.selected {
  border-color: var(--accent-emerald);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.09) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.paket-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
}

.pill.emerald {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.pill.amber {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--accent-amber-bg);
}

.pill.rose {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
  background: var(--accent-rose-bg);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-emerald);
  color: #042f2e;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: #23232e;
}

.btn-amber {
  background: var(--accent-amber-bg);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-amber.active {
  background: var(--accent-amber);
  color: #1c1917;
}

/* Spec List */
.spec-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.spec-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Exam Top Sticky Bar */
.exam-topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(18, 18, 23, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 18px;
}

.timer-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  letter-spacing: 0.05em;
}

.timer-box.warn {
  background: var(--accent-amber-bg);
  border-color: var(--accent-amber);
  color: #fbbf24;
}

.timer-box.danger {
  background: var(--accent-rose-bg);
  border-color: var(--accent-rose);
  color: #fb7185;
  animation: blinkFast 0.8s infinite;
}

@keyframes blinkFast {
  50% { opacity: 0.45; }
}

/* Opsi Jawaban A-E */
.question-body {
  font-size: 1.04rem;
  line-height: 1.75;
  margin: 16px 0 22px;
  padding: 18px;
  background: var(--bg-elevated);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.options-stack {
  display: grid;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-btn:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: #22222d;
}

.option-btn.selected {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.13);
}

.option-key {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.option-btn.selected .option-key {
  background: var(--accent-emerald);
  color: #042f2e;
  border-color: var(--accent-emerald);
}

/* Matriks Nomor 1-10 */
.num-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0 18px;
}

.num-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.num-cell.current {
  outline: 2px solid #38bdf8;
  color: var(--text-main);
}

.num-cell.answered {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.55);
  color: #6ee7b7;
}

.num-cell.ragu {
  background: var(--accent-amber-bg);
  border-color: var(--accent-amber);
  color: #fcd34d;
}

/* Progress Bar */
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 14px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* 3D Flip Score Card (/hasil/) */
.flip-scene {
  perspective: 1100px;
  width: 100%;
  min-height: 290px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 290px;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), #14141c 62%);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.flip-face.back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.18), #14141c 65%);
  border-color: rgba(6, 182, 212, 0.4);
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 10px;
}

/* Metric Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
}

.metric-val {
  font-size: 1.55rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Raw JSON Drawer */
.json-pre {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #070709;
  border: 1px solid var(--border-subtle);
  color: #a7f3d0;
  font-size: 0.78rem;
  overflow-x: auto;
  max-height: 300px;
  display: none;
}

.json-pre.show {
  display: block;
}

/* Toast Anti-Cheat */
.cheat-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  max-width: 360px;
  background: #1f1218;
  border: 1px solid var(--accent-rose);
  color: #fecdd3;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  display: none;
  font-size: 0.86rem;
}

.cheat-toast.show {
  display: block;
}

/* Review Accordion */
.review-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

/* Footer Seragam /@hadiansyah tanpa tahun */
.site-footer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-main);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ig-link:hover {
  border-color: var(--accent-emerald);
  color: #6ee7b7;
}
