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

:root {
  --bg: #1c1c1e;
  --surface: #252527;
  --surface2: #2e2e30;
  --border: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.2);
  --text: #fff;
  --text-muted: rgba(255,255,255,0.38);
  --text-dim: rgba(255,255,255,0.58);
  --accent: #99bbff;
  --accent-dim: rgba(153,187,255,0.12);
  --accent-border: rgba(153,187,255,0.35);
}

#page-loader {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; background: #3b82f6;
  transform: scaleX(0); transform-origin: left;
  opacity: 0;
  transition: opacity 0s 0s, transform 0.3s ease;
  z-index: 9999;
}
#page-loader.htmx-request {
  opacity: 1;
  transform: scaleX(0.7);
  transition: opacity 0s 1s, transform 8s 1s cubic-bezier(0.1, 0.5, 0.3, 1);
}

#toast-container {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  width: calc(100% - 40px); max-width: 390px;
}
.toast {
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: 12px; padding: 12px 16px; font-size: 13px;
  animation: toast-in 0.2s ease;
}
.toast--error { border-color: #ff6b6b; color: #ff6b6b; }
.toast--success { border-color: #6bcb77; color: #6bcb77; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[x-cloak] { display: none !important; }

.page { padding: 32px 20px 110px; min-height: 100vh; }

.card {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 14px;
}

.card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}

.card-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--accent-border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  margin-bottom: 18px;
}

.traffic-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 7px;
  font-weight: 500;
}

.traffic-track {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
  margin-bottom: 18px;
}

.traffic-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
  width: 100%;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
}

.btn:active { transform: scale(0.97); opacity: 0.8; }
.btn-primary { background: var(--accent); color: #0a0f1a; box-shadow: 0 4px 20px rgba(153,187,255,0.3); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid var(--border-strong); }
.btn-ghost { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.btn-accent-ghost { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

.tag {
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stat-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.stat-num {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 4px;
}

.stat-label { font-size: 11px; color: var(--text-muted); }

.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 390px;
  z-index: 50;
}

.nav-inner {
  background: #252527;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.nav-btn.active { color: #fff; background: var(--accent); }
.nav-btn span { font-size: 10px; font-weight: 600; }

.plans-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}

.plans-sheet {
  background: #1c1c1e;
  border: 1.5px solid var(--border-strong);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 20px 48px;
  animation: slideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 99px;
  margin: 0 auto 22px;
}

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

.plan-card {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 12px;
  background: var(--surface);
  position: relative;
  transition: border-color 0.15s;
}

.plan-card.featured {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.plan-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.plan-period { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; }
.plan-card.featured .plan-period { color: rgba(0,0,0,0.45); }

.plan-price {
  font-family: 'Unbounded', sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.plan-price-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }
.plan-card.featured .plan-price-sub { color: rgba(0,0,0,0.45); }

.plan-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.plan-feat {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}

.plan-card.featured .plan-feat { border-color: rgba(0,0,0,0.18); color: rgba(0,0,0,0.6); }

.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.plan-card:not(.featured) .badge { background: #fff; color: #000; }

.menu-list {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.1s;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--surface2); }
.menu-arrow { color: var(--text-muted); font-size: 17px; }

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.form-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 14px 16px;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color 0.15s;
}

.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-muted); }

.faq-answer {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.order-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.order-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.order-status--pending { background: rgba(255,200,0,0.15); color: #ffc800; }
.order-status--paid { background: rgba(100,220,120,0.15); color: #64dc78; }
.order-status--cancelled { background: rgba(255,80,80,0.15); color: #ff8080; }

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.loading-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 13px;
  color: var(--text-muted);
}
