/* ============================================================
   BAROCKA · HALLOWEEN TEMASI
   ------------------------------------------------------------
   Nasıl çalışır?
   · Bu dosya her zaman yüklüdür ama kuralların TAMAMI yalnızca
     <html data-theme="halloween"> iken etkindir.
   · Tema panelden (Tema sekmesi) açılıp kapatılır; kapatınca
     tek bir öznitelik değişir ve menü anında klasik haline döner.
     Veritabanına, ürünlere, fiyatlara dokunulmaz.
   · Önizleme: menü adresinin sonuna ?theme=halloween ekleyin.
   · Tasarım ilkesi: "profesyonel korku" — kabak turuncusu +
     gece moru, yumuşak ışıma, az ve zarif dekor (ay, yıldız,
     birkaç yarasa, köşe örümcek ağı). Çocuksu/emoji yığını yok.
   ============================================================ */

html[data-theme="halloween"] {
  --bg: #0f0b14;
  --card: #1a1322;
  --surface-2: #241a2f;
  --ink: #f5efe7;
  --dim: #b8aac6;
  --faint: #7f7391;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #ff7a1a;
  --accent-dark: #ff8f3d;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --accent-ring: rgba(255, 122, 26, 0.38);
  --accent-text: #ffb366;
  --accent-soft-dark: rgba(255, 122, 26, 0.24);
  --dark: #0a0710;
  --dark-2: #171020;
  --on-dark: #ffffff;
  --on-dark-dim: rgba(255, 255, 255, 0.6);
  --star: #ffb020;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.55);
  --catbar-bg: rgba(15, 11, 20, 0.97);
  --catbar-bg-blur: rgba(15, 11, 20, 0.84);
  --hw-purple: #7c3aed;
  --hw-violet: #a78bfa;
  --hw-on-accent: #1a0d04;        /* turuncu zemin üstünde koyu yazı (okunabilirlik) */
  color-scheme: dark;
}

html[data-theme="halloween"] body {
  background:
    radial-gradient(70% 36% at 85% 0%, rgba(124, 58, 237, 0.20), transparent 70%),
    radial-gradient(60% 30% at 0% 100%, rgba(255, 122, 26, 0.14), transparent 70%),
    var(--bg);
}

/* ============================================================
   DEKOR KATMANI (menu.js temalı modda #themeFx olarak ekler)
   İçeriğin ARKASINDA durur; dokunmaları engellemez.
   ============================================================ */
html[data-theme="halloween"] .theme-fx {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Ay */
html[data-theme="halloween"] .hw-moon {
  position: absolute; top: 76px; right: 6%;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fff6dc 0%, #f6dfa9 48%, #d8b878 100%);
  box-shadow:
    0 0 36px 10px rgba(255, 225, 160, 0.22),
    0 0 120px 44px rgba(255, 160, 60, 0.12);
  opacity: 0.92;
}
html[data-theme="halloween"] .hw-moon::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(10px 10px at 62% 58%, rgba(170, 130, 70, 0.35), transparent 70%),
    radial-gradient(7px 7px at 34% 66%, rgba(170, 130, 70, 0.30), transparent 70%),
    radial-gradient(5px 5px at 58% 28%, rgba(170, 130, 70, 0.28), transparent 70%);
}

/* Yıldızlar (döşeli nokta deseni, yavaş parıltı) */
html[data-theme="halloween"] .hw-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 48% 8%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 82% 26%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 30% 44%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.8px 1.8px at 66% 54%, rgba(255, 230, 190, 0.8), transparent 60%),
    radial-gradient(1.1px 1.1px at 90% 72%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 20% 80%, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(1px 1px at 56% 90%, rgba(255, 255, 255, 0.55), transparent 60%);
  background-size: 340px 340px;
  opacity: 0.55;
  animation: hwTwinkle 6s ease-in-out infinite;
}
@keyframes hwTwinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.75; }
}

/* Yarasalar: siluet ::before üzerinde kanat çırpar, öğe ekranı yavaşça geçer */
html[data-theme="halloween"] .hw-bat {
  position: absolute; left: 0; top: 0;
  width: 30px; height: 16px;
  opacity: 0;
  animation: hwFly 26s linear infinite;
  will-change: transform;
}
html[data-theme="halloween"] .hw-bat::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath fill='%23342645' d='M32 6c-2 5-6 8-11 8-7 0-13 4-19 12 6-4 11-5 16-3-1 4 1 7 4 9 3-3 6-4 10-4s7 1 10 4c3-2 5-5 4-9 5-2 10-1 16 3-6-8-12-12-19-12-5 0-9-3-11-8z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: hwFlap 0.55s ease-in-out infinite;
  transform-origin: 50% 30%;
}
html[data-theme="halloween"] .hw-bat--1 { animation-duration: 26s; animation-delay: 2s; }
html[data-theme="halloween"] .hw-bat--2 { animation-duration: 34s; animation-delay: 13s; width: 22px; height: 12px; }
html[data-theme="halloween"] .hw-bat--3 { animation-duration: 30s; animation-delay: 22s; width: 36px; height: 19px; }
html[data-theme="halloween"] .hw-bat--2::before { animation-duration: 0.45s; }
@keyframes hwFly {
  0%   { transform: translate(-8vw, 24vh) rotate(-4deg); opacity: 0; }
  4%   { opacity: 0.75; }
  30%  { transform: translate(28vw, 12vh) rotate(5deg); }
  55%  { transform: translate(58vw, 20vh) rotate(-5deg); }
  80%  { transform: translate(88vw, 9vh) rotate(3deg); opacity: 0.75; }
  100% { transform: translate(112vw, 15vh) rotate(-2deg); opacity: 0; }
}
@keyframes hwFlap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.55); }
}

/* Zemin sisi */
html[data-theme="halloween"] .hw-fog {
  position: absolute; left: -30%; right: -30%; bottom: 0;
  height: 30vh;
  background:
    radial-gradient(45% 60% at 30% 100%, rgba(167, 139, 250, 0.14), transparent 70%),
    radial-gradient(40% 55% at 75% 100%, rgba(255, 122, 26, 0.10), transparent 70%);
  animation: hwDrift 18s ease-in-out infinite alternate;
}
@keyframes hwDrift {
  from { transform: translateX(-4%); }
  to   { transform: translateX(4%); }
}

/* Balkabakları (içi mum gibi yanıp titrer) — karşılama köşeleri + footer */
html[data-theme="halloween"] .hw-pumpkin {
  position: absolute;
  display: block;
  width: 58px; height: 58px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 16c-2-8 5-15 11-12-4 3-6 7-5 13z' fill='%235b7a2e'/%3E%3Cpath d='M46 21c-6-1-9-4-9-4 2 3 4 5 7 7z' fill='%236f8f3a'/%3E%3Cellipse cx='50' cy='61' rx='43' ry='34' fill='%23d95a12'/%3E%3Cellipse cx='28' cy='61' rx='19' ry='33' fill='%23f2741f'/%3E%3Cellipse cx='72' cy='61' rx='19' ry='33' fill='%23f2741f'/%3E%3Cellipse cx='50' cy='61' rx='21' ry='35' fill='%23ff8a2e'/%3E%3Cpath d='M37 28q-10 33 0 66M63 28q10 33 0 66' stroke='%23b84a12' stroke-width='1.6' fill='none' opacity='.55'/%3E%3Cpath d='M29 51l12-12 6 15zM71 51l-12-12-6 15zM50 58l-5 9h10z' fill='%23fff0b0'/%3E%3Cpath d='M26 70l8 6 6-6 10 7 10-7 6 6 8-6q-24 24-48 0z' fill='%23fff0b0'/%3E%3Cpath d='M29 51l12-12 6 15zM71 51l-12-12-6 15zM50 58l-5 9h10zM26 70l8 6 6-6 10 7 10-7 6 6 8-6q-24 24-48 0z' fill='%23ffd166' opacity='.5'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 7px rgba(255, 170, 60, 0.55));
  animation: hwCandle 3.4s ease-in-out infinite;
  pointer-events: none;
}
html[data-theme="halloween"] .hw-pumpkin--l { left: 4%; bottom: -8px; transform: rotate(-8deg); }
html[data-theme="halloween"] .hw-pumpkin--r {
  right: 4%; bottom: -4px;
  width: 44px; height: 44px;
  transform: rotate(7deg);
  animation-delay: 1.3s;
}
html[data-theme="halloween"] .hw-pumpkin--foot {
  left: 50%; top: 32px;
  width: 38px; height: 38px;
  margin-left: 58px;
  transform: rotate(6deg);
  animation-delay: 0.7s;
}
@keyframes hwCandle {
  0%, 100% { filter: drop-shadow(0 0 7px rgba(255, 170, 60, 0.55)); }
  40%      { filter: drop-shadow(0 0 13px rgba(255, 190, 80, 0.85)); }
  55%      { filter: drop-shadow(0 0 8px rgba(255, 170, 60, 0.6)); }
  70%      { filter: drop-shadow(0 0 15px rgba(255, 200, 90, 0.9)); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="halloween"] .hw-bat { display: none; }
  html[data-theme="halloween"] .hw-stars,
  html[data-theme="halloween"] .hw-fog,
  html[data-theme="halloween"] .hw-pumpkin { animation: none; }
}

/* ============================================================
   PRELOADER
   ============================================================ */
html[data-theme="halloween"] .preloader {
  background:
    radial-gradient(60% 50% at 50% 110%, rgba(255, 122, 26, 0.22), transparent 70%),
    var(--dark);
}
html[data-theme="halloween"] .preloader__tag { color: var(--accent-text); }

/* ============================================================
   ÜST BAR · KARŞILAMA
   ============================================================ */
html[data-theme="halloween"] .topbar {
  background: rgba(10, 7, 16, 0.96);
  box-shadow: 0 1px 0 rgba(255, 122, 26, 0.28), 0 8px 28px rgba(0, 0, 0, 0.45);
}
html[data-theme="halloween"] .topbar__logo { filter: drop-shadow(0 0 10px rgba(255, 122, 26, 0.45)); }
html[data-theme="halloween"] .topbar__bell {
  background: rgba(255, 122, 26, 0.10);
  border-color: rgba(255, 122, 26, 0.28);
  color: #ffd9b8;
}
html[data-theme="halloween"] .topbar__bell:hover { background: rgba(255, 122, 26, 0.18); }

/* Köşelerde iki zarif örümcek ağı */
html[data-theme="halloween"] .welcome::before,
html[data-theme="halloween"] .welcome::after {
  content: '';
  position: absolute; top: 0;
  width: 120px; height: 120px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='white' stroke-opacity='.5' stroke-width='.9' stroke-linecap='round'%3E%3Cpath d='M0 0L100 0M0 0L92.4 38.3M0 0L70.7 70.7M0 0L38.3 92.4M0 0L0 100'/%3E%3Cpath d='M25 0Q21.6 4.3 23.1 9.6Q18.3 12.2 17.7 17.7Q12.2 18.3 9.6 23.1Q4.3 21.6 0 25'/%3E%3Cpath d='M45 0Q38.8 7.7 41.6 17.2Q32.9 22 31.8 31.8Q22 32.9 17.2 41.6Q7.7 38.8 0 45'/%3E%3Cpath d='M65 0Q56.1 11.2 60.1 24.9Q47.5 31.8 46 46Q31.8 47.5 24.9 60.1Q11.2 56.1 0 65'/%3E%3Cpath d='M85 0Q73.4 14.6 78.5 32.5Q62.2 41.6 60.1 60.1Q41.6 62.2 32.5 78.5Q14.6 73.4 0 85'/%3E%3C/svg%3E") top left / contain no-repeat;
  opacity: 0.32;
  pointer-events: none;
}
html[data-theme="halloween"] .welcome::before { left: 0; }
html[data-theme="halloween"] .welcome::after  { right: 0; transform: scaleX(-1); }

html[data-theme="halloween"] .welcome__logo {
  background: linear-gradient(160deg, #1b1226, #0a0710);
  box-shadow:
    0 0 0 1px rgba(255, 122, 26, 0.35),
    0 12px 44px rgba(255, 122, 26, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
html[data-theme="halloween"] .welcome__tag { color: var(--hw-violet); }
html[data-theme="halloween"] .welcome__chip {
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.18), rgba(124, 58, 237, 0.18));
  border-color: rgba(255, 122, 26, 0.45);
  color: #ffc48a;
  box-shadow: 0 0 22px rgba(255, 122, 26, 0.18);
}

/* Başlık: turuncu-altın degrade + ara sıra mum gibi titreme */
html[data-theme="halloween"] .homecats__title,
html[data-theme="halloween"] .section__title {
  background: linear-gradient(90deg, #ffb366, #ff7a1a 55%, #ffd29a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
}
html[data-theme="halloween"] .homecats__title { animation: hwFlicker 9s linear infinite; }
@keyframes hwFlicker {
  0%, 89%, 100% { opacity: 1; }
  90% { opacity: 0.72; }
  91% { opacity: 1; }
  93% { opacity: 0.85; }
  94% { opacity: 1; }
}

/* ============================================================
   KATEGORİ KARTLARI · PİLLER
   ============================================================ */
html[data-theme="halloween"] .catcard {
  background: var(--dark-2);
  box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.16), var(--shadow);
}
html[data-theme="halloween"] .catcard:hover { box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.4), var(--shadow-lg); }
html[data-theme="halloween"] .catcard__shade {
  background: linear-gradient(180deg, rgba(10, 7, 16, 0.08) 25%, rgba(10, 7, 16, 0.92) 100%);
}
html[data-theme="halloween"] .catcard__count { color: #ffb366; }

html[data-theme="halloween"] .catpill { background: var(--card); border-color: var(--line); }
html[data-theme="halloween"] .catpill__thumb { background: var(--surface-2); }
html[data-theme="halloween"] .catpill.active {
  background: linear-gradient(135deg, #ff8a2a, #ff6a00);
  border-color: transparent;
  color: var(--hw-on-accent);
  box-shadow: 0 6px 18px rgba(255, 122, 26, 0.35);
}
html[data-theme="halloween"] .catpill.active .catpill__thumb { background: rgba(0, 0, 0, 0.25); }
html[data-theme="halloween"] .catpill.active .catpill__thumb svg { color: var(--hw-on-accent); }

html[data-theme="halloween"] .catbar { border-bottom-color: rgba(255, 122, 26, 0.18); }
html[data-theme="halloween"] .catbar__arrow,
html[data-theme="halloween"] .promo__arrow { background: var(--card); color: var(--dim); }

/* ============================================================
   ARAMA · GERİ
   ============================================================ */
html[data-theme="halloween"] .menubar__back,
html[data-theme="halloween"] .search input { background: var(--card); border-color: var(--line); }
html[data-theme="halloween"] .search input:focus,
html[data-theme="halloween"] .menubar__back:hover { border-color: rgba(255, 122, 26, 0.5); }
html[data-theme="halloween"] .search__clear { background: var(--surface-2); color: var(--dim); }

/* ============================================================
   KAMPANYA KARTLARI
   ============================================================ */
html[data-theme="halloween"] .promo-card {
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(124, 58, 237, 0.28), transparent 55%),
    linear-gradient(120deg, #1b1226, #0a0710);
  border-color: rgba(255, 122, 26, 0.28);
}
html[data-theme="halloween"] .promo-card__img { background: var(--surface-2); }
html[data-theme="halloween"] .promo__dots span { background: rgba(255, 255, 255, 0.18); }
html[data-theme="halloween"] .promo__dots span.active { background: var(--accent); }

/* ============================================================
   ÜRÜN KARTLARI
   ============================================================ */
html[data-theme="halloween"] .pcard { border-color: var(--line); }
html[data-theme="halloween"] .pcard:hover { border-color: rgba(255, 122, 26, 0.45); }
html[data-theme="halloween"] .pcard__media { background: var(--surface-2); }
html[data-theme="halloween"] .pcard__media.is-loading::after {
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  background-size: 250% 100%;
}
html[data-theme="halloween"] .chip--sale { background: var(--hw-purple); color: #fff; }
html[data-theme="halloween"] .chip--out { background: #3a3242; color: #d8cfe3; }
html[data-theme="halloween"] .chip--campaign { background: var(--accent); color: var(--hw-on-accent); }
html[data-theme="halloween"] .pcard__price.sale,
html[data-theme="halloween"] .psheet__price .now.sale { color: #ffa14d; }
html[data-theme="halloween"] .section__count { color: var(--faint); }
html[data-theme="halloween"] .no-results b { color: var(--ink); }

/* ============================================================
   BİLGİ KARTLARI (şarkı, görüş, kayıt) · FOOTER
   ============================================================ */
html[data-theme="halloween"] .songcard__inner {
  background:
    radial-gradient(130% 180% at 100% 0%, rgba(255, 122, 26, 0.26), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(124, 58, 237, 0.22), transparent 60%),
    #0e0a15;
  border: 1px solid rgba(255, 122, 26, 0.22);
}
html[data-theme="halloween"] .songcard__icon { color: var(--hw-on-accent); }
html[data-theme="halloween"] .feedback__inner { background: var(--card); border-color: var(--line); }
html[data-theme="halloween"] .contact__icon--phone { background: var(--hw-purple); }
html[data-theme="halloween"] .subcard__inner {
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(124, 58, 237, 0.26), transparent 60%),
    #0e0a15;
  border: 1px solid rgba(255, 122, 26, 0.22);
}
html[data-theme="halloween"] .footer {
  background: #07050b;
  border-top: 1px solid rgba(255, 122, 26, 0.18);
}
html[data-theme="halloween"] .footer::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -48px; height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(7, 5, 11, 0.9));
  pointer-events: none;
}

/* ============================================================
   BUTONLAR · ROZETLER · PENCERELER
   ============================================================ */
html[data-theme="halloween"] .btn--primary {
  background: linear-gradient(135deg, #ff8f3d, #ff6a00);
  color: var(--hw-on-accent);
  box-shadow: 0 8px 22px rgba(255, 122, 26, 0.32);
}
html[data-theme="halloween"] .btn--primary:hover { background: linear-gradient(135deg, #ffa05a, #ff7a1a); }
html[data-theme="halloween"] .btn--ghost { border-color: var(--line-strong); color: var(--ink); }
html[data-theme="halloween"] .badge-campaign { color: #ffa14d; }
html[data-theme="halloween"] .welcome__chip,
html[data-theme="halloween"] .sold-badge,
html[data-theme="halloween"] .psheet__tags span,
html[data-theme="halloween"] .kvkk-details,
html[data-theme="halloween"] .field input,
html[data-theme="halloween"] .field textarea { background: var(--surface-2); border-color: var(--line); }
html[data-theme="halloween"] .field input:focus,
html[data-theme="halloween"] .field textarea:focus { border-color: rgba(255, 122, 26, 0.55); }
html[data-theme="halloween"] .field input::placeholder,
html[data-theme="halloween"] .field textarea::placeholder { color: var(--faint); }
html[data-theme="halloween"] .check input { accent-color: var(--accent); }

html[data-theme="halloween"] .sheet-backdrop { background: rgba(5, 3, 9, 0.72); }
html[data-theme="halloween"] .sheet {
  background: var(--card);
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 122, 26, 0.16);
}
html[data-theme="halloween"] .sheet::before { background: rgba(255, 255, 255, 0.45); }
html[data-theme="halloween"] .sheet__close {
  background: rgba(26, 19, 34, 0.92);
  border-color: var(--line-strong);
  color: var(--ink);
}
html[data-theme="halloween"] .gallery__track { background: var(--surface-2); }
html[data-theme="halloween"] .rate-row { border-bottom-color: var(--line); }
html[data-theme="halloween"] .stars button { color: rgba(255, 255, 255, 0.18); }
html[data-theme="halloween"] .stars button.on { color: var(--star); }
html[data-theme="halloween"] .waiter-note,
html[data-theme="halloween"] .feedback__contacts { border-top-color: var(--line); }

html[data-theme="halloween"] .toast,
html[data-theme="halloween"] .nowplaying,
html[data-theme="halloween"] .totop {
  background: #16101e;
  border: 1px solid rgba(255, 122, 26, 0.28);
  color: var(--ink);
}
