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

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: #f7f7f5;
  color: #4a4a4a;
  min-height: 100vh;
  line-height: 1.5;
}

.vita-bg {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(206,220,0,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(206,220,0,.08) 0%, transparent 50%),
    #f7f7f5;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container { max-width: 640px; margin: 0 auto; }
.container.wide { max-width: 1100px; }
.container.narrow { max-width: 420px; }
.center { text-align: center; }

.logo { display: block; margin: 0 auto 1.5rem; max-width: 100%; height: auto; }
h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.lead { color: #808080; font-size: 1.1rem; margin-bottom: 2rem; }
.muted { color: #808080; }
.small { font-size: .875rem; }
.link-muted { display: block; margin-top: 1rem; color: #808080; text-decoration: none; font-size: .875rem; }
.link-muted:hover { color: #4a4a4a; }

.game-card {
  background: #fff;
  border: 2px solid rgba(206,220,0,.35);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(74,74,74,.08);
  margin: 1rem 0;
}
.game-card.pad { padding: 1.5rem 2rem; }

.admin-card {
  background: #fff;
  border: 1px solid rgba(74,74,74,.1);
  border-radius: .875rem;
  box-shadow: 0 2px 12px rgba(74,74,74,.06);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.game-btn {
  display: inline-block;
  padding: .875rem 2rem;
  background: linear-gradient(135deg, #cedc00, #b8c800);
  color: #4a4a4a;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: .75rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(206,220,0,.45);
  transition: transform .15s;
}
.game-btn:hover { transform: translateY(-1px); }
.game-btn.block { display: block; text-align: center; }
.game-btn.big { padding: 1rem 2rem; font-size: 1.1rem; }
.game-btn.w100 { width: 100%; }
.game-btn.sm { padding: .5rem 1rem; font-size: .875rem; }

.input-field {
  width: 100%;
  padding: .875rem 1rem;
  background: #fafafa;
  border: 2px solid rgba(74,74,74,.15);
  border-radius: .75rem;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.input-field:focus { outline: none; border-color: #cedc00; }

.badge-vita {
  display: inline-block;
  padding: .25rem .75rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(206,220,0,.25);
  border-radius: 9999px;
  margin-bottom: .5rem;
}

.choice-btn, .select-card {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  background: #fafafa;
  border: 2px solid rgba(74,74,74,.12);
  border-radius: .875rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  margin-bottom: .5rem;
  transition: all .2s;
}
.select-card { text-align: center; }
.choice-btn:hover, .select-card:hover { border-color: rgba(206,220,0,.6); background: rgba(206,220,0,.08); }
.choice-btn.active, .select-card.active {
  border-color: #cedc00;
  background: rgba(206,220,0,.18);
  box-shadow: 0 0 0 3px rgba(206,220,0,.2);
}

.stars { display: flex; justify-content: center; gap: .5rem; margin: 1rem 0; }
.star-btn {
  font-size: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: .3;
  filter: grayscale(1);
  transition: all .2s;
}
.star-btn.on { opacity: 1; filter: none; transform: scale(1.1); }

.progress-wrap { margin-bottom: 1.5rem; }
.progress-meta { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: #808080; margin-bottom: .5rem; }
.progress-bar { height: .75rem; background: #fff; border: 2px solid rgba(206,220,0,.3); border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #cedc00, #b8c800); transition: width .4s ease; border-radius: 9999px; }

.rating-label { text-align: center; font-weight: 600; margin: .5rem 0 1rem; }
.emoji-big { font-size: 3rem; margin-bottom: .5rem; }
.question-emoji { font-size: 2.5rem; text-align: center; margin: .5rem 0; }
.question-text { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: 1rem; line-height: 1.4; }

textarea.input-field { min-height: 7rem; resize: vertical; font-family: inherit; }

.alert { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .875rem; }
.alert.error { background: #fee2e2; color: #b91c1c; }

.form label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .875rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }

.xp-burst {
  position: fixed; top: 30%; left: 50%; transform: translateX(-50%);
  font-weight: 800; font-size: 1.5rem; color: #b8c800;
  pointer-events: none; animation: xpUp .8s ease forwards;
}
@keyframes xpUp { to { opacity: 0; transform: translate(-50%, -60px) scale(1.3); } }

/* Admin */
.admin-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.admin-header .logo { margin: 0; }
.stat-box { text-align: center; padding: .75rem 1.25rem; }
.stat-num { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: .7rem; text-transform: uppercase; color: #808080; }

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tab {
  padding: .5rem 1rem; border-radius: .625rem; font-size: .875rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; background: #fafafa; color: #808080;
}
.tab.active { border-color: #cedc00; background: rgba(206,220,0,.15); color: #4a4a4a; }

.stats-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } }

.bar-row { margin-bottom: .5rem; }
.bar-meta { display: flex; justify-content: space-between; font-size: .75rem; margin-bottom: .15rem; }
.bar-track { height: .6rem; background: #f0f0f0; border-radius: 9999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 9999px; transition: width .5s; }
.bar-1 { background: #f87171; } .bar-2 { background: #fb923c; } .bar-3 { background: #facc15; }
.bar-4 { background: #a3e635; } .bar-5 { background: #cedc00; } .bar-choice { background: #cedc00; }

.qr-section { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.qr-section img { border: 1px solid #eee; border-radius: .75rem; padding: .5rem; background: #fff; }
.link-row { display: flex; gap: .5rem; margin-top: .5rem; }
.link-row input { flex: 1; }

.recent-item {
  display: flex; justify-content: space-between; padding: .5rem .75rem;
  background: #fafafa; border-radius: .5rem; font-size: .875rem; margin-bottom: .25rem;
}

.hidden { display: none !important; }
