:root {
  --red: #E31E24;
  --red-deep: #C4181E;
  --flame: #F99D1C;
  --flame-hot: #FDB913;
  --black: #000000;
  --ink: #0A0A0A;
  --char: #0E0E0E;
  --panel: #141414;
  --panel-2: #1A1A1A;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ash: #F5F5F5;
  --mist: rgba(245, 245, 245, 0.62);
  --font: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sticky-bg: rgba(8, 8, 8, 0.88);
  --max: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--ash);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(227, 30, 36, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(249, 157, 28, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 70%, rgba(227, 30, 36, 0.07), transparent 45%),
    linear-gradient(180deg, #050505 0%, var(--black) 40%, #070707 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

#qr-app { position: relative; z-index: 1; }

/* ── Loading ── */
.qr-loading {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px;
}

.qr-loading-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--flame), var(--red) 55%, var(--red-deep));
  box-shadow:
    0 0 0 1px rgba(249, 157, 28, 0.35),
    0 20px 50px rgba(227, 30, 36, 0.35);
  animation: qrPulse 1.8s ease-in-out infinite;
}

.qr-loading-bar {
  width: 128px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qr-loading-bar::after {
  content: '';
  display: block;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, var(--flame), var(--red));
  border-radius: 3px;
  animation: qrLoadBar 1.15s ease-in-out infinite;
}

.qr-loading p {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

@keyframes qrPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes qrLoadBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ── Hero ── */
.qr-hero {
  position: relative;
  min-height: min(58dvh, 460px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(48px + var(--safe-top)) 22px 44px;
}

.qr-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  animation: qrHeroKen 14s ease-in-out infinite alternate;
  filter: saturate(1.08) contrast(1.05);
}

@keyframes qrHeroKen {
  from { transform: scale(1.06) translateY(0); }
  to { transform: scale(1.12) translateY(-2%); }
}

.qr-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.94) 100%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(227, 30, 36, 0.35), transparent 55%);
  z-index: 1;
}

.qr-hero-ember {
  position: absolute;
  z-index: 1;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: qrEmber 8s ease-in-out infinite;
  pointer-events: none;
}

.qr-hero-ember--1 {
  top: 8%;
  left: 12%;
  background: var(--red);
}

.qr-hero-ember--2 {
  bottom: 18%;
  right: 8%;
  width: 140px;
  height: 140px;
  background: var(--flame);
  animation-delay: -3s;
}

@keyframes qrEmber {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate(10px, -14px) scale(1.12); opacity: 0.7; }
}

.qr-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.qr-hero-logo {
  width: clamp(120px, 30vw, 160px);
  height: clamp(120px, 30vw, 160px);
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: contain;
  background: #000;
  box-shadow:
    0 0 0 3px rgba(249, 157, 28, 0.45),
    0 0 0 10px rgba(227, 30, 36, 0.18),
    0 28px 70px rgba(0, 0, 0, 0.65);
  animation: qrHeroIn 0.85s var(--ease-out) both;
}

.qr-hero h1 {
  font-size: clamp(2rem, 8vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
  animation: qrHeroIn 0.85s var(--ease-out) 0.08s both;
}

.qr-hero-tagline {
  margin-top: 12px;
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  font-weight: 500;
  color: rgba(245, 245, 245, 0.78);
  letter-spacing: 0.01em;
  animation: qrHeroIn 0.85s var(--ease-out) 0.16s both;
}

.qr-hero-rule {
  width: 56px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--flame), var(--red));
  animation: qrHeroIn 0.85s var(--ease-out) 0.22s both;
}

@keyframes qrHeroIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Sticky toolbar ── */
.qr-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--sticky-bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}

.qr-search-wrap {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 16px 8px;
}

.qr-search-icon {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--mist);
  pointer-events: none;
}

.qr-search-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-search {
  width: 100%;
  padding: 14px 44px 14px 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ash);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.qr-search::placeholder { color: rgba(245, 245, 245, 0.4); }

.qr-search:focus {
  outline: none;
  border-color: rgba(227, 30, 36, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.18);
}

.qr-search-clear {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ash);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qr-search-clear:hover { background: rgba(255, 255, 255, 0.16); }

.qr-cats {
  display: flex;
  gap: 8px;
  padding: 6px 16px 14px;
  max-width: var(--max);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.qr-cats.is-panning { cursor: grabbing; }
.qr-cats::-webkit-scrollbar { display: none; }

.qr-cat-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: rgba(245, 245, 245, 0.72);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.qr-cat-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--flame) 0%, var(--red) 55%, var(--red-deep) 100%);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(227, 30, 36, 0.35);
  transform: translateY(-1px);
}

/* ── Main ── */
.qr-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 16px calc(36px + var(--safe-bottom));
}

.qr-section {
  margin-bottom: 36px;
  scroll-margin-top: 150px;
  animation: qrSectionIn 0.55s var(--ease) both;
}

@keyframes qrSectionIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.qr-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  padding: 8px 2px 0;
}

.qr-section-text h2 {
  font-size: clamp(1.25rem, 4.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.qr-section-text p {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

.qr-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(249, 157, 28, 0.55), transparent 85%);
  align-self: center;
  min-width: 40px;
}

/* ── Menu list ── */
.qr-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
}

.qr-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px 4px 16px 14px;
  border-bottom: 1px solid var(--line);
  animation: qrItemIn 0.45s var(--ease) both;
  transition: background 0.25s var(--ease);
}

.qr-item--media {
  grid-template-columns: 64px 1fr;
  gap: 14px;
}

.qr-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--flame), var(--red));
  opacity: 0.55;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}

.qr-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.qr-item:active::before {
  opacity: 1;
  transform: scaleY(1.08);
}

@keyframes qrItemIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qr-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qr-item-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.qr-item-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #fff;
}

.qr-item-dots {
  flex: 1;
  min-width: 18px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.qr-item-price {
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--flame);
  font-variant-numeric: tabular-nums;
}

.qr-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.qr-item-desc {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--mist);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Theme accents */
.qr-item--durum::before { background: linear-gradient(180deg, #FDB913, #F99D1C); }
.qr-item--meze::before,
.qr-item--salata::before { background: linear-gradient(180deg, #4ADE80, #16A34A); }
.qr-item--icecek::before { background: linear-gradient(180deg, #60A5FA, #2563EB); }
.qr-item--tatli::before { background: linear-gradient(180deg, #F9A8D4, #E31E24); }
.qr-item--corba::before,
.qr-item--sulu::before { background: linear-gradient(180deg, #FDBA74, #EA580C); }

/* ── Empty / disabled ── */
.qr-no-results,
.qr-disabled {
  text-align: center;
  padding: 56px 24px;
  color: var(--mist);
}

.qr-no-results p,
.qr-disabled p {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

.qr-disabled {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.qr-disabled h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.qr-disabled .qr-logo,
.qr-disabled .qr-logo-fallback {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 0 0 3px rgba(249, 157, 28, 0.3);
}

.qr-disabled .qr-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, var(--flame), var(--red));
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.qr-retry-btn {
  margin-top: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--flame), var(--red) 55%, var(--red-deep));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(227, 30, 36, 0.35);
}

/* ── Footer ── */
.qr-footer {
  padding: 8px 16px calc(28px + var(--safe-bottom));
}

.qr-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(227, 30, 36, 0.12), transparent 70%);
}

.qr-footer-brand {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.qr-footer-line {
  width: 40px;
  height: 2px;
  margin: 12px auto;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--flame), var(--red));
}

.qr-footer p {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--mist);
}

.qr-footer-home {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: rgba(245, 245, 245, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.qr-footer-home:hover {
  border-color: rgba(227, 30, 36, 0.5);
  color: #fff;
  background: rgba(227, 30, 36, 0.12);
}

@media (min-width: 640px) {
  .qr-item {
    padding: 18px 6px 18px 16px;
  }

  .qr-item-name { font-size: 1.08rem; }
  .qr-item-price { font-size: 1.12rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
