@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #211827;
  --muted: #776b7c;
  --paper: #fff9fd;
  --panel: rgba(255, 255, 255, 0.9);
  --pink: #ff4f8b;
  --rose: #ff7a59;
  --teal: #00a896;
  --sky: #1677ff;
  --violet: #7c4dff;
  --line: rgba(42, 24, 48, 0.12);
  --shadow: 0 20px 60px rgba(94, 30, 74, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 89, 0.22), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(0, 168, 150, 0.2), transparent 26rem),
    linear-gradient(140deg, #fff3f8 0%, #f4fffb 52%, #fff6e9 100%);
}

button,
input,
a {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 22px 16px 34px;
}

.hero {
  padding: 16px 2px 22px;
}

.top-nav,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.top-nav {
  justify-content: flex-end;
  padding: 4px 2px 12px;
}

.top-nav a,
.site-footer a {
  color: #6d3150;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  color: #8f234d;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  margin-top: 16px;
  font-size: clamp(2.3rem, 12vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-top: 12px;
  font-size: 1.55rem;
  line-height: 1.15;
}

.hero p {
  max-width: 32rem;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.ad-slot {
  display: grid;
  min-height: 90px;
  margin: 0 0 16px;
  place-items: center;
  border: 1px dashed rgba(42, 24, 48, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.panel-heading small {
  color: var(--muted);
  font-weight: 700;
}

.progress-track {
  height: 10px;
  margin: 14px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e8ee;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--rose), var(--teal));
  transition: width 180ms ease;
}

.question-card {
  display: none;
}

.question-card.active {
  display: block;
  animation: cardIn 260ms ease both;
}

.question-kicker {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-title {
  margin-top: 8px;
  font-size: 1.45rem;
  line-height: 1.18;
}

.name-input {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: #fff;
  padding: 0 16px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.name-input:focus {
  border-color: var(--pink);
}

.options {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option span {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: #fff;
  padding: 8px 12px 8px 8px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700;
  line-height: 1.25;
}

.option-image {
  width: 78px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
}

.option b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.option input:checked + span {
  border-color: var(--pink);
  background: #fff2f7;
  box-shadow: 0 10px 28px rgba(255, 79, 139, 0.18);
  animation: optionPop 220ms ease both;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.single-action {
  grid-template-columns: 1fr;
}

button,
.share-btn {
  position: relative;
  overflow: hidden;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(0) scale(1);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button:active,
.share-btn:active,
button.pressed,
.share-btn.pressed {
  transform: translateY(2px) scale(0.97);
  filter: saturate(1.12);
}

button.pressed::after,
.share-btn.pressed::after {
  animation: pressGlow 360ms ease-out;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  content: "";
  height: 20px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
}

.primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 79, 139, 0.28);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.full {
  width: 100%;
}

.hidden {
  display: none;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #ecfff9;
  color: #047566;
  font-weight: 800;
}

.muted {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.55;
}

.link-box {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 10px;
  margin-top: 18px;
}

.link-box input {
  min-width: 0;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 0 13px;
  color: var(--muted);
}

.icon-button {
  background: var(--ink);
  color: #fff;
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 16px 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.whatsapp {
  background: #19a866;
}

.facebook {
  background: #1877f2;
}

.instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.native {
  background: var(--violet);
}

.score-ring {
  display: grid;
  width: 132px;
  height: 132px;
  margin: 4px auto 12px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 60%),
    conic-gradient(var(--teal) var(--score-deg, 0deg), #f2e8ef 0);
}

.score-ring span {
  font-size: 1.8rem;
  font-weight: 900;
}

.result-panel {
  text-align: center;
}

.answer-review {
  margin: 18px 0 0;
  text-align: left;
}

.leaderboard {
  margin-top: 18px;
  text-align: left;
}

.leaderboard-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

.leaderboard-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.leader-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.leader-row:first-of-type {
  border-top: 0;
}

.leader-row.current {
  color: #047566;
  font-weight: 900;
}

.rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #fff2f7;
  color: var(--pink);
  font-weight: 900;
}

.friend-score-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px;
}

.review-item strong {
  display: block;
  margin-bottom: 7px;
}

.review-item.correct {
  border-color: rgba(0, 168, 150, 0.45);
  background: #f0fffb;
}

.review-item.wrong {
  border-color: rgba(255, 79, 139, 0.42);
  background: #fff5f8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(16px);
  width: min(calc(100% - 32px), 420px);
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes optionPop {
  0% {
    transform: scale(0.98);
  }
  55% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pressGlow {
  from {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

.site-footer {
  justify-content: center;
  margin-top: 20px;
  padding: 6px 0;
}

.rich-content {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.content-band {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  padding: 18px;
  line-height: 1.75;
}

.content-band h2,
.content-band h3 {
  margin: 0;
  line-height: 1.18;
}

.content-band h2 {
  font-size: 1.5rem;
}

.content-band h3 {
  margin-top: 4px;
  font-size: 1.05rem;
}

.content-band p,
.content-band ol,
.content-band ul {
  color: var(--muted);
  margin: 12px 0 0;
}

.content-band ol,
.content-band ul {
  padding-left: 22px;
}

.eyebrow {
  color: var(--pink) !important;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 8px !important;
  text-transform: uppercase;
}

.toc {
  display: grid;
  gap: 9px;
}

.toc a {
  border-bottom: 1px solid var(--line);
  color: #6d3150;
  font-weight: 800;
  padding-bottom: 8px;
  text-decoration: none;
}

.toc a:last-child {
  border-bottom: 0;
}

.idea-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.idea-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px;
}

.score-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.score-table div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.score-table strong {
  color: var(--pink);
}

.score-table span {
  color: var(--muted);
}

details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

details:first-of-type {
  margin-top: 8px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.content-page {
  display: grid;
  gap: 16px;
}

.content-page h1 {
  max-width: 100%;
  font-size: clamp(2rem, 9vw, 3.4rem);
}

.content-page .panel {
  line-height: 1.7;
}

.content-page ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.notice {
  border-radius: 14px;
  margin-bottom: 16px;
  padding: 12px;
  font-weight: 800;
}

.notice.error {
  background: #fff0f3;
  color: #9f234b;
}

.notice.success {
  background: #ecfff9;
  color: #047566;
}

.question-admin-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.question-admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.compact-input {
  margin-top: 0;
  min-height: 48px;
}

.checkbox-line {
  display: flex !important;
  grid-template-columns: none;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
}

.delete-form {
  margin-top: 12px;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

code {
  border-radius: 8px;
  background: #f6edf3;
  padding: 3px 6px;
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 680px) {
  .app-shell {
    padding-top: 38px;
  }

  .panel {
    padding: 24px;
  }

  .options {
    grid-template-columns: 1fr 1fr;
  }

  .idea-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
