:root {
  /* ==== Rəng tokenləri (2026) ==== */
  --violet-950: #120B24;
  --violet-800: #241454;
  --violet-600: #6C3CE9;
  --violet-500: #8257F2;
  --violet-300: #B79CF7;
  --violet-100: #EDE5FF;
  --violet-50:  #F6F3FC;

  --accent: #FF4D6D;        /* CTA vurğusu — bənövşəyiylə kontrast enerji */
  --success: #1FAA6E;
  --warning: #FFB020;

  --ink: #14101F;
  --ink-soft: #6B6478;
  --surface: #FFFFFF;
  --border: #E9E4F5;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--violet-50); color: var(--ink); font-family: var(--font-body); overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font-family: inherit; border: none; outline: none; background: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; background: var(--violet-50); }

.screen { display: none; min-height: 100vh; padding-bottom: calc(90px + var(--safe-bottom)); animation: screenIn .3s cubic-bezier(.2,.8,.2,1); }
.screen.active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ==== Düymələr ==== */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: var(--r-md); font-weight: 700; font-size: 15px; transition: transform .12s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--violet-600); color: #fff; box-shadow: 0 10px 24px -8px rgba(108,60,233,.6); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -8px rgba(255,77,109,.5); }
.btn-ghost { background: var(--violet-100); color: var(--violet-800); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ==== Splash / Ünvan seçimi (Wolt-tipli ilk addım) ==== */
.splash {
  min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 15% -10%, var(--violet-800) 0%, var(--violet-950) 60%);
  color: #fff; padding: calc(var(--safe-top) + 60px) 24px 40px;
  position: relative; overflow: hidden;
}
.splash-orb { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, var(--violet-500) 0%, transparent 70%); opacity: .55; top: -140px; right: -100px; filter: blur(8px); animation: float 9s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-24px,26px) scale(1.06); } }
.splash-word { font-family: var(--font-display); font-weight: 700; font-size: 46px; letter-spacing: -.02em; z-index: 1; }
.splash-tag { color: var(--violet-300); margin-top: 6px; font-size: 15px; z-index: 1; }
.splash-spacer { flex: 1; }
.splash-card { background: rgba(255,255,255,.08); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-xl); padding: 22px; z-index: 1; }
.splash-card label { display: block; font-size: 12.5px; color: var(--violet-300); font-weight: 600; margin-bottom: 8px; }

/* ==== Auth addımları (paylaşılan) ==== */
.auth-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 0; color: var(--ink-soft); font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--violet-100); border-top-color: var(--violet-600); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-step { display: none; }
.auth-step.active { display: block; animation: stepIn .25s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.auth-desc { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 14px; line-height: 1.5; }
.auth-desc b { color: var(--ink); }
.auth-input {
  width: 100%; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 15px; font-size: 16px; margin-bottom: 14px; color: var(--ink);
}
.auth-input:focus { border-color: var(--violet-600); }
.auth-input-code { font-family: var(--font-display); font-size: 24px; letter-spacing: .5em; padding-left: 20px; text-align: center; }
.auth-links { display: flex; justify-content: space-between; margin-top: 12px; }
.btn-link { color: var(--violet-300); font-size: 13px; font-weight: 600; }
.screen-light .btn-link { color: var(--violet-600); }

/* ==== Top bar / axtarış ==== */
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 16px) 20px 4px; }
.location-pill { display: flex; align-items: center; gap: 6px; color: var(--violet-800); font-weight: 700; font-size: 15px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--violet-700); display: flex; align-items: center; justify-content: center; }
.search-bar { margin: 12px 20px 4px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); height: 50px; padding: 0 16px; display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.search-bar input { flex: 1; font-size: 15px; color: var(--ink); }

/* ==== İkon-grid kateqoriyalar ==== */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 20px 6px; }
.icon-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.icon-tile-badge { width: 58px; height: 58px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 26px; transition: all .15s; }
.icon-tile.active .icon-tile-badge { border-color: var(--violet-600); background: var(--violet-100); }
.icon-tile:active .icon-tile-badge { transform: scale(.92); }
.icon-tile span { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.icon-tile.active span { color: var(--violet-700); }

/* ==== Reklam karuseli ==== */
.ad-carousel { display: flex; gap: 12px; overflow-x: auto; padding: 6px 20px; scroll-snap-type: x mandatory; }
.ad-carousel::-webkit-scrollbar { display: none; }
.ad-banner { flex: 0 0 88%; scroll-snap-align: start; border-radius: var(--r-xl); overflow: hidden; position: relative; height: 150px; background: var(--violet-100); }
.ad-banner img, .ad-banner video { width: 100%; height: 100%; object-fit: cover; }
.ad-banner .ad-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-weight: 700; font-size: 15px; }

.section-label { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-weight: 700; font-size: 19px; padding: 20px 20px 12px; }
.section-label a { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--violet-600); }

/* ==== Restoran kartları ==== */
.restaurant-list { padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.restaurant-card { background: var(--surface); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); position: relative; }
.restaurant-card img { width: 100%; height: 150px; object-fit: cover; background: var(--violet-100); }
.restaurant-card-rating { position: absolute; top: 12px; right: 12px; background: rgba(20,16,31,.65); backdrop-filter: blur(6px); color: #fff; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; display: flex; gap: 4px; align-items: center; }
.restaurant-card-body { padding: 13px 15px 15px; }
.restaurant-card-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.restaurant-card-meta { color: var(--ink-soft); font-size: 12.5px; margin-top: 5px; display: flex; gap: 6px; align-items: center; }
.delivery-badge { display: inline-block; margin-top: 8px; padding: 4px 11px; border-radius: 999px; background: #E4F9EE; color: var(--success); font-size: 11.5px; font-weight: 700; }

.deals-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px; }
.deal-card { flex: 0 0 210px; }

.skeleton-card { height: 210px; border-radius: var(--r-xl); background: linear-gradient(100deg, var(--violet-100) 30%, #fff 50%, var(--violet-100) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==== Bottom nav ==== */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: rgba(255,255,255,.9); backdrop-filter: blur(18px); border-top: 1px solid var(--border); display: flex; padding: 10px 10px calc(10px + var(--safe-bottom)); z-index: 50; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 10.5px; font-weight: 700; padding: 6px 0; position: relative; z-index: 1; }
.nav-item.active { color: var(--violet-600); }
.nav-indicator { position: absolute; top: 4px; width: calc(100% / 3); height: calc(100% - 8px); background: var(--violet-100); border-radius: var(--r-md); transition: transform .3s cubic-bezier(.3,.8,.3,1); }

@media (min-width: 481px) {
  body { background: var(--violet-950); }
  #app { box-shadow: 0 40px 100px -30px rgba(18,11,36,.6); min-height: 100vh; }
}

/* ==== Alt-başlıq / geri düyməsi ==== */
.sub-header { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-top) + 16px) 20px 12px; }
.sub-header h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.btn-back { width: 38px; height: 38px; border-radius: 50%; background: var(--violet-100); color: var(--violet-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.btn-sticky { position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--safe-bottom)); max-width: 448px; margin: 0 auto; z-index: 40; }

/* ==== Restoran hero ==== */
.restaurant-hero { position: relative; }
.restaurant-hero .btn-back { position: absolute; top: calc(var(--safe-top) + 14px); left: 16px; background: rgba(255,255,255,.92); z-index: 2; }
.restaurant-cover { width: 100%; height: 210px; object-fit: cover; background: var(--violet-100); }
.restaurant-hero-info { padding: 18px 20px 4px; }
.restaurant-hero-info h2 { font-family: var(--font-display); font-size: 23px; }
.restaurant-meta { color: var(--ink-soft); font-size: 13px; margin-top: 6px; display: flex; gap: 6px; }
.menu-list { padding: 16px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.menu-item { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; align-items: center; }
.menu-item img { width: 68px; height: 68px; border-radius: var(--r-sm); object-fit: cover; background: var(--violet-100); }
.menu-item-body { flex: 1; }
.menu-item-name { font-weight: 700; font-size: 14.5px; }
.menu-item-desc { color: var(--ink-soft); font-size: 12.5px; margin-top: 2px; }
.menu-item-price { color: var(--accent); font-weight: 800; margin-top: 7px; font-size: 14.5px; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--violet-600); color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ==== Səbət ==== */
.cart-items { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 13px; font-size: 14px; }
.cart-address { margin: 16px 20px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 15px; color: var(--violet-700); font-weight: 700; font-size: 14px; }
.cart-address .chevron { margin-left: auto; color: var(--ink-soft); }
.cart-note { margin: 0 20px 16px; width: calc(100% - 40px); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 13px; font-size: 13.5px; min-height: 60px; resize: none; }
.cart-summary { margin: 0 20px 110px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); padding: 4px 0; }
.cart-summary .row.total { color: var(--ink); font-weight: 800; font-size: 17px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }

/* ==== İzləmə ==== */
.tracking-status-card { margin: 10px 20px; background: var(--violet-950); color: #fff; border-radius: var(--r-xl); padding: 30px 20px; text-align: center; }
.tracking-icon { font-size: 42px; }
.tracking-status-label { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-top: 10px; }
.tracking-status-desc { color: var(--violet-300); font-size: 13px; margin-top: 4px; }
.tracking-steps { display: flex; justify-content: space-between; margin: 26px 26px; position: relative; }
.tracking-steps::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--border); z-index: 0; }
.tracking-steps .step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-soft); z-index: 1; flex: 1; }
.tracking-steps .step .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border); border: 2px solid var(--violet-50); }
.tracking-steps .step.done .dot { background: var(--violet-600); }
.tracking-steps .step.done { color: var(--violet-700); font-weight: 700; }
.tracking-payment { margin: 10px 20px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.tracking-payment p { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.bank-card-display { font-family: var(--font-display); font-size: 19px; letter-spacing: .06em; background: var(--violet-50); border-radius: var(--r-sm); padding: 13px; text-align: center; margin-bottom: 12px; }

/* ==== Sifarişlər / Profil ==== */
.orders-list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.order-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.order-row .num { font-weight: 700; font-size: 14px; }
.order-row .status { font-size: 12px; padding: 4px 11px; border-radius: 999px; background: var(--violet-100); color: var(--violet-700); font-weight: 700; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 12px 20px 20px; }
.profile-avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--violet-600); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.profile-name { font-weight: 700; font-size: 16px; }
.profile-phone { color: var(--ink-soft); font-size: 13px; }
.profile-menu { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.profile-menu-item { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 15px; font-size: 14px; font-weight: 600; }
.profile-menu-item.danger { color: var(--accent); }
