/* ===== Квиз-Дуэль: дизайн-токены и база (стилистика Т-Банка 2.0) ===== */
:root {
  --yellow: #FFDD2D;
  --yellow-soft: #FFF9D9;
  --yellow-deep: #F5C400;
  --yellow-grad: linear-gradient(135deg, #FFDD2D 0%, #F5C400 100%);
  --yellow-grad-subtle: linear-gradient(180deg, #FFFDF0 0%, #FFF8D4 100%);
  --ink: #1D2024;
  --ink-light: #2A2E35;
  --ink-soft: #6A7077;
  --ink-faint: #A4A9B0;
  --bg: #F0F2F5;
  --card: #FFFFFF;
  --danger: #F53636;
  --danger-soft: #FFF1F0;
  --ok: #00B341;
  --ok-soft: #EDFDF2;
  --radius: 20px;
  --radius-s: 14px;
  --radius-xs: 8px;
  --shadow-sm: 0 2px 8px rgba(29, 32, 36, 0.05);
  --shadow: 0 4px 16px rgba(29, 32, 36, 0.06), 0 1px 3px rgba(29, 32, 36, 0.03);
  --shadow-lg: 0 12px 32px rgba(29, 32, 36, 0.10), 0 2px 8px rgba(29, 32, 36, 0.04);
  --shadow-yellow: 0 6px 20px rgba(245, 196, 0, 0.35);
  --border-subtle: 1px solid rgba(29, 32, 36, 0.06);
  --font: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, #FFFFFF 0%, #F0F2F5 60%);
  background-attachment: fixed;
  font-size: 16px;
  line-height: 1.45;
}
#app { max-width: 480px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.subtitle { color: var(--ink-soft); font-size: 14px; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--ink-soft); font-size: 13px; }
.b { font-weight: 800; }
.yellow-text { color: var(--yellow-deep); }

/* --- Базовые блоки --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: var(--border-subtle);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: fadeIn .25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.card--highlight {
  background: var(--yellow-grad-subtle);
  border-color: rgba(245, 196, 0, 0.3);
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--yellow-grad); color: var(--ink);
  font-weight: 800; font-size: 13px;
  box-shadow: 0 2px 6px rgba(245, 196, 0, 0.25);
}
.chip--ghost {
  background: #EEF0F3; color: var(--ink-soft);
  box-shadow: none; font-weight: 700;
}

/* --- Кнопки --- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; border-radius: 16px; cursor: pointer;
  font-family: var(--font); font-weight: 800; font-size: 16px;
  padding: 15px 20px; transition: transform .12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .15s ease, opacity .15s ease;
  text-align: center; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none !important; }
.btn--primary {
  background: var(--yellow-grad);
  color: var(--ink);
  box-shadow: var(--shadow-yellow);
}
.btn--primary:hover {
  box-shadow: 0 8px 24px rgba(245, 196, 0, 0.45);
}
.btn--pulse {
  animation: qd-pulse 2.2s infinite;
}
.btn--dark {
  background: linear-gradient(180deg, #2A2E35 0%, #1D2024 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(29, 32, 36, 0.15);
}
.btn--dark:hover {
  box-shadow: 0 6px 18px rgba(29, 32, 36, 0.22);
}
.btn--ghost {
  background: transparent; color: var(--ink-soft);
  font-weight: 700; padding: 10px; border: 1px solid transparent;
}
.btn--ghost:hover {
  color: var(--ink); background: rgba(29, 32, 36, 0.04);
}
.btn--sm {
  width: auto; display: inline-flex; font-size: 13px;
  padding: 8px 14px; border-radius: var(--radius-s);
}

/* --- Пульсация --- */
@keyframes qd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 221, 45, .55); }
  50% { box-shadow: 0 0 0 10px rgba(255, 221, 45, 0); }
}

/* --- Анимации появления --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(.85); }
  70% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
.pop { animation: popIn .3s cubic-bezier(0.16, 1, 0.3, 1); }

/* --- Всплывающие очки (+300) --- */
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(12px) scale(.75); }
  25% { opacity: 1; transform: translateY(0) scale(1.1); }
  75% { opacity: 1; transform: translateY(-24px) scale(1.02); }
  100% { opacity: 0; transform: translateY(-48px) scale(0.9); }
}
.points-float {
  position: fixed; z-index: 60; pointer-events: none;
  font-weight: 800; font-size: 26px; color: var(--ink);
  background: var(--yellow-grad); border-radius: 14px; padding: 6px 16px;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(255, 221, 45, 0.5);
  animation: floatUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Баннеры --- */
.banner {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius-s); padding: 12px 14px;
  font-size: 14px; font-weight: 700;
  border: 1px solid transparent;
}
.banner--warn {
  background: var(--danger-soft); color: #C43A2F;
  border-color: rgba(245, 54, 54, 0.15);
}
.banner--info {
  background: var(--yellow-soft); color: var(--ink);
  border-color: rgba(245, 196, 0, 0.25);
}

/* --- Инпуты --- */
.input {
  width: 100%; border: 2px solid #E4E7EB; border-radius: var(--radius-s);
  padding: 14px 16px; font-family: var(--font); font-size: 16px; font-weight: 700;
  color: var(--ink); background: #fff; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(255, 221, 45, 0.2);
}
.input::placeholder { color: var(--ink-faint); font-weight: 500; }
.label {
  display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft);
  margin: 0 0 6px 4px; text-transform: uppercase; letter-spacing: .06em;
}

/* --- Скелетон с переливом (shimmer) --- */
.skel {
  background: linear-gradient(90deg, #EAECEF 25%, #F4F6F8 50%, #EAECEF 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-s);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Тост --- */
#toast-box {
  position: fixed; left: 0; right: 0; bottom: 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; z-index: 100; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 700;
  border-radius: 14px; padding: 12px 18px; max-width: 90%;
  box-shadow: var(--shadow-lg);
  animation: popIn .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast--err {
  background: var(--danger);
  box-shadow: 0 8px 24px rgba(245, 54, 54, 0.35);
}

/* --- Шапка экрана --- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.back-btn {
  width: 40px; height: 40px; border-radius: 12px; border: var(--border-subtle);
  cursor: pointer; background: #fff; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); flex: 0 0 auto;
  transition: transform .08s ease, background .15s ease;
}
.back-btn:active { transform: scale(.92); }
.topbar .title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }

/* --- Иконки SVG (инлайн) --- */
.qd-icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; fill: currentColor; }
.qd-icon--sm { width: 16px; height: 16px; }
.qd-icon--lg { width: 28px; height: 28px; }

/* --- Автокомпакт под небольшие экраны --- */
@media (max-width: 480px) {
  #app { padding: 12px 12px 28px; }
  .card { padding: 16px; }
  .btn { font-size: 15px; padding: 13px 16px; }
  .topbar { margin-bottom: 12px; }
  .banner { padding: 10px 12px; }
}
@media (max-height: 700px) and (max-width: 480px) {
  .card { padding: 14px; }
  .btn { padding: 11px 14px; }
}
