:root {
  --bg: #0f1116;
  --card: #1a1f2e;
  --text: #fff;
  --muted: #aab;
  --accent: #ffd166;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  min-height: 100vh;
  padding: 16px;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
main { max-width: 480px; margin: 0 auto; }

header { text-align: center; margin: 16px 0 24px; }
h1 { font-size: 28px; margin-bottom: 6px; }
.sub { font-size: 14px; color: var(--muted); }

#filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}
.chip {
  background: var(--card);
  color: var(--muted);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip.active {
  background: var(--accent);
  color: #0f1116;
  font-weight: bold;
}

#result {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 24px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#menu-display .emoji {
  font-size: 64px;
  margin-bottom: 12px;
}
#menu-display .menu-name {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 8px;
}
#menu-display .menu-cat {
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}

.spinning .emoji {
  animation: spin 0.5s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#actions {
  margin-bottom: 24px;
}

#spin-btn {
  background: var(--accent);
  color: #0f1116;
  border: none;
  padding: 18px 24px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  margin-bottom: 12px;
}
#spin-btn:active { transform: scale(0.98); }

.sub-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
button.link {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
}
button.link:hover:not(:disabled) { color: var(--text); }
button.link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ad-slot {
  min-height: 100px;
  margin: 16px 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-slot:empty {
  display: none;
}

footer {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #222;
}
