:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-2: #10141c;
  --card: #141820;
  --card-2: #1a1f2a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f4f8;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --accent-2: #7aabff;
  --ok: #3ecf8e;
  --err: #ff6b7a;
  --warn: #ffc857;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(79, 140, 255, 0.14), transparent 58%),
    radial-gradient(700px 380px at 100% 20%, rgba(62, 207, 142, 0.05), transparent 50%),
    linear-gradient(180deg, #0b0e15 0%, var(--bg) 45%, #07090d 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .brand-name, .dash-head h1, .page-head h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  padding-top: max(16px, var(--safe-top));
  padding-left: max(28px, calc(16px + var(--safe-left)));
  padding-right: max(28px, calc(16px + var(--safe-right)));
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.08rem;
}
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.12rem; }
.brand-logo-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: #10131a;
  flex-shrink: 0;
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: logoMirror 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes logoMirror {
  0%, 55% { transform: translateX(-130%); }
  75% { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}
.logo-preview {
  max-height: 72px;
  border-radius: 12px;
  background: #10131a;
  padding: 6px;
}
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #10131a;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.platforms span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.platforms img { width: 18px; height: 18px; }
.platforms-slim {
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  opacity: 0.85;
}
.platforms-slim img {
  width: 22px;
  height: 22px;
  padding: 0;
  filter: grayscale(0.15);
}
.credit {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0;
  margin: 4px 0 0;
}
.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav a, .nav span {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 1rem;
}
.nav a.active, .nav a:hover {
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.page-frame {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  flex: 1;
  align-items: start;
}
.page-frame.has-ads {
  grid-template-columns: 160px minmax(0, 820px) 160px;
}
.page-frame-wide {
  grid-template-columns: minmax(0, 1180px);
}
.page-frame-wide.has-ads {
  grid-template-columns: 140px minmax(0, 1100px) 140px;
}
.rail {
  position: sticky;
  top: 84px;
  min-height: 120px;
}
.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: 1.7rem; }
.lead { color: var(--muted); margin: 0; }

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  height: fit-content;
}
.side a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
}
.side a.active, .side a:hover {
  background: var(--card-2);
  color: var(--text);
  text-decoration: none;
}

.card {
  background: rgba(20, 24, 32, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 16px; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; }
.stat b { display: block; font-size: 1.4rem; margin-top: 4px; }
.stat span { color: var(--muted); font-size: 0.82rem; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
input, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #10131a;
  color: var(--text);
  font-size: 1rem;
}
.check { display: flex; align-items: center; gap: 10px; color: var(--text); }
.check input { width: auto; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
button, .btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}
.primary {
  background: var(--accent);
  color: #061018;
}
.ghost {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.danger { background: #3a1f27; color: var(--err); }
button:hover, .btn:hover { filter: brightness(1.06); text-decoration: none; }
button:disabled, .primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #232837;
  color: var(--muted);
}
.ok { color: var(--ok); }
.err { color: var(--err); }
.warn { color: var(--warn); }

.flash { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #232837; }
.flash.err { background: #3a1f27; color: var(--err); }
.flash.ok { background: #16352b; color: var(--ok); }

.status { margin-top: 10px; min-height: 0; color: var(--muted); font-size: 0.9rem; }
.meta { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.preview-box { margin-top: 14px; }
.copy-box { margin-top: 12px; }
.copy-box textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  margin-bottom: 8px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.narrow { max-width: 460px; margin: 40px auto; }

.hero {
  text-align: center;
  margin: 8px auto 28px;
  max-width: 720px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  margin: 12px 0 10px;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.hero .lead {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}
.badge.glow {
  background: rgba(62, 207, 142, 0.14);
  color: var(--ok);
  border: 1px solid rgba(62, 207, 142, 0.28);
}
.downloader { margin: 0 auto; }
.downloader-card {
  padding: 18px;
  border-radius: 18px;
}
.url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.url-row input { padding: 13px 14px; font-size: 1rem; }
.url-row button { white-space: nowrap; }
.download-action {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}
.download-action .primary {
  min-width: 140px;
  justify-content: center;
  padding: 12px 22px;
}
.quality-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #10131a;
}
.quality-table {
  width: 100%;
  margin: 0;
  font-size: 0.88rem;
}
.quality-table th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.quality-table td, .quality-table th {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.quality-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.quality-table tbody tr:hover { background: rgba(91, 140, 255, 0.06); }
.quality-table tbody tr.selected {
  background: rgba(91, 140, 255, 0.12);
}
.quality-table tbody tr:last-child td { border-bottom: 0; }
.quality-table input[type="radio"] { width: auto; margin: 0; accent-color: var(--accent); }
.q-tag-hi {
  color: #061018;
  background: linear-gradient(135deg, #7aabff, #3ecf8e);
  font-weight: 700;
}
.q-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #232837;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
}
.format-tabs { display: flex; gap: 8px; margin: 16px 0 10px; }
.chip, .pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
}
.chip.active, .pill.active {
  background: rgba(79, 140, 255, 0.18);
  color: #dbe7ff;
  border-color: rgba(79, 140, 255, 0.45);
}
.format-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.quota-line { color: var(--muted); font-size: 0.85rem; margin: 0; }
.preview-stage {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.preview-media {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0c11;
  border: 1px solid var(--line);
}
.preview-media video,
.preview-media img {
  display: block;
  width: 100%;
  max-height: min(52vh, 420px);
  object-fit: contain;
  background: #0a0c11;
}
.preview-media video[hidden],
.preview-media img[hidden] {
  display: none !important;
}
.preview-meta {
  margin: 8px 0 0;
  font-size: 0.84rem;
}
.panel-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  gap: 8px;
}
.feature-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.feature-strip b {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}
.feature-grid {
  display: none;
}
.site-foot {
  display: none;
}
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 12, 18, 0.92);
  padding: 28px 18px 36px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #10131a;
  padding: 4px;
}
.footer-brand strong {
  display: block;
  font-size: 1.15rem;
}
.footer-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-social a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 0.92rem;
}
.footer-social a:hover { text-decoration: none; border-color: var(--accent); }
.credit {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0;
  margin: 4px 0 0;
}
.foot-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(16, 19, 26, 0.55);
}
.foot-plats {
  display: flex;
  align-items: center;
  gap: 12px;
}
.foot-plat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 36px;
}
.foot-plat img {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}
.foot-plat em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.foot-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.foot-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.foot-metric b {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-banner {
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 8px 16px;
  min-height: 72px;
}
.ad-horizontal {
  max-width: 1100px;
  margin: 8px auto 0;
  padding: 8px 16px;
  min-height: 90px;
}
.ad-vertical {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  min-height: 280px;
  padding: 8px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(16, 19, 26, 0.35);
}
.ad-slot img, .ad-slot iframe {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.feature-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.feature-check {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #10131a;
  font-size: 0.92rem;
}
.feature-check.on b { color: var(--ok); }
.feature-check.off b { color: var(--muted); }
.live-corner {
  position: fixed;
  z-index: 40;
  bottom: 24px;
  pointer-events: none;
  max-width: min(300px, calc(100vw - 28px));
}
.live-corner-left { left: 16px; }
.live-corner-right { right: 16px; }
.live-toast {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 14, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.live-toast.pulse-in { animation: toastSoft 0.5s ease; }
@keyframes toastSoft {
  from { opacity: 0.4; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.live-toast-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-toast-icon {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}
.live-toast-nick {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.14);
  color: #b6c7ff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.live-toast-nick.member {
  background: rgba(62, 207, 142, 0.14);
  color: #8ee0b8;
}
.live-toast-msg {
  color: #9aa3b5;
  font-size: 0.75rem;
  line-height: 1.35;
  padding-left: 2px;
}
.live-online {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  border-radius: 16px;
  background: rgba(12, 14, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  margin-left: auto;
  width: fit-content;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.live-online-label {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live-online b {
  display: block;
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.live-online small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}
.live-dot.soft {
  box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.3);
  animation: livePulse 2.6s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.3); }
  70% { box-shadow: 0 0 0 7px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
.format-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.quality-row { margin-top: 12px; }
.extra-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}
.progress-wrap { margin-top: 14px; }
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #232837;
  overflow: hidden;
}
.progress-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #3ecf8e);
  border-radius: inherit;
  transition: width 0.25s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.tiny-btn { padding: 4px 10px; font-size: 0.78rem; }
.tiny { font-size: 0.78rem; }
.dash {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}
.dash-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 12px;
  height: fit-content;
}
.dash-side a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
}
.dash-side a.active, .dash-side a:hover {
  background: var(--card-2);
  color: var(--text);
  text-decoration: none;
}
.dash-kicker {
  margin: 0 12px 10px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.dash-head h1 { margin: 4px 0 6px; }
.dash-main { min-width: 0; }
.pill-mini {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #232837;
  font-size: 0.78rem;
}
@media (max-width: 980px) {
  .page-frame,
  .page-frame-wide,
  .page-frame.has-ads,
  .page-frame-wide.has-ads {
    grid-template-columns: 1fr;
    padding: 12px max(12px, var(--safe-left)) 24px max(12px, var(--safe-right));
    padding-bottom: max(24px, calc(16px + var(--safe-bottom)));
  }
  .rail { display: none; }
  .home-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .url-row { grid-template-columns: 1fr; }
  .url-row button,
  .download-action .primary,
  .ghost,
  .primary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .dash { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .foot-metric { border-left: none; padding-left: 0; }
  .topbar {
    padding: 10px max(12px, var(--safe-left)) 10px max(12px, var(--safe-right));
    padding-top: max(10px, var(--safe-top));
    gap: 10px;
    flex-wrap: nowrap;
  }
  .brand-name { font-size: 1.05rem; }
  .nav {
    flex: 1;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav span {
    padding: 10px 12px;
    font-size: 0.92rem;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .home-head { margin: 4px auto 16px; }
  .home-head h1 { font-size: clamp(1.45rem, 6vw, 1.85rem); }
  .home-head .lead { font-size: 0.98rem; max-width: none; }
  .platforms { gap: 8px; }
  .platforms span { padding: 8px 10px; font-size: 0.8rem; }
  .downloader-card { padding: 16px; }
  .downloader-card .url-row input {
    min-height: 48px;
    font-size: 16px; /* iOS zoom engeli */
  }
  input, select, textarea, button, .btn {
    font-size: 16px;
  }
  .format-pills { gap: 8px; }
  .pill, .chip {
    min-height: 44px;
    padding: 10px 14px;
  }
  .quality-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
  }
  .quality-table { min-width: 420px; }
  .quality-table tbody tr { min-height: 48px; }
  .quality-table td { padding: 12px 8px; }
  .live-corner {
    position: fixed;
    z-index: 45;
    max-width: none;
    pointer-events: none;
  }
  .live-corner-left,
  .live-corner-right {
    left: auto;
    right: auto;
    bottom: max(10px, calc(8px + var(--safe-bottom)));
  }
  /* Sol + sağ aynı alt şeritte, içerikle çakışmasın */
  .live-corner-left {
    left: max(8px, var(--safe-left));
    right: calc(50% + 4px);
    width: auto;
    max-width: none;
  }
  .live-corner-right {
    right: max(8px, var(--safe-right));
    left: calc(50% + 4px);
    width: auto;
    display: flex;
    justify-content: flex-end;
  }
  .live-toast {
    padding: 8px 10px;
    border-radius: 12px;
    gap: 2px;
    max-width: 100%;
  }
  .live-toast-nick {
    font-size: 0.65rem;
    padding: 2px 7px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .live-toast-msg {
    font-size: 0.68rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .live-online {
    gap: 8px;
    padding: 7px 10px 7px 8px;
    border-radius: 14px;
    margin-left: 0;
    max-width: 100%;
  }
  .live-online-label { font-size: 0.58rem; }
  .live-online b { font-size: 0.98rem; }
  .live-online small {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.5rem;
  }
  /* Alt sabit şerit için sayfa boşluğu */
  .site-footer {
    padding-bottom: max(72px, calc(56px + var(--safe-bottom)));
  }
  .page-frame,
  .page-frame-wide,
  .page-frame.has-ads,
  .page-frame-wide.has-ads {
    padding-bottom: max(28px, calc(20px + var(--safe-bottom)));
  }
  .footer-brand { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
  .site-footer {
    padding-left: max(14px, var(--safe-left));
    padding-right: max(14px, var(--safe-right));
  }
  .ad-banner, .ad-horizontal { display: none; }
}

@media (max-width: 480px) {
  .home-stats { grid-template-columns: 1fr 1fr; }
  .home-stats .stat { padding: 12px; }
  .home-stats .stat b { font-size: 1.05rem; }
  .platforms span { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .foot-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
  .foot-plats {
    grid-column: 1 / -1;
    justify-content: space-around;
    width: 100%;
  }
  .foot-metric {
    text-align: center;
    padding: 8px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
  }
  /* Çok dar ekranda: kompakt online (sadece nokta + sayı) */
  .live-corner-left {
    left: max(8px, var(--safe-left));
    right: auto;
    width: min(58vw, 200px);
  }
  .live-corner-right {
    left: auto;
    right: max(8px, var(--safe-right));
    width: auto;
  }
  .live-online small { display: none; }
  .live-online {
    padding: 8px 10px;
    min-height: 40px;
  }
  .live-toast-msg {
    -webkit-line-clamp: 2;
    font-size: 0.65rem;
  }
}

/* —— Clean home —— */
.home-head {
  text-align: center;
  margin: 8px auto 22px;
  max-width: 640px;
}
.home-head h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.home-head .lead {
  font-size: 1.05rem;
  margin: 0 auto;
  max-width: 46ch;
  color: var(--muted);
}
.home-head .platforms {
  justify-content: center;
  margin-top: 16px;
}
.downloader-card {
  padding: 20px;
}
.downloader-card .url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.downloader-card .url-row input {
  padding: 14px 16px;
  font-size: 1.05rem;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.home-stats .stat b {
  font-size: 1.15rem;
}

.panel-label {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
