/* =========================================
   Rate Matcha – Cyber-Zen Modern Theme
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ─── Tokens ───────────────────────────── */
:root {
  --cream:          oklch(96.2% 0.009 85);
  --surface:        oklch(99%   0.005 85);
  --surface-raised: oklch(97.5% 0.007 85);

  --matcha:         oklch(44%   0.09  148);
  --matcha-mid:     oklch(52%   0.1   148);
  --matcha-light:   oklch(90%   0.032 148);
  --matcha-xlight:  oklch(95.5% 0.017 148);
  --matcha-dark:    oklch(33%   0.085 148);

  --amber:          oklch(71%   0.155 65);
  --ink:            oklch(17%   0.012 85);
  --ink-mid:        oklch(44%   0.01  85);
  --ink-soft:       oklch(60%   0.008 85);
  --ink-faint:      oklch(76%   0.006 85);

  --border:         oklch(88%   0.007 85);
  --border-light:   oklch(92.5% 0.005 85);

  --red:            oklch(53%   0.2   25);
  --blue:           oklch(46%   0.15  255);

  --shadow-sm: 0 2px 8px oklch(17% 0.01 85 / 7%);
  --shadow:    0 6px 20px oklch(17% 0.01 85 / 8%);
  --shadow-lg: 0 20px 56px oklch(17% 0.01 85 / 12%);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Plus Jakarta Sans', system-ui, sans-serif;

  --nav-height: 60px;
  --bottom-nav-height: 72px;
  --r-sm:       8px;
  --r:          14px;
  --r-lg:       24px;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --t:        0.25s var(--ease-out);
}

/* ─── Reset ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}

/* ─── Typography ───────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
a { color: var(--matcha); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--matcha-dark); }

/* ─── Layout ───────────────────────────── */
.container { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }

/* ─── Header ───────────────────────────── */
.app-header {
  position: sticky; top: 0; left: 0; right: 0; height: var(--nav-height);
  background: color-mix(in oklch, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light); z-index: 100;
  display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.app-brand { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.app-brand em { color: var(--matcha); font-style: italic; }

/* ─── Bottom Navigation ────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-height);
  background: var(--surface); border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: env(safe-area-inset-bottom); z-index: 1000;
  box-shadow: 0 -4px 12px oklch(17% 0.01 85 / 4%);
}
.nav-item {
  background: none; border: none; display: flex; flex-direction: column;
  align-items: center; gap: 4px; color: var(--ink-soft); cursor: pointer;
  transition: all var(--t); flex: 1; padding: 8px 0;
}
.nav-item.active { color: var(--matcha-dark); }
.nav-item span { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; }

/* ─── Futuristic Hero ──────────────────── */
.futuristic-hero {
  position: relative; min-height: 80vh; display: flex; align-items: center;
  justify-content: center; background: oklch(12% 0.02 148);
  padding: 4rem 0 6rem; overflow: hidden; color: white; text-align: center;
}
.hero-bg-canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; animation: blob-float 15s infinite var(--ease-out); }
.blob-1 { width: 500px; height: 500px; background: oklch(65% 0.25 148); top: -10%; left: -5%; }
.blob-2 { width: 400px; height: 400px; background: oklch(50% 0.2 160); bottom: -5%; right: -5%; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: oklch(85% 0.15 148); top: 40%; left: 60%; animation-delay: -10s; }
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(10%, 10%) scale(1.1); }
  66% { transform: translate(-5%, 15%) scale(0.95); }
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  margin-bottom: 2rem; backdrop-filter: blur(10px);
}
.pulse-dot { width: 6px; height: 6px; background: oklch(75% 0.25 148); border-radius: 50%; animation: dot-pulse 2s infinite; }
@keyframes dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } }

.hero-title {
  font-size: clamp(3.2rem, 12vw, 5.5rem) !important; line-height: 0.95 !important;
  margin-bottom: 1.5rem !important; letter-spacing: -0.04em !important;
  font-family: var(--font-ui) !important; font-weight: 800 !important; color: white !important;
}
.text-glow { background: linear-gradient(to right, white, oklch(75% 0.2 148)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-title em { font-style: italic; font-weight: 400; font-family: var(--font-display); color: oklch(85% 0.15 148); }
.hero-subtitle { font-size: 1.15rem !important; color: rgba(255, 255, 255, 0.7) !important; margin-bottom: 3.5rem !important; }

/* ─── Search Bar ───────────────────────── */
.search-bar-wrap { width: 100%; max-width: 600px; margin: 0 auto; }
.futuristic-search {
  display: flex !important; align-items: center !important; gap: 0.5rem !important;
  background: rgba(255, 255, 255, 0.07) !important; border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(25px) !important; border-radius: 24px !important;
  padding: 0.4rem 0.6rem 0.4rem 1.2rem !important; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.4s var(--ease-out) !important;
}
.futuristic-search:focus-within {
  background: rgba(255, 255, 255, 0.1) !important; border-color: oklch(75% 0.2 148) !important;
  transform: translateY(-4px);
}
.futuristic-search input {
  flex: 1 !important; background: transparent !important; border: none !important;
  outline: none !important; color: #ffffff !important; font-size: 1rem !important;
  padding: 0.75rem 0 !important;
}
.futuristic-search input::placeholder { color: rgba(255, 255, 255, 0.5) !important; }
.search-actions { display: flex !important; gap: 0.4rem !important; flex-shrink: 0 !important; }

/* ─── Buttons ──────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  padding: 0.65rem 1.25rem; border-radius: var(--r-sm); font-family: var(--font-ui);
  font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--t);
}
.btn-primary { background: oklch(75% 0.25 148); color: oklch(12% 0.02 148); }
.btn-outline { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.1); color: white; }
.btn-icon-only { width: 44px; height: 44px; padding: 0; border-radius: 50%; }

/* ─── Places Section ───────────────────── */
.places-section { padding: 3rem 0 4.5rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.section-header h2 { font-size: 1.5rem; }
.filter-scroll { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1.25rem; scrollbar-width: none; }
.pill {
  padding: 0.4rem 1.125rem; border-radius: 999px; border: 1.5px solid var(--border-light);
  background: var(--surface); color: var(--ink-mid); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.pill.active { background: var(--matcha); border-color: var(--matcha); color: var(--surface); }

/* ─── Place Cards ──────────────────────── */
.places-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.place-card {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform 0.4s var(--ease-out); display: flex; flex-direction: column; position: relative;
}
.place-card-image {
  width: 100%; height: 220px; background: var(--matcha-xlight);
  display: flex; align-items: center; justify-content: center;
}
.place-card-image svg { animation: float-mini 3s infinite ease-in-out; }
@keyframes float-mini {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.place-card-image img { width: 100%; height: 100%; object-fit: cover; }
.place-card-body { padding: 1.25rem; }
.place-card-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.fav-btn { position: absolute; top: 1rem; right: 1rem; z-index: 10; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px); border-radius: 50%; width: 40px; height: 40px; border: none; cursor: pointer; }
.fav-btn.active { color: #ef4444; }

/* ─── Ad Card ──────────────────────────── */
.ad-card {
  background: var(--surface-raised);
  border-radius: var(--r);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--border);
  padding: 1rem;
}
.ad-container { width: 300px; height: 250px; background: rgba(0,0,0,0.02); }

/* ─── Modals ───────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
}
.modal { background: var(--surface); border-radius: var(--r-lg); padding: 2.5rem; width: 100%; max-width: 600px; position: relative; }
@media (max-width: 640px) {
  .modal-overlay { align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

/* ─── Animations ───────────────────────── */
@keyframes reveal { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.animate-reveal { animation: reveal 0.8s var(--ease-out) forwards; }
.animate-reveal-delayed { animation: reveal 0.8s 0.2s var(--ease-out) forwards; opacity: 0; }
.animate-reveal-more-delayed { animation: reveal 0.8s 0.4s var(--ease-out) forwards; opacity: 0; }
.animate-reveal-final { animation: reveal 0.8s 0.6s var(--ease-out) forwards; opacity: 0; }

@keyframes staggerIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.stagger-item { opacity: 0; animation: staggerIn 0.6s var(--ease-out) forwards; }
.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.12s; }
.stagger-item:nth-child(3) { animation-delay: 0.19s; }

/* ─── Star Picker ──────────────────────── */
.star-picker { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.star-picker button {
  background: none; border: none; font-size: 2rem; cursor: pointer;
  color: var(--border-light); transition: transform 0.2s var(--ease-out), color 0.2s;
  padding: 0.25rem; line-height: 1; min-width: 2.5rem; min-height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
}
.star-picker button.filled { color: var(--amber); }
.star-picker button:hover { color: var(--amber); transform: scale(1.1); }
.star-picker button:active { transform: scale(1.2); }

/* ─── Responsive ───────────────────────── */
@media (min-width: 641px) {
  .places-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-nav { width: 400px; left: 50%; transform: translateX(-50%); border-radius: 50px; bottom: 1.5rem; }
}
@media (min-width: 1024px) { .places-grid { grid-template-columns: repeat(3, 1fr); } }

/* ─── Forms & Reviews ─────────────────── */
.form-group { margin-bottom: 1.125rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--r-sm); }
.review-item { padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.toast { position: fixed; bottom: 85px; right: 20px; background: var(--ink); color: white; padding: 0.75rem 1.25rem; border-radius: var(--r); z-index: 3000; }
.loading-spinner { width: 36px; height: 36px; border: 3px solid var(--matcha-light); border-top-color: var(--matcha); border-radius: 50%; animation: spin 1s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
