/* ============================================================
   W — Koyu tema (#000), büyük butonlar/büyük yazı, mobil öncelikli
   Fontlar: cihazın sistem fontu (mobile sync)
   ============================================================ */
:root {
  --bg: #000000;
  --surface: #0e0e10;
  --surface2: #18181c;
  --line: #1d1d22;
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --accent: #1d9bf0;
  --accent-soft: rgba(29, 155, 240, 0.16);
  --danger: #f4212e;
  --heart: #f91880;
  --hot: #ff8a3d;
  --radius: 22px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation: none !important; transition: none !important;
}
body.high-contrast .card { background: #141419; border-color: #3a3a46; }
body.high-contrast .card-title, body.high-contrast .channel { color: #ffffff; }
body.compact .card-title { font-size: 0.95rem !important; }
body.compact .card-text { font-size: 0.9rem !important; }
body.no-ts .time, body.no-ts .sub .dot { display: none; }
body.no-logos .avatar { display: none; }
body.no-bold .card-title { font-weight: 600; }

img { display: block; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.hidden { display: none !important; }

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 16px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { height: 36px; width: auto; }
.topbtn {
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  padding: 10px 18px; border-radius: 999px; min-height: 44px;
}
button.topbtn:active { background: var(--surface2); }

/* ---------- Akış ---------- */
.feed { max-width: 640px; margin: 0 auto; padding: 14px 12px 8px; }
.feed.slim { padding-top: 8px; }

.sec-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 800; color: var(--text);
  padding: 12px 4px 10px;
}
.sec-head.small { padding: 6px 4px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.sec-head .sec-val { margin-left: auto; color: var(--accent); }
.sec-head img { width: 20px; height: 20px; }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 8px;
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface2); flex: none;
}
.avatar.big { width: 64px; height: 64px; }
.meta { min-width: 0; flex: 1; }
.channel { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 0.85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.sub .dot { color: var(--muted); }
.badge-hot {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--hot); font-size: 0.8rem; font-weight: 800;
  background: rgba(255, 138, 61, 0.12);
  padding: 4px 10px; border-radius: 999px; flex: none;
}
.badge-hot img { width: 15px; height: 15px; }

.card-title {
  font-size: 1.15rem; font-weight: 700; line-height: 1.35;
  padding: 2px 16px 12px; overflow-wrap: anywhere;
}
.card-text {
  font-size: 1.02rem; line-height: 1.6; color: #d6d6dd;
  padding: 0 16px 10px; overflow-wrap: anywhere;
}
.card-text .lead { color: var(--accent); font-weight: 700; }
.src-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 16px 14px; padding: 9px 14px;
  background: var(--surface2); border-radius: 999px;
  font-size: 0.88rem; color: var(--muted); max-width: calc(100% - 32px);
}
.src-chip img { width: 16px; height: 16px; }
.src-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Özel video oynatıcı (controls=0, autoplay, yuvarlak) ---------- */
.player {
  position: relative;
  margin: 0 16px 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #101014;
  aspect-ratio: 16 / 9;
  max-width: 360px;
}
@media (max-width: 640px) { .player { max-width: none; margin: 0 12px 12px; } }
.player iframe, .player .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pctl {
  position: absolute; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}
.pctl img { width: 34px; height: 34px; }
.pctl.big {
  inset: 0; margin: auto;
  width: 76px; height: 76px;
  border: 2px solid rgba(255, 255, 255, 0.75);
}
.pctl.big:active { transform: scale(0.94); }
.pctl.mute { right: 10px; bottom: 10px; width: 46px; height: 46px; }
.pctl.mute img { width: 24px; height: 24px; }

/* ---------- Aksiyonlar ---------- */
.actions {
  display: flex; align-items: center; gap: 22px;
  padding: 4px 16px 14px;
}
.act { display: inline-flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 700; color: var(--muted); min-height: 44px; }
.act img { width: 27px; height: 27px; }
.act.like.liked { color: var(--heart); }
.act.like.liked img { transform: scale(1.02); }
.act:active { transform: scale(0.97); }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
body:not(.reduce-motion) .act.like.pop img { animation: pop 0.35s ease; }
.brandtag {
  margin-left: auto;
  font-size: 0.82rem; font-weight: 800; color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px; border-radius: 999px; max-width: 40%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Yatay kaydırıcılar ---------- */
.slider {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  position: relative;
}
.slider::-webkit-scrollbar { display: none; }
.slider .card { min-width: 80%; max-width: 80%; margin-bottom: 0; scroll-snap-align: center; flex: none; }
@media (min-width: 640px) { .slider .card { min-width: 300px; max-width: 300px; } }

.slider-btn {
  position: absolute; top: 42%;
  transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(14, 14, 16, 0.9);
  border: 1px solid #2a2a32;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.slider-btn img { width: 24px; height: 24px; }
.slider-btn.l { left: -4px; }
.slider-btn.r { right: -4px; }
/* Mobilde ok butonları gizli (parmakla kaydırma) */
@media (pointer: coarse) { .slider-btn { display: none; } }

/* ---------- Alt navigasyon (3 buton) ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.navbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.78rem; font-weight: 700; color: #7d7d86;
}
.navbtn img { width: 27px; height: 27px; }
.navbtn.active { color: var(--text); }
.navbtn:active { opacity: 0.7; }

/* ---------- Sayfalar / kart içi bölümler ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 16px 12px; }
.page.narrow { max-width: 560px; }
.section-card { padding-bottom: 8px; }
.section-card .sec-head { padding-top: 14px; }

.profile-card { padding: 18px 16px; }
.profile-row { display: flex; gap: 16px; align-items: center; }
.p-name { font-size: 1.25rem; font-weight: 800; }
.p-mail { font-size: 0.92rem; color: var(--muted); }
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 16px; text-align: center;
}
.stat { background: var(--surface2); border-radius: 16px; padding: 12px 6px; }
.stat b { font-size: 1.2rem; display: block; }
.stat span { font-size: 0.8rem; color: var(--muted); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 700;
  background: var(--surface2); color: var(--muted);
  border: 1px solid transparent;
}
.chip.sel { background: var(--accent-soft); color: var(--accent); }

/* ---------- Ayarlar ---------- */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.toggle-row.first { border-top: none; }
.t-label { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; font-weight: 600; }
.t-label img { width: 23px; height: 23px; flex: none; }

.switch { position: relative; display: inline-block; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  display: block; width: 58px; height: 34px; border-radius: 999px;
  background: #2a2a32; transition: background 0.2s ease; position: relative;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #ffffff; transition: transform 0.2s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(24px); }

.preview {
  background: var(--surface2); border-radius: 14px;
  padding: 14px 16px; margin: 0 16px 12px; line-height: 1.5;
}
.range {
  width: calc(100% - 32px); margin: 4px 16px 14px;
  -webkit-appearance: none; appearance: none; height: 8px; border-radius: 999px;
  background: var(--surface2); outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); border: 3px solid #000;
}
.range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 3px solid #000;
}
.select {
  width: calc(100% - 32px); margin: 4px 16px 16px;
  min-height: 54px; font-size: 1.05rem; font-weight: 600;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--line); border-radius: 16px; padding: 0 16px;
  outline: none;
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 22px;
  border-radius: 18px; font-size: 1.05rem; font-weight: 800;
  background: #ffffff; color: #000000;
}
.btn img { width: 24px; height: 24px; }
.btn.accent-btn { background: var(--accent); color: #fff; }
.btn.danger-btn { background: rgba(244, 33, 46, 0.12); color: var(--danger); }
.btn.wide { width: calc(100% - 32px); margin: 0 16px 16px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn:active { transform: scale(0.98); }
.load-more { margin: 10px auto; display: flex; }

/* ---------- Giriş sayfası ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 26px; padding: 28px 22px;
  text-align: center;
}
.login-logo { height: 64px; margin: 6px auto 14px; }
.login-title { font-size: 1.6rem; font-weight: 900; }
.login-title span { color: var(--accent); }
.login-sub { color: var(--muted); margin: 8px 0 20px; font-size: 0.98rem; }
.google-btn { width: 100%; }
.google-btn.disabled-hint { opacity: 0.45; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 10px 0; }
.login-error {
  display: block; text-align: left;
  background: rgba(244, 33, 46, 0.12); color: var(--danger);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-weight: 700;
}
.login-error img { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.login-error-detail {
  font-weight: 500; font-size: 0.82rem; margin-top: 6px;
  word-break: break-word; color: #ff8a92;
}
.login-error-help { font-weight: 500; font-size: 0.82rem; margin-top: 6px; color: var(--text); }
.accent-btn.login-alt { margin-top: 4px; width: 100%; }
.setup-box {
  margin-top: 20px; text-align: left;
  background: var(--surface2); border-radius: 16px; padding: 14px 16px;
  font-size: 0.85rem; color: var(--muted);
}
.setup-box b { color: var(--text); }
.setup-box ol { margin: 8px 0 8px 18px; }
.setup-box code {
  display: block; background: #0a0a0c; padding: 10px 12px; border-radius: 10px;
  color: #9fc7ff; font-size: 0.8rem; overflow-x: auto; margin: 6px 0;
}
.setup-box p { margin-top: 6px; }

/* ---------- Marka seçim penceresi ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-card {
  width: 100%; max-width: 560px; max-height: 88vh;
  background: #101014; border: 1px solid var(--line);
  border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column;
  padding: 18px 0 calc(14px + env(safe-area-inset-bottom));
}
@media (min-width: 640px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 26px; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 10px; }
.modal-head h2 { font-size: 1.2rem; font-weight: 800; }
.count { font-size: 1rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.search-row {
  display: flex; align-items: center; gap: 10px;
  margin: 0 18px 10px; padding: 0 14px;
  background: var(--surface2); border-radius: 14px;
}
.search-row img { width: 20px; height: 20px; }
.search-row input {
  flex: 1; min-height: 48px; background: none; border: none; outline: none;
  color: var(--text); font-size: 1rem;
}
.cat-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 10px;
  scrollbar-width: none;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { flex: none; }
.cat-row .chip.sel { color: #fff; background: var(--accent); }
.brand-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 4px 18px;
  min-height: 200px;
}
.brand-grid .b {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left;
  border: 1px solid #26262e; border-radius: 16px;
  padding: 12px 14px; background: var(--surface);
  min-height: 64px;
}
.brand-grid .b b { font-size: 0.98rem; }
.brand-grid .b small { font-size: 0.75rem; color: var(--muted); }
.brand-grid .b.sel { border-color: var(--accent); background: var(--accent-soft); }
.brand-grid .b.sel b { color: var(--accent); }
.modal-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px 0; }
.modal-foot .btn { flex: 1; }
.hint-s { font-size: 0.8rem; color: var(--muted); }

/* ---------- Toast / diğer ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #1c1c22; color: var(--text);
  border: 1px solid #2a2a32;
  padding: 13px 20px; border-radius: 16px;
  font-size: 0.95rem; font-weight: 700;
  opacity: 0; pointer-events: none; z-index: 120;
  transition: all 0.25s ease;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sentinel { display: flex; justify-content: center; padding: 12px; }
.spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #26262e; border-top-color: var(--accent);
  animation: rot 0.8s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

.hint-s.center { text-align: center; padding: 14px; width: 100%; }

@media (min-width: 720px) {
  .feed, .page { padding-left: 16px; padding-right: 16px; }
  .card-title { font-size: 1.25rem; }
}
