@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-0: #0a0e17;
  --bg-1: #0e1422;
  --bg-2: #121a2c;
  --surface: #131c30;
  --surface-2: #18233b;
  --border: rgba(124, 152, 214, 0.16);
  --border-strong: rgba(124, 152, 214, 0.34);
  --text: #eef3ff;
  --muted: #9fb0d0;
  --muted-2: #74849f;

  /* Splunk-inspired accents */
  --splunk-green: #65a637;
  --splunk-green-2: #7ed957;
  --splunk-pink: #ff4f90;
  --splunk-blue: #5b8cff;
  --accent: var(--splunk-green);

  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(101, 166, 55, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 79, 144, 0.08), transparent 55%),
    linear-gradient(180deg, #0c1220 0%, var(--bg-0) 70%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
a { color: var(--splunk-blue); }

.app-shell { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }

.sidebar {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.92), rgba(10, 15, 26, 0.78));
  backdrop-filter: blur(10px);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.content { padding: 34px; max-width: 1180px; width: 100%; }

.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.brand h1 { font-size: 1.18rem; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 0.9rem; }
.brand-badge {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-weight: 900; font-size: 1.2rem;
  background: linear-gradient(135deg, var(--splunk-green), var(--splunk-green-2));
  color: #08210a; box-shadow: 0 8px 22px rgba(101, 166, 55, 0.35);
}

.panel, .card, .subcard {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 16px; margin-bottom: 16px; }
.card { padding: 26px; margin-bottom: 20px; }
.subcard { padding: 18px; }
.hero {
  min-height: 150px; display: flex; align-items: center;
  background:
    linear-gradient(120deg, rgba(101, 166, 55, 0.10), rgba(255, 79, 144, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; color: var(--splunk-green-2); font-size: 0.74rem; font-weight: 800; }
.muted { color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.field span { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: #0c1430; color: var(--text);
}
.field input:focus-visible { outline: 2px solid var(--splunk-green); outline-offset: 1px; border-color: var(--splunk-green); }
.field input::placeholder { color: var(--muted-2); }

.status-line { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--splunk-green); box-shadow: 0 0 10px var(--splunk-green); }

.progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; margin-bottom: 10px; color: var(--muted); }
.progress-track { width: 100%; height: 12px; border-radius: 999px; background: #0a1330; border: 1px solid var(--border); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--splunk-green), var(--splunk-green-2)); transition: width 0.3s ease; }

.side-actions { display: grid; gap: 10px; }
.btn { border: 0; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 700; color: var(--text); transition: transform 0.08s ease, filter 0.15s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn:focus-visible { outline: 2px solid var(--splunk-green-2); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--splunk-green), #4f8a26); color: #06220a; }
.btn-secondary { background: var(--surface-2); border: 1px solid var(--border); }
.btn-success { background: linear-gradient(135deg, var(--splunk-pink), #d83b78); }
.btn-ghost { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.hidden { display: none; }

.question-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pill { border: 1px solid var(--border); background: #0c1530; color: #dfe8ff; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; text-transform: capitalize; font-weight: 600; }
#difficultyPill { border-color: rgba(255, 79, 144, 0.5); color: #ffc2da; }

.question-text { line-height: 1.22; margin: 12px 0 24px; font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.choices { display: grid; gap: 12px; }
.choice {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 18px; border-radius: 16px; border: 1px solid var(--border);
  background: rgba(20, 30, 54, 0.92); color: var(--text); cursor: pointer;
  transition: border-color 0.12s ease, transform 0.08s ease, background 0.12s ease;
}
.choice:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.choice:focus-visible { outline: 3px solid var(--splunk-green-2); outline-offset: 2px; }
.choice.selected { border-color: var(--splunk-green); background: rgba(101, 166, 55, 0.14); box-shadow: inset 0 0 0 1px var(--splunk-green); }
.choice-letter { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #0a1430; border: 1px solid var(--border); font-weight: 800; flex: 0 0 auto; }
.choice.selected .choice-letter { background: var(--splunk-green); color: #06220a; border-color: var(--splunk-green); }
.choice-copy { font-size: 1.0rem; font-weight: 500; line-height: 1.35; }

.results-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.band-chip { display: inline-block; margin-top: 6px; padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; border: 1px solid var(--border-strong); }
.band-ready { background: rgba(74, 222, 128, 0.16); color: #b6f7c9; border-color: rgba(74, 222, 128, 0.5); }
.band-near { background: rgba(91, 140, 255, 0.16); color: #cfe0ff; border-color: rgba(91, 140, 255, 0.5); }
.band-dev { background: rgba(251, 191, 36, 0.16); color: #ffe6ad; border-color: rgba(251, 191, 36, 0.5); }
.band-found { background: rgba(248, 113, 113, 0.16); color: #ffd0d0; border-color: rgba(248, 113, 113, 0.5); }

.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 22px; }
.metric-card { background: #0e1730; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.metric-card span { display: block; color: var(--muted); margin-bottom: 6px; font-size: 0.85rem; }
.metric-card strong { font-size: 1.7rem; }

.results-layout { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 18px; margin-bottom: 18px; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; gap: 7px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 0.95rem; }
.bar-track { height: 13px; border-radius: 999px; overflow: hidden; background: #0a1330; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--splunk-pink), var(--splunk-green-2)); }

#growthAreas ul { margin: 0; padding-left: 18px; }
#growthAreas li { margin-bottom: 9px; color: #dfe7fb; line-height: 1.35; }

/* Review (incorrect answers) */
.review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.review-list { display: grid; gap: 14px; margin-top: 12px; }
.review-item { border: 1px solid var(--border); border-left: 4px solid var(--splunk-pink); border-radius: 12px; padding: 16px; background: rgba(20, 30, 54, 0.6); }
.review-item .rq { font-weight: 700; margin: 0 0 10px; line-height: 1.35; }
.review-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.review-ans { display: grid; gap: 6px; font-size: 0.95rem; }
.ans-line { display: flex; gap: 8px; align-items: baseline; }
.ans-tag { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 6px; flex: 0 0 auto; }
.ans-tag.yours { background: rgba(248, 113, 113, 0.18); color: #ffd0d0; }
.ans-tag.correct { background: rgba(74, 222, 128, 0.18); color: #b6f7c9; }
.ans-tag.skipped { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.review-expl { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.review-perfect { color: #b6f7c9; font-weight: 600; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .score-grid, .results-layout { grid-template-columns: 1fr; }
}
