/* Sporcle Spinoff — shared shell matching inaayat.xyz index.html / account.html */
:root {
  --cream: #faf3e3;
  --orange: #f2a154;
  --peach: #f6a98a;
  --teal: #b5d857;
  --red: #cf4520;
  --gold: #e3a72e;
  --gray: #d8d3c6;
  --ink: #1c1c1c;
  --panel: #fffdf8;
  --border-soft: 1.5px solid #1c1c1c22;
  --radius: 16px;
  --radius-sm: 12px;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}

.serif { font-family: var(--font-display); }
.brand-mono { font-family: var(--font-mono); }
.hidden { display: none; }

/* Layout: sidebar + scrollable content (mirrors index.html) */
.page-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
  gap: 16px;
}

@media (min-width: 768px) {
  body { height: 100vh; overflow: hidden; }
  .page-main { flex-direction: row; padding: 16px 40px 16px 16px; }
}

.sidebar {
  flex-shrink: 0;
  border-radius: 18px;
  padding: 20px;
  background: var(--cream);
  border: var(--border-soft);
}

@media (min-width: 768px) {
  .sidebar {
    width: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .sidebar { width: 340px; }
}

.sidebar-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
  text-decoration: none;
}

.sidebar-link:hover { opacity: 1; }
.sidebar-link.is-active { opacity: 1; }

.sidebar-project {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: var(--border-soft);
}

.sidebar-project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.sidebar-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  max-width: 26ch;
  opacity: 0.6;
  line-height: 1.45;
}

.content-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 0 24px;
}

@media (min-width: 768px) {
  .content-scroll { overflow-y: auto; height: 100%; }
}

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

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.page-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.6;
  margin: 4px 0 0;
}

.info-btn {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: var(--border-soft);
  background: transparent;
  color: var(--ink);
  opacity: 0.45;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 4px;
}

.info-btn:hover { opacity: 1; border-color: #1c1c1c44; }

/* Buttons & inputs (account.html patterns) */
.ss-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--orange);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ss-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.ss-btn.secondary {
  background: transparent;
  border: var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
}

.ss-btn.secondary:hover { background: var(--gray); }

.ss-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  border: var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  outline: none;
}

.ss-input:focus {
  border-color: var(--teal);
  background: #fff;
}

/* Info popover */
.info-popover {
  position: fixed;
  z-index: 20;
  width: 18rem;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: var(--border-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.info-popover code {
  background: var(--gray);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
}

/* Catalog: quiz type sections */
.quiz-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .quiz-sections { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .quiz-sections { grid-template-columns: repeat(3, 1fr); }
}

.type-block {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: 280px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px;
  border: var(--border-soft);
}

.type-block-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-block-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

/* Quiz cards — mini item-card style */
.quiz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 52px;
}

.quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.quiz-card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quiz-card-blurb {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.65;
  margin-top: 2px;
  line-height: 1.35;
}

.card-orange { background: var(--orange); }
.card-peach  { background: var(--peach); }
.card-teal   { background: var(--teal); }
.card-red    { background: var(--red); color: #fdf3e7; }
.card-red .quiz-card-blurb { opacity: 0.7; }
.card-gold   { background: var(--gold); }

.no-results {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.55;
  padding: 24px 0;
}
