/* ── Reset & variables ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg:          #1C1C1E;
  --surface:     #2C2C2E;
  --surface-2:   #3A3A3C;
  --gold:        #FFB800;
  --gold-glow:   rgba(255, 184, 0, 0.18);
  --text:        #FFFFFF;
  --text-muted:  #8E8E93;
  --green:       #30D158;
  --radius:      16px;
  --radius-sm:   10px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* ── Screens ── */
.screen {
  display: none;
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  animation: fadeIn 0.3s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.container.center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Branding ── */
.logo {
  margin-bottom: 12px;
}
.logo-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}
.restaurant-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ── Typography ── */
h1 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 6px;
}
h1 em {
  color: var(--gold);
  font-style: italic;
  font-weight: 700;
}
h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 32px;
}
.subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}
.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Stars ── */
.stars-wrap {
  margin: 8px 0 4px;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.star {
  background: none;
  border: none;
  font-size: 52px;
  line-height: 1;
  color: var(--surface-2);
  cursor: pointer;
  transition: color 0.12s ease, transform 0.12s ease;
  padding: 4px;
  border-radius: 8px;
  touch-action: manipulation;
}
.star.lit   { color: var(--gold); }
.star.pulse { animation: starPulse 0.35s ease; }

@keyframes starPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); }
  100% { transform: scale(1.1); }
}

.stars-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 6px;
}

/* ── Category buttons ── */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.cat-btn {
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 6px 12px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-height: 82px;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}
.cat-btn.selected {
  border-color: var(--gold);
  background: var(--gold-glow);
}
.cat-icon  { font-size: 26px; line-height: 1; }
.cat-label { font-size: 12px; line-height: 1.25; font-weight: 500; }

/* ── Textarea ── */
textarea {
  width: 100%;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.15s ease;
}
textarea:focus      { border-color: var(--gold); }
textarea::placeholder { color: var(--text-muted); }

/* ── Buttons ── */
.btn-primary {
  display: block;
  width: 100%;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius);
  padding: 17px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  touch-action: manipulation;
  margin-bottom: 10px;
}
.btn-primary:active { opacity: 0.8; transform: scale(0.98); }

.btn-skip {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-skip:active { opacity: 0.6; }

/* ── Thank you screen ── */
.thanks-icon {
  font-size: 80px;
  margin-bottom: 28px;
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
#screen-thanks h2  { font-size: 28px; margin-bottom: 14px; }
#screen-thanks p   { color: var(--text-muted); font-size: 16px; line-height: 1.5; }

/* ── Loading overlay ── */
.loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loading.hidden { display: none; }

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 184, 0, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
