:root {
  --crust: #f5e6c8;
  --tomato: #c0392b;
  --tomato-dark: #922b21;
  --basil: #2e7d32;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --card: #ffffff;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--crust);
  color: var(--ink);
  line-height: 1.5;
}

header.site-header {
  background: var(--tomato);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

header.site-header h1 {
  margin: 0;
  font-size: 1.6rem;
}

header.site-header h1 a {
  color: white;
  text-decoration: none;
}

nav.site-nav a {
  color: white;
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover {
  border-bottom: 2px solid white;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.tagline {
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 24px;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #d1451f 0%, var(--tomato) 55%, #e0a83a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 56px 24px 72px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

.hero-blob-1 { width: 340px; height: 340px; top: -140px; left: -80px; }
.hero-blob-2 { width: 220px; height: 220px; bottom: -100px; right: -60px; background: rgba(0,0,0,0.06); }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.hero-title {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-tagline {
  font-size: 1.05rem;
  margin: 0 0 22px;
  color: rgba(255,255,255,0.92);
}

.hero-cta {
  display: inline-block;
  background: white;
  color: var(--tomato-dark);
  margin-top: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  text-decoration: none;
}

.hero-cta:hover {
  background: #fff4e0;
}

.hero-art {
  position: relative;
  z-index: 1;
  width: 220px;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.25));
}

.hero-art svg {
  width: 100%;
  height: auto;
  animation: hero-spin-in 0.9s ease-out;
}

@keyframes hero-spin-in {
  from { transform: rotate(-12deg) scale(0.9); opacity: 0; }
  to { transform: rotate(0) scale(1); opacity: 1; }
}

.wave-divider {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: -2px;
}

@media (max-width: 640px) {
  .hero { padding: 40px 20px 64px; text-align: center; justify-content: center; }
  .hero-title { font-size: 1.9rem; }
  .hero-art { width: 160px; }
}

/* Ad slot */

.ad-slot {
  background: repeating-linear-gradient(45deg, #f0e0c0, #f0e0c0 10px, #ece0c8 10px, #ece0c8 20px);
  border: 1px dashed #c9ac72;
  color: #8a7145;
  text-align: center;
  font-size: 0.8rem;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 26px;
}

.section-heading {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.3rem;
}

/* Pizzeria grid */

.pizzeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.pizzeria-card {
  position: relative;
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.pizzeria-card:hover { border-color: #e3cfa8; }
.pizzeria-card.active { border-color: var(--tomato); }
.pizzeria-card.featured { background: #fffaf0; }

.pizzeria-card h3 { margin: 0 0 2px; font-size: 1.05rem; }

.featured-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #e0a83a;
  color: white;
}

.pizzeria-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tomato-dark);
  margin-top: 6px;
}

.pizzeria-score span { font-size: 0.9rem; font-weight: 600; color: var(--muted); }

.map-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--tomato);
  text-decoration: none;
  font-weight: 600;
}

.map-link:hover { text-decoration: underline; }

/* Filters */

.style-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.style-filter-btn {
  background: white;
  color: var(--tomato-dark);
  border: 1px solid #e3cfa8;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0;
  box-shadow: none;
  cursor: pointer;
}

.style-filter-btn:hover {
  background: #fff4e0;
}

.style-filter-btn.active {
  background: var(--tomato);
  color: white;
  border-color: var(--tomato);
}

.style-badge {
  display: inline-block;
  align-self: flex-start;
  background: #fdece0;
  color: var(--tomato-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.visit-badge {
  display: inline-block;
  background: #eef3e8;
  color: var(--basil);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 10px;
}

.score-badge {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--tomato-dark);
  margin: 2px 0 6px;
}

.score-badge span { font-size: 0.8rem; font-weight: 600; color: var(--muted); }

/* Review grid */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.review-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.review-card .review-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.review-card .place {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.stars {
  color: #e0a800;
  letter-spacing: 2px;
}

.review-text {
  font-size: 0.95rem;
  color: var(--ink);
}

.byline {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.helpful-btn {
  background: white;
  border: 1px solid #e3cfa8;
  color: var(--ink);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  margin-top: 12px;
  box-shadow: none;
  cursor: pointer;
  align-self: flex-start;
}

.helpful-btn:hover:not(:disabled) { background: #fff4e0; }
.helpful-btn.voted { background: #eef3e8; color: var(--basil); border-color: #cfe0c2; }
.helpful-btn:disabled { cursor: default; opacity: 0.85; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
}

/* Forms */

form.card-form {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 560px;
  margin: 0 auto;
}

form.card-form label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
}

form.card-form input[type="text"],
form.card-form input[type="email"],
form.card-form input[type="password"],
form.card-form select,
form.card-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

form.card-form textarea {
  min-height: 160px;
  resize: vertical;
}

.word-counter {
  font-size: 0.85rem;
  margin-top: 4px;
  color: var(--muted);
}

.word-counter.ok { color: var(--basil); font-weight: 600; }
.word-counter.bad { color: var(--tomato); font-weight: 600; }

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

button, .btn {
  background: var(--tomato);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

button:hover, .btn:hover { background: var(--tomato-dark); }

button.secondary {
  background: transparent;
  color: var(--tomato);
  border: 1px solid var(--tomato);
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.msg {
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 16px;
  font-size: 0.95rem;
}

.msg.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.msg.error { background: #fdecea; color: #922b21; border: 1px solid #f5b7b1; }

/* Admin */

.admin-item {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
}

.admin-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.admin-item .details { flex: 1; }

.admin-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.admin-actions button { margin-top: 0; padding: 8px 16px; font-size: 0.9rem; }

.approve-btn { background: var(--basil); }
.approve-btn:hover { background: #1b5e20; }
.reject-btn { background: #7f8c8d; }
.reject-btn:hover { background: #5f6a6a; }

.section-title {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--tomato);
  padding-bottom: 6px;
}

.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.pill.pending { background: #fff3cd; color: #856404; }

/* Footer */

.footer-checker {
  height: 10px;
  background-image: linear-gradient(45deg, var(--tomato) 25%, transparent 25%, transparent 75%, var(--tomato) 75%), linear-gradient(45deg, var(--tomato) 25%, transparent 25%, transparent 75%, var(--tomato) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  opacity: 0.5;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0 18px;
  margin-top: 20px;
}

footer p { margin: 14px 0 0; }
