/* ============================================================
   InterviewPrep Pro — Main Stylesheet
   Design: Clean dark-navy + gold accent, editorial feel
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ───────────────────────────────────────────── */
:root {
  --navy:       #0d1b2a;
  --navy-mid:   #122338;
  --navy-light: #1a3050;
  --gold:       #e8a44a;
  --gold-light: #f2bf7a;
  --gold-pale:  #fdf0d5;
  --teal:       #2dd4bf;
  --red-soft:   #f87171;
  --white:      #f8fafc;
  --grey-100:   #e2e8f0;
  --grey-400:   #94a3b8;
  --grey-600:   #475569;
  --surface:    #132030;
  --surface-2:  #1e3347;
  --border:     rgba(255,255,255,.08);
  --shadow-lg:  0 24px 60px rgba(0,0,0,.45);
  --shadow-md:  0 8px 24px rgba(0,0,0,.3);
  --radius:     12px;
  --radius-sm:  6px;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; }
p  { color: var(--grey-100); }

/* ── Navigation ─────────────────────────────────────────── */
.navbar {
  background: rgba(13,27,42,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: .9rem 0;
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 900;
  color: var(--white); letter-spacing: -.02em;
}
.navbar-brand span { color: var(--gold); }
.navbar-nav { display: flex; gap: 1.5rem; align-items: center; list-style: none; }
.navbar-nav a { color: var(--grey-100); font-weight: 500; font-size: .95rem; }
.navbar-nav a:hover { color: var(--gold); }
.nav-badge {
  background: var(--gold); color: var(--navy);
  font-size: .7rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 99px; margin-left: .3rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.nav-badge.trial { background: var(--teal); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  border: none; cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,164,74,.4); }
.btn-outline {
  background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--grey-100); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--grey-400); color: var(--white); }
.btn-danger { background: var(--red-soft); color: var(--navy); }
.btn-danger:hover { background: #f04343; color: #fff; }
.btn-sm { padding: .35rem .9rem; font-size: .82rem; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-hover:hover {
  border-color: rgba(232,164,74,.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: all var(--transition);
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block; margin-bottom: .4rem;
  font-weight: 500; font-size: .88rem; color: var(--grey-100);
}
.form-control {
  width: 100%; padding: .65rem 1rem;
  background: var(--navy-light); color: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem;
  transition: border-color var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(232,164,74,.15);
}
.form-control:disabled { opacity: .5; cursor: not-allowed; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-control::placeholder { color: var(--grey-600); }

/* ── Alerts / Flash ─────────────────────────────────────── */
.alert {
  padding: .85rem 1.2rem; border-radius: var(--radius-sm);
  font-size: .92rem; font-weight: 500; margin-bottom: 1rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(45,212,191,.12); border-color: var(--teal); color: var(--teal); }
.alert-error   { background: rgba(248,113,113,.12); border-color: var(--red-soft); color: var(--red-soft); }
.alert-info    { background: rgba(232,164,74,.1);   border-color: var(--gold); color: var(--gold-light); }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(232,164,74,.12), transparent),
              radial-gradient(ellipse 50% 40% at 100% 50%, rgba(45,212,191,.06), transparent);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block; padding: .3rem .8rem;
  background: rgba(232,164,74,.15); border: 1px solid rgba(232,164,74,.3);
  border-radius: 99px; font-size: .8rem; font-weight: 600;
  color: var(--gold); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { max-width: 580px; margin: 0 auto 2rem; font-size: 1.1rem; color: var(--grey-400); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.filter-bar-title {
  font-family: var(--font-body); font-weight: 600;
  font-size: .82rem; color: var(--grey-400);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 1rem;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}
.filter-loading {
  position: relative;
}
.filter-loading::after {
  content: '';
  position: absolute; right: 2.5rem; top: 50%;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: spin .6s linear infinite;
  display: none;
}
.filter-loading.loading::after { display: block; }

/* ── Question Cards ──────────────────────────────────────── */
.questions-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem;
}
.questions-count {
  font-size: .88rem; color: var(--grey-400);
}
.questions-count strong { color: var(--gold); }

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: all var(--transition);
  overflow: hidden;
}
.question-card:hover { border-color: rgba(232,164,74,.2); }

.question-header {
  display: flex; align-items: flex-start;
  gap: 1rem; padding: 1.25rem 1.5rem;
  cursor: pointer;
}
.question-number {
  min-width: 2rem; height: 2rem;
  background: rgba(232,164,74,.12); border: 1px solid rgba(232,164,74,.25);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .8rem; color: var(--gold);
  font-weight: 700; flex-shrink: 0;
}
.question-text {
  flex: 1; font-weight: 500; font-size: 1rem; color: var(--white);
  line-height: 1.55;
}
.question-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.tag {
  display: inline-block; padding: .15rem .55rem;
  background: rgba(255,255,255,.06); border-radius: 99px;
  font-size: .72rem; color: var(--grey-400); font-weight: 500;
}
.tag-level { background: rgba(45,212,191,.1); color: var(--teal); }

.question-toggle {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0; padding: 0 .5rem;
}
.answer-checkbox-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .83rem; color: var(--grey-400); cursor: pointer;
  white-space: nowrap; user-select: none;
}
.answer-checkbox { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

.answer-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--navy-mid);
}
.answer-panel.visible { display: block; }
.answer-panel p,
.answer-panel li  { color: var(--grey-100); font-size: .95rem; }
.answer-panel ul,
.answer-panel ol  { padding-left: 1.5rem; }
.answer-panel li  { margin-bottom: .4rem; }
.answer-panel pre {
  background: #0a1420; border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-sm); padding: 1.2rem;
  overflow-x: auto; margin: 1rem 0;
}
.answer-panel code {
  font-family: var(--font-mono); font-size: .85rem; color: var(--teal);
}
.answer-panel pre code { color: #e2e8f0; }
.answer-panel strong { color: var(--white); }

.answer-hint {
  margin-top: 1rem; padding: .75rem 1rem;
  background: rgba(232,164,74,.06);
  border-left: 3px solid rgba(232,164,74,.4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .87rem; color: var(--grey-400);
}
.answer-hint strong { color: var(--gold-light); }

/* ── Paywall overlay ─────────────────────────────────────── */
.paywall-banner {
  background: linear-gradient(135deg, rgba(232,164,74,.08), rgba(45,212,191,.04));
  border: 1px solid rgba(232,164,74,.3);
  border-radius: var(--radius);
  padding: 2rem; text-align: center;
  margin: 2rem 0;
}
.paywall-banner h3 { color: var(--gold); margin-bottom: .5rem; }
.paywall-banner p  { color: var(--grey-400); margin-bottom: 1.2rem; font-size: .95rem; }

.trial-counter {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.25);
  border-radius: 99px; padding: .3rem .9rem;
  font-size: .82rem; color: var(--teal); font-weight: 600;
  margin-bottom: 1rem;
}
.trial-counter svg { width: 14px; height: 14px; }

/* ── Empty / Loading states ──────────────────────────────── */
.state-box {
  text-align: center; padding: 4rem 2rem;
  color: var(--grey-600);
}
.state-box svg { margin: 0 auto 1rem; opacity: .35; }
.state-box h3  { font-family: var(--font-body); font-weight: 600; color: var(--grey-400); }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card { height: 80px; margin-bottom: .75rem; border-radius: var(--radius); }

/* ── Category Pill Grid ──────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.category-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.category-pill:hover, .category-pill.active {
  border-color: var(--gold);
  background: rgba(232,164,74,.07);
}
.category-pill svg { margin: 0 auto .6rem; color: var(--gold); }
.category-pill span { font-size: .88rem; font-weight: 500; color: var(--white); display: block; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--grey-600);
  font-size: .88rem;
  text-align: center;
}

/* ── Utilities ───────────────────────────────────────────── */
.text-gold  { color: var(--gold); }
.text-teal  { color: var(--teal); }
.text-muted { color: var(--grey-400); }
.mt-1  { margin-top: .5rem; } .mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-2  { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex  { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 1rem; } .gap-1 { gap: .5rem; }
.w-full { width: 100%; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.hidden { display: none !important; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes spin    { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fadeIn  { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }
.fade-in { animation: fadeIn .35s ease forwards; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-nav { gap: .75rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .question-header { flex-direction: column; gap: .75rem; }
  .question-toggle { align-self: flex-start; }
}
@media (max-width: 480px) {
  .navbar-nav .hide-mobile { display: none; }
  .hero-actions { flex-direction: column; align-items: center; }
}
