/* LiveCity — Kahramanmaraş sosyal şehir PWA */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,900&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0e0b10;
  --bg-soft: #181318;
  --surface: #211a21;
  --surface-2: #2c232c;
  --line: #3a2f3a;
  --text: #f6efe9;
  --muted: #b3a3a8;
  --faint: #7d6f76;

  --coral: #ff5a4d;
  --coral-soft: #ff7a6e;
  --saffron: #ffb43d;
  --pistachio: #9ed36a;
  --grape: #c06be8;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 14px 40px -12px rgba(0,0,0,.6);
  --shadow-glow: 0 0 0 1px var(--line), 0 18px 50px -18px rgba(255,90,77,.35);

  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'Sora', system-ui, sans-serif;

  --maxw: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmospheric backdrop */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(255,90,77,.22), transparent 60%),
    radial-gradient(50% 40% at -10% 10%, rgba(192,107,232,.16), transparent 55%),
    radial-gradient(70% 50% at 50% 110%, rgba(255,180,61,.12), transparent 60%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; opacity: .035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100%;
  padding-bottom: 96px;
  position: relative;
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 18px 20px 14px;
  background: linear-gradient(180deg, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: baseline; gap: 2px; }
.brand__mark {
  font-family: var(--ff-display);
  font-weight: 900; font-size: 26px; letter-spacing: -.02em;
  color: var(--text);
}
.brand__mark em { font-style: italic; color: var(--coral); }
.brand__city {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin-left: 8px; align-self: center;
}
.weather-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--muted);
}

/* ---------- Search ---------- */
.searchbar {
  margin-top: 14px; position: relative;
}
.searchbar input {
  width: 100%; padding: 15px 18px 15px 46px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; color: var(--text); font-family: var(--ff-body); font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.searchbar input::placeholder { color: var(--faint); }
.searchbar input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,90,77,.16); }
.searchbar__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; opacity: .8; }
.searchbar__hint { margin-top: 8px; font-size: 12px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; }
.chip-mini {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--muted);
  cursor: pointer; transition: all .18s;
}
.chip-mini:active { transform: scale(.95); }
.chip-mini:hover { color: var(--coral); border-color: var(--coral); }

/* ---------- Section headers ---------- */
.section { padding: 8px 20px 4px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; }
.section__title { font-family: var(--ff-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.section__title em { font-style: italic; color: var(--saffron); }
.section__more { font-size: 13px; color: var(--coral); cursor: pointer; }

/* ---------- Hero / pharmacy strip ---------- */
.utility-strip { display: flex; gap: 10px; padding: 4px 20px; overflow-x: auto; scrollbar-width: none; }
.utility-strip::-webkit-scrollbar { display: none; }
.util-card {
  flex: 0 0 auto; min-width: 168px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.util-card--pharmacy { border-color: rgba(158,211,106,.4); background: linear-gradient(180deg, rgba(158,211,106,.08), var(--surface)); }
.util-card__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.util-card__title { font-weight: 600; margin: 4px 0 2px; font-size: 15px; }
.util-card__sub { font-size: 12.5px; color: var(--muted); }
.util-card__link { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--coral); }

/* ---------- Feed cards ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); position: relative;
  animation: rise .5s both;
}
.card:active { transform: scale(.985); }
.card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(14,11,16,.85)); }
.card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(14,11,16,.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14);
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.card__badge--new { background: var(--coral); border-color: transparent; color: #fff; }
.card__fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(14,11,16,.6); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14); color: #fff;
  display: grid; place-items: center; font-size: 17px; cursor: pointer; transition: transform .18s;
}
.card__fav:active { transform: scale(.8); }
.card__fav.is-on { color: var(--coral); }
.card__caption { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 14px 16px; }
.card__cat { font-size: 12px; color: var(--saffron); font-weight: 500; letter-spacing: .02em; }
.card__title { font-family: var(--ff-display); font-size: 21px; font-weight: 600; line-height: 1.15; margin: 2px 0 4px; }
.card__meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.card__meta .star { color: var(--saffron); }
.card__body { padding: 0 16px 15px; }
.card__desc { font-size: 14px; color: var(--muted); }
.tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.tag { font-size: 11.5px; color: var(--faint); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }

/* event compact card */
.evt {
  display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px; align-items: stretch;
  animation: rise .5s both;
}
.evt__date {
  flex: 0 0 56px; background: var(--bg-soft); border-radius: 12px;
  display: grid; place-content: center; text-align: center; border: 1px solid var(--line);
}
.evt__day { font-family: var(--ff-display); font-size: 24px; font-weight: 900; line-height: 1; color: var(--coral); }
.evt__mon { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.evt__body { flex: 1; min-width: 0; }
.evt__title { font-weight: 600; font-size: 15.5px; }
.evt__where { font-size: 13px; color: var(--muted); margin-top: 2px; }
.evt__time { font-size: 12.5px; color: var(--saffron); margin-top: 6px; }

/* campaign pill row */
.camp-row { display: flex; gap: 12px; padding: 4px 20px; overflow-x: auto; scrollbar-width: none; }
.camp-row::-webkit-scrollbar { display: none; }
.camp {
  flex: 0 0 78%; background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
  position: relative; overflow: hidden;
}
.camp::before { content: '🎓'; position: absolute; right: -8px; bottom: -14px; font-size: 64px; opacity: .12; }
.camp--no::before { content: '🔥'; }
.camp__tag { font-size: 11px; color: var(--pistachio); letter-spacing: .08em; text-transform: uppercase; }
.camp__title { font-family: var(--ff-display); font-size: 18px; font-weight: 600; margin: 6px 0; line-height: 1.2; }
.camp__biz { font-size: 13px; color: var(--muted); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: 60;
  display: flex; justify-content: space-around;
  background: rgba(24,19,24,.82); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--faint); font-family: var(--ff-body);
  font-size: 10.5px; cursor: pointer; padding: 4px; transition: color .2s;
}
.tab__icon { font-size: 20px; transition: transform .2s; }
.tab.is-active { color: var(--coral); }
.tab.is-active .tab__icon { transform: translateY(-2px) scale(1.08); }

/* ---------- Detail / sheet view ---------- */
.view { display: none; animation: fade .35s both; }
.view.is-active { display: block; }
.detail__hero { position: relative; aspect-ratio: 16/11; }
.detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.detail__hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,11,16,.3), var(--bg)); }
.back-btn {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(14,11,16,.65); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.16);
  color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center;
}
.detail__body { padding: 0 20px 30px; margin-top: -40px; position: relative; z-index: 2; }
.detail__cat { color: var(--saffron); font-size: 13px; font-weight: 500; }
.detail__title { font-family: var(--ff-display); font-size: 30px; font-weight: 600; line-height: 1.1; margin: 4px 0 8px; }
.detail__rating { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.detail__desc { color: var(--muted); margin: 16px 0; font-size: 15px; line-height: 1.6; }
.info-grid { display: grid; gap: 10px; margin: 18px 0; }
.info-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px;
}
.info-row__icon { font-size: 18px; width: 24px; text-align: center; }
.info-row__text { flex: 1; font-size: 14px; }
.info-row__text small { display: block; color: var(--faint); font-size: 12px; }
.info-row__action { font-size: 13px; color: var(--coral); font-weight: 500; }

.cta-row { display: flex; gap: 10px; margin: 18px 0; }
.btn {
  flex: 1; padding: 14px; border-radius: 14px; border: none; cursor: pointer;
  font-family: var(--ff-body); font-weight: 600; font-size: 14px; transition: transform .15s, opacity .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--coral); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }

/* QR menu */
.menu-cat { margin: 20px 0; }
.menu-cat__title { font-family: var(--ff-display); font-size: 19px; font-weight: 600; color: var(--saffron); margin-bottom: 10px; }
.menu-item { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.menu-item__name { font-weight: 500; font-size: 15px; }
.menu-item__desc { font-size: 13px; color: var(--faint); margin-top: 2px; }
.menu-item__price { font-family: var(--ff-display); font-weight: 600; font-size: 17px; color: var(--text); white-space: nowrap; }
.qr-banner {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin: 6px 0 20px;
}
.qr-banner__code { width: 64px; height: 64px; border-radius: 10px; background: #fff; display: grid; place-items: center; font-size: 30px; }

/* AI assistant */
.ai-result { padding: 4px 20px; }
.ai-bubble {
  background: linear-gradient(135deg, rgba(255,90,77,.14), rgba(192,107,232,.1));
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 16px; animation: rise .4s both;
}
.ai-bubble__label { font-size: 12px; color: var(--coral); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.ai-bubble__text { font-size: 15px; color: var(--text); line-height: 1.6; }

/* favorites empty */
.empty { text-align: center; padding: 60px 30px; color: var(--faint); }
.empty__emoji { font-size: 48px; display: block; margin-bottom: 12px; }

/* discover category grid */
.cat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 4px 20px; }
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 16px; cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.cat-tile:hover { border-color: var(--coral); transform: translateY(-2px); }
.cat-tile__emoji { font-size: 28px; }
.cat-tile__name { font-family: var(--ff-display); font-size: 17px; font-weight: 600; margin-top: 8px; }
.cat-tile__count { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* utility */
.scroll-x { display: flex; gap: 14px; padding: 4px 20px; overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > .card { flex: 0 0 82%; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stagger > * { animation: rise .5s both; }
.stagger > *:nth-child(1){animation-delay:.04s}
.stagger > *:nth-child(2){animation-delay:.10s}
.stagger > *:nth-child(3){animation-delay:.16s}
.stagger > *:nth-child(4){animation-delay:.22s}
.stagger > *:nth-child(5){animation-delay:.28s}
.stagger > *:nth-child(6){animation-delay:.34s}
.stagger > *:nth-child(7){animation-delay:.40s}
.stagger > *:nth-child(8){animation-delay:.46s}

.demo-flag {
  text-align: center; font-size: 11px; color: var(--faint);
  padding: 24px 20px 8px; letter-spacing: .04em;
}
.demo-flag a { color: var(--coral); text-decoration: none; }
