/* ============================================================
   Octopus Player — Premium Refinements
   Additive only. Renk paleti ve tema DEĞİŞMEZ; mevcut token'lar
   (--accent, --accent-gradient, cam yüzeyler) korunur. Bu katman
   yalnızca derinlik, ışık, mikro-etkileşim + mobil taşma düzeltmesi
   + APK indirme modalı ekler.
   ============================================================ */

/* ─── Mobil yatay taşma koruması ─── */
/* 'clip', 'hidden' ile aynı şekilde yatay kaydırmayı engeller ama ana
   sayfadaki position:sticky bölümleri bozmaz (hidden bozabilir). */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video, canvas, iframe { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }

/* ─── Optik tipografi ince ayarı (Inter) ─── */
body {
  font-feature-settings: "cv11" 1, "ss01" 1, "calt" 1;
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
}
.hero h1, .section__header h2, .sticky-scroll-area h3,
.bento-item h3, .cta-section h2, .qs-page-head h1 { text-wrap: balance; }
.hero__desc, .section__sub, .feat-card p, .bento-item p { text-wrap: pretty; }

/* ─── Marka renginde seçim & scrollbar ─── */
::selection { background: rgba(99, 102, 241, 0.18); color: #312e81; }
@media (min-width: 769px) {
  html { scrollbar-width: thin; scrollbar-color: rgba(129, 140, 248, 0.6) transparent; }
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #818cf8, #f472b6);
    background-clip: padding-box; border: 2px solid transparent; border-radius: 999px;
  }
  ::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6366f1, #ec4899); background-clip: padding-box; }
}

/* ─── İnce film-grain (aurora'nın üstünde, içeriğin altında) ─── */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.028; mix-blend-mode: multiply; background-size: 160px 160px;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
  body::after {
    display: none;
  }
}

/* ─── Premium birincil buton: cam parıltısı (sheen) + katmanlı gölge ─── */
.btn--primary {
  position: relative; overflow: hidden; isolation: isolate; letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45),
              0 10px 25px -5px rgba(236, 72, 153, 0.32),
              0 2px 6px rgba(79, 70, 229, 0.18);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
  transform: translateX(-135%); transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn--primary:hover::after { transform: translateX(135%); }

/* Erişilebilir ve premium odak halkası */
.btn:focus-visible, [data-apk-open]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 0 0 6px rgba(236, 72, 153, 0.18);
}

/* ─── Ana sayfa hero butonları: mobilde sade & taşmasız ─── */
.hero__actions { flex-wrap: wrap; }
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; width: 100%; gap: 12px; }
  .hero__actions .btn { width: 100%; }
}

/* ─── APK İndirme Modalı / Bottom-sheet ─── */
.apk-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: flex-end; justify-content: center;
  visibility: hidden; pointer-events: none;
}
@media (min-width: 600px) { .apk-modal { align-items: center; } }
.apk-modal.open { visibility: visible; pointer-events: auto; }
.apk-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.3s ease;
}
.apk-modal.open .apk-modal__backdrop { opacity: 1; }
.apk-modal__sheet {
  position: relative;
  width: 100%; max-width: 440px; margin: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px 28px 0 0;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px -15px rgba(15, 23, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 600px) {
  .apk-modal__sheet {
    border-radius: 28px; margin: 0 16px; padding: 30px 26px 26px;
    transform: translateY(16px) scale(0.97);
    box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}
.apk-modal.open .apk-modal__sheet { transform: translateY(0) scale(1); }
.apk-modal__handle {
  width: 40px; height: 4px; border-radius: 999px; background: rgba(99, 102, 241, 0.25);
  margin: 0 auto 18px;
}
@media (min-width: 600px) { .apk-modal__handle { display: none; } }
.apk-modal__x {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #64748b; cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s;
}
.apk-modal__x:hover { color: #db2777; background: #fff; }
.apk-modal__x svg { width: 18px; height: 18px; }
.apk-modal__title {
  margin: 0 0 4px; font-size: 1.35rem; font-weight: 900; letter-spacing: -0.03em;
  color: #0f172a; text-align: center;
}
.apk-modal__sub { margin: 0 0 22px; font-size: 0.92rem; color: var(--text-muted); text-align: center; }
.apk-modal__options { display: flex; flex-direction: column; gap: 12px; }

.apk-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 22px -12px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative; overflow: hidden;
}
.apk-opt:hover, .apk-opt:focus-visible {
  outline: none; transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 18px 38px -15px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.apk-opt__icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 6px 16px -4px rgba(236, 72, 153, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.apk-opt__icon svg { width: 23px; height: 23px; }
.apk-opt__text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; flex: 1; min-width: 0; }
.apk-opt__text strong { font-size: 15px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.apk-opt__text small { font-size: 12px; font-weight: 600; color: #64748b; margin-top: 2px; }
.apk-opt__arrow { color: #6366f1; flex-shrink: 0; transition: transform 0.3s ease; }
.apk-opt:hover .apk-opt__arrow { transform: translateY(3px); }
.apk-modal__hint {
  margin: 18px 0 0; font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.5;
}

/* ─── Final CTA: indirme butonuna da parıltı uyumu ─── */
.cta-section .btn--primary::after {
  background: linear-gradient(115deg, transparent 32%, rgba(99, 102, 241, 0.18) 50%, transparent 68%);
}

/* ─── Quick-setup: kod numarası dar ekranda taşmasın ─── */
.qs-code-number { max-width: 100%; }
@media (max-width: 420px) {
  .qs-code-number {
    font-size: clamp(2.6rem, 13vw, 3.4rem);
    letter-spacing: 0.06em; padding: 10px 14px;
  }
  .qs-wrap { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================
   QUICK-SETUP — KENDİNDEN YETERLİ PREMIUM STİLLER
   premium.css yüklendiği sürece çalışır; quick-setup.css'e
   bağımlı DEĞİL. Hem yeni .setup-* class'larını hem mevcut
   .qs-* yapısını hedefler (geri uyumlu). Scope: .quick-setup-page
   ============================================================ */

/* Mobil taşmayı zorla engelle (bu sayfada sticky yok, hidden güvenli) */
.quick-setup-page { overflow-x: hidden; width: 100%; }
.quick-setup-page * { max-width: 100%; }
/* Dekoratif aurora arka planı küçülmesin (daha yüksek özgüllük) */
.quick-setup-page .aurora-wrapper,
.quick-setup-page .aurora-blob { max-width: none; }

/* Form kartı (PC'de 760px cap, ortalı, premium cam) */
.quick-setup-page .setup-card,
.quick-setup-page .qs-card {
  max-width: 760px; width: 100%; margin: 0 auto; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px; padding: 32px;
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 24px 60px -20px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Başlık responsive — mobilde kırpılmasın */
.quick-setup-page .qs-page-head { max-width: 760px; }
.quick-setup-page .qs-page-head h1 {
  font-size: clamp(34px, 9vw, 60px); line-height: 1.08; letter-spacing: -0.03em;
}

/* M3U / Xtream — modern segment tab (default button gibi DURMASIN) */
.quick-setup-page .setup-tabs,
.quick-setup-page .qs-tabs--radio {
  display: flex; gap: 8px; padding: 5px; margin-bottom: 22px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}
.quick-setup-page .setup-tab,
.quick-setup-page .qs-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 0; font-size: 13.5px; font-weight: 700; font-family: inherit;
  color: var(--text-silver); background: transparent; border: none;
  border-radius: 10px; cursor: pointer; appearance: none; -webkit-appearance: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-setup-page .setup-tab.active,
.quick-setup-page .qs-tab.active {
  color: #ffffff; background: var(--accent-gradient);
  box-shadow: 0 8px 18px -6px rgba(236, 72, 153, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Inputlar (default tarayıcı stili gibi DURMASIN) */
.quick-setup-page .setup-input,
.quick-setup-page .setup-form input,
.quick-setup-page .qs-card input {
  width: 100%; box-sizing: border-box; min-height: 52px;
  padding: 15px 16px; border-radius: 14px; font-size: 14.5px; font-family: inherit;
  color: #0f172a; outline: none; appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(99, 102, 241, 0.15);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.quick-setup-page .setup-input:focus,
.quick-setup-page .setup-form input:focus,
.quick-setup-page .qs-card input:focus {
  border-color: #6366f1; background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.quick-setup-page .qs-card input::placeholder { color: #94a3b8; }
/* Şifre alanındaki göz butonu için sağ boşluk korunsun */
.quick-setup-page .qs-pwd input { padding-right: 48px; }

/* Gönder butonu (full width, premium gradient, dokunulabilir) */
.quick-setup-page .setup-submit,
.quick-setup-page .qs-submit {
  width: 100%; min-height: 54px; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700; font-family: inherit; color: #ffffff; cursor: pointer;
  background: var(--accent-gradient);
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.32);
}

/* APK İndir tetikleyici butonu — premium pill */
.quick-setup-page .qs-apk .btn--outline {
  min-height: 50px; padding: 0 26px; border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2); background: rgba(255, 255, 255, 0.7);
  color: #4f46e5; font-weight: 700;
}

/* PC'de form aşırı yayılmasın, kompakt dursun */
@media (min-width: 768px) {
  .quick-setup-page .qs-wrap { padding-top: calc(var(--topbar-h) + 40px); }
}
