:root {
  --bg: #f6efe3;
  --bg-accent: #fff7ef;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: #f2e7d8;
  --text-main: #261b14;
  --text-soft: #6f5d50;
  --text-faint: #8f7b6c;
  --brand: #ff8a3d;
  --brand-strong: #e66717;
  --brand-pale: #fff0e4;
  --line: rgba(125, 85, 55, 0.16);
  --shadow: 0 18px 50px rgba(103, 62, 24, 0.12);
  --success: #16835d;
  --success-bg: #e9f8f1;
  --danger: #c64f49;
  --danger-bg: #fff0ee;
}

body {
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 188, 132, 0.35), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 224, 170, 0.3), transparent 18%),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 55%, #f4ebde 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.app-shell {
  position: relative;
}

.hero-panel,
.filters-panel,
.question-card,
.info-card,
.ad-slot {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel,
.filters-panel,
.info-card,
.question-card {
  border-radius: 28px;
}

.hero-panel,
.filters-panel,
.info-card {
  padding: 1.6rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--brand-pale);
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1;
  margin-top: 0.9rem;
  color: #1e130d;
}

.hero-copy,
.support-text,
.info-card p,
.hero-mini-card p,
.question-helper {
  color: var(--text-soft);
}

.hero-copy {
  font-size: 1.12rem;
  max-width: 58rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-point {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 138, 61, 0.16);
  color: #5a4132;
  font-size: 0.93rem;
  font-weight: 700;
}

.hero-mini-card {
  height: 100%;
  padding: 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8f0 0%, #fff 100%);
  border: 1px solid rgba(255, 138, 61, 0.18);
}

.hero-mini-label {
  margin-bottom: 0.6rem;
  color: var(--brand-strong);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

.category-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid rgba(150, 112, 77, 0.16);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.category-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 103, 23, 0.34);
  box-shadow: 0 10px 20px rgba(136, 79, 37, 0.08);
}

.category-pill.is-active {
  background: linear-gradient(135deg, #ffeddc 0%, #ffe2c2 100%);
  border-color: rgba(230, 103, 23, 0.42);
  box-shadow: 0 12px 24px rgba(230, 103, 23, 0.12);
}

.category-pill-emoji {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff;
  font-size: 1rem;
}

.category-pill-text {
  font-weight: 700;
  font-size: 0.98rem;
  color: #3f2e24;
}

.question-card {
  max-width: 880px;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 240, 0.98) 100%);
}

.question-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.question-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.question-category,
.question-format {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.question-category {
  background: var(--brand-pale);
  color: var(--brand-strong);
}

.question-format {
  background: #f5efe7;
  color: #6d5849;
}

.question-title {
  color: #1f140e;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.18;
}

.option-button {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 88px;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 112, 82, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.option-button:hover:enabled,
.option-button:focus-visible:enabled {
  transform: translateY(-2px);
  border-color: rgba(230, 103, 23, 0.32);
  background: #fff7ef;
  box-shadow: 0 12px 24px rgba(133, 83, 36, 0.08);
}

.option-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.option-letter {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #f6ecdf;
  color: #694b35;
  font-weight: 800;
  flex-shrink: 0;
}

.option-button.is-correct {
  background: var(--success-bg);
  border-color: rgba(22, 131, 93, 0.34);
}

.option-button.is-correct .option-letter {
  background: rgba(22, 131, 93, 0.14);
  color: var(--success);
}

.option-button.is-incorrect {
  background: var(--danger-bg);
  border-color: rgba(198, 79, 73, 0.32);
}

.option-button.is-incorrect .option-letter {
  background: rgba(198, 79, 73, 0.12);
  color: var(--danger);
}

.feedback-box {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
}

.feedback-box.success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(22, 131, 93, 0.2);
}

.feedback-box.error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(198, 79, 73, 0.18);
}

.question-actions {
  display: flex;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 800;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #ff7b27 0%, #d85d12 100%);
  border-color: transparent;
}

.btn-outline-primary {
  border-color: rgba(230, 103, 23, 0.28);
  color: var(--brand-strong);
  font-weight: 800;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background: var(--brand-pale);
  border-color: rgba(230, 103, 23, 0.34);
  color: var(--brand-strong);
}

.info-card h2 {
  color: #2a1d15;
}

.ad-column {
  display: flex;
}

.ad-slot {
  width: 100%;
  border-radius: 22px;
  padding: 0.75rem;
  background: rgba(255, 251, 245, 0.82);
}

.ad-slot-vertical {
  min-height: 220px;
}

.ad-slot-horizontal {
  min-height: 54px;
}

.ad-label {
  margin-bottom: 0.45rem;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-placeholder {
  min-height: 78px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px dashed rgba(140, 98, 61, 0.22);
  background: #fffaf4;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.bottom-ad .ad-slot {
  max-width: 880px;
  margin: 0 auto;
}

.bottom-ad .ad-placeholder,
.bottom-ad .ad-slot-horizontal {
  min-height: 52px;
}

@media (max-width: 991px) {
  .hero-panel,
  .filters-panel,
  .info-card,
  .question-card {
    border-radius: 22px;
  }

  .hero-panel,
  .filters-panel,
  .info-card {
    padding: 1.25rem;
  }

  .question-card {
    padding: 1.35rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .category-pill-grid {
    gap: 0.6rem;
  }

  .category-pill {
    width: 100%;
    justify-content: flex-start;
  }
}
