/* ============================================================
   GOALIE VAULT — Main Stylesheet
   ============================================================ */

:root {
  --bg:        #121212;
  --surface:   #1e1e1e;
  --surface-2: #2a2a2a;
  --accent:    #00f2ff;
  --accent-dim:#007a82;
  --text:      #e8e8e8;
  --text-muted:#888;
  --radius:    12px;
  --font:      'Inter', sans-serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.vault-header {
  background: #0a0a0a;
  border-bottom: 1px solid #2a2a2a;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.vault-header__logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}
.vault-header__logo:hover { text-decoration: none; }

/* ── Main container ── */
.vault-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ── Hero ── */
.vault-hero {
  text-align: center;
  padding: 40px 16px 32px;
}
.vault-hero__logo {
  width: 100px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(0,242,255,0.2);
  margin-bottom: 16px;
}
.vault-hero__title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}
.vault-hero__sub {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid #333;
  border-radius: 30px;
  padding: 7px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ── Drill grid ── */
.drill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

/* ── Drill card ── */
.drill-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #2a2a2a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.drill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,242,255,0.1);
  border-color: var(--accent-dim);
}
.drill-card.hidden { display: none; }

.drill-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  display: block;
}

/* Instagram placeholder thumbnail */
.drill-card__thumb--ig {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.drill-card__body {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drill-card__tag {
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--accent-dim);
}

.drill-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.drill-card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
}

.drill-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.drill-card__link:hover { text-decoration: none; }

/* ── No results ── */
.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  display: none;
}
.no-results.visible { display: block; }

/* ── Section heading ── */
.vault-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a2a;
}

/* ============================================================
   POST PAGE
   ============================================================ */

.post-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.post-header {
  margin-bottom: 24px;
  text-align: center;
}

.post-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.post-header__title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
}

.post-header__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.post-header__handle {
  color: var(--accent);
  font-weight: 700;
}

/* ── Video embed ── */
.video-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 24px;
  border: 1px solid #2a2a2a;
}

.video-wrapper--youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.video-wrapper--youtube iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video-wrapper--instagram {
  min-height: 480px;
}
.video-wrapper--instagram .instagram-media {
  width: 100% !important;
  min-width: auto !important;
  margin: 0 auto !important;
  border: 0 !important;
}

/* ── Description box ── */
.post-description {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
  white-space: pre-line;
}

/* ── Post body text ── */
.post-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 32px;
}

/* ── Back button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid #333;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}
.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Footer disclaimer ── */
.post-disclaimer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
  font-size: 0.72rem;
  color: #555;
  text-align: center;
  line-height: 1.6;
}
.post-disclaimer a { color: #555; }
.post-disclaimer a:hover { color: var(--accent); }

/* ── Global footer ── */
.vault-footer {
  text-align: center;
  padding: 40px 16px;
  font-size: 0.75rem;
  color: #444;
  border-top: 1px solid #1e1e1e;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .vault-hero__title { font-size: 1.5rem; }
  .drill-grid { grid-template-columns: 1fr; }
  .post-header__title { font-size: 1.3rem; }
}

/* ============================================================
   QUIZ
   ============================================================ */

/* Nav */
.vault-nav { display: flex; gap: 20px; }
.vault-nav a { color: var(--text-muted); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none; }
.vault-nav a:hover, .vault-nav a.active { color: var(--accent); text-decoration: none; }

/* Quiz index grid */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.quiz-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #2a2a2a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.quiz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,242,255,0.1);
  border-color: var(--accent-dim);
  text-decoration: none;
}
.quiz-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
  display: block;
}
.quiz-card__thumb--placeholder {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-card__body { padding: 14px 16px 18px; }
.quiz-card__count {
  display: inline-block;
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.quiz-card__title { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.quiz-card__desc  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* Splash */
.quiz-splash {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 32px 16px;
}
.quiz-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 480px;
  width: 100%;
  gap: 12px;
}
.quiz-splash__title { font-size: 2rem; font-weight: 900; color: #fff; }
.quiz-splash__desc  { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.quiz-splash__meta  { color: var(--accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.quiz-splash__optional {
  font-size: 0.8em;
  opacity: 0.55;
  font-weight: 400;
}

.quiz-splash__label { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; align-self: flex-start; margin-top: 8px; }

/* Shared input */
.quiz-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid #333;
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.15s;
}
.quiz-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,242,255,0.15); }

/* Shared button */
.quiz-btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 30px;
  padding: 12px 32px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quiz-btn--primary {
  background: var(--accent);
  color: #000;
}
.quiz-btn--primary:hover:not(:disabled) { background: #33f5ff; }
.quiz-btn--primary:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; }

/* Progress */
.quiz-progress-wrap {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}
.quiz-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.3s ease;
}

/* Question screen */
.quiz-question-screen { max-width: 640px; margin: 40px auto; padding: 0 16px; }
.quiz-question-inner { display: flex; flex-direction: column; gap: 16px; }
.quiz-counter { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.quiz-q-text  { font-size: 1.25rem; font-weight: 800; color: #fff; line-height: 1.4; }

/* Options */
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid #333;
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--accent-dim); }
.quiz-option.selected { border: 2px solid var(--accent); background: var(--surface); color: #fff; }
.quiz-option.option-correct { border: 2px solid var(--accent); background: #0a2e2e; color: var(--accent); }
.quiz-option.option-wrong   { border: 2px solid #c0392b; background: #2e0a0a; color: #ff6b6b; }
.quiz-option.option-missed  { border: 2px dashed var(--accent); background: #0a1e1e; color: var(--accent); opacity: 0.8; }
.quiz-option:disabled { cursor: not-allowed; }

/* Inline explanation */
.quiz-explanation {
  border-left: 3px solid var(--accent);
  background: #0e2a2a;
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Results */
.quiz-results { max-width: 640px; margin: 40px auto; padding: 0 16px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.quiz-results__header { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.quiz-chart-wrap { position: relative; width: 280px; height: 280px; }
.quiz-score-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  pointer-events: none;
}
.quiz-score-text { color: var(--text-muted); font-size: 1rem; }

/* Breakdown */
.quiz-breakdown { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.quiz-breakdown__title { font-size: 1rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.quiz-bd-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid transparent;
}
.quiz-bd-card--correct { border-left-color: var(--accent); }
.quiz-bd-card--wrong   { border-left-color: #c0392b; }
.quiz-bd-top   { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.quiz-bd-q     { font-weight: 700; color: #fff; font-size: 0.95rem; line-height: 1.4; }
.quiz-bd-detail { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; }
.quiz-bd-label  { font-weight: 700; }
.quiz-ans-correct { color: var(--accent); font-weight: 700; }
.quiz-ans-wrong   { color: #ff6b6b; }
.quiz-bd-explanation {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  border-top: 1px solid #2a2a2a;
  padding-top: 8px;
}

@media (max-width: 480px) {
  .quiz-chart-wrap { width: 220px; height: 220px; }
  .quiz-score-label { font-size: 1.5rem; }
  .quiz-splash__title { font-size: 1.5rem; }
}
