:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121b;
  --bg-card: #171722;
  --bg-card-hover: #1e1e2c;
  --border: #26263a;
  --border-soft: #1c1c2a;
  --text: #f4f4f7;
  --text-muted: #9d9db2;
  --accent: #ff3d5c;      /* czerwień w stronę żaru/metinu, nie kopiuje YouTube red 1:1 */
  --accent-2: #ff8a3d;    /* pomarańcz - razem z --accent daje "ognisty" gradient */
  --discord: #5865f2;
  --discord-2: #7289da;
  --success: #2fd07c;
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1240px;
  --shadow-card: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lift: 0 14px 34px rgba(255,61,92,0.22);
  --font-display: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255,61,92,0.10), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(88,101,242,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

::selection { background: rgba(255,61,92,0.35); color: #fff; }

/* Widoczna obwódka tylko przy nawigacji klawiaturą (Tab), nie przy kliku
   myszką/dotykiem - :focus-visible daje to za darmo bez JS. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(255,61,92,0.35);
}
.logo-dot { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }

.main-nav {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}
.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--text); text-decoration: none; background: var(--bg-card); }

/* Grupuje podstrony "poznaj Metin2 SP" w jedno rozwijane menu w nawigacji,
   żeby 7 pozycji nie zawijało się do kilku linii przy max-width: var(--max-width). */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  font-family: inherit;
  padding: 8px 12px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-dropdown-toggle:hover { color: var(--text); background: var(--bg-card); }
.nav-dropdown-chevron { width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-dropdown.is-open .nav-dropdown-toggle { color: var(--text); background: var(--bg-card); }
.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 110;
}
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { color: var(--text); background: var(--bg-card-hover); text-decoration: none; }

.header-ctas {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

/* Najbardziej wyeksponowany element strony - stały, kolorowy przycisk Discord
   widoczny w nagłówku na każdej podstronie. */
.discord-btn {
  background: linear-gradient(135deg, var(--discord), var(--discord-2));
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(88,101,242,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.discord-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(88,101,242,0.5);
}

.download-btn {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.download-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(650px 380px at 85% 10%, rgba(255,61,92,0.16), transparent 60%),
    radial-gradient(500px 320px at 5% 90%, rgba(88,101,242,0.14), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 76px 20px 60px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  background: rgba(255,61,92,0.1);
  border: 1px solid rgba(255,61,92,0.25);
  padding: 6px 14px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  margin: 0 0 18px;
  max-width: 820px;
  line-height: 1.15;
}
.hero-lead {
  color: var(--text-muted);
  max-width: 700px;
  font-size: 1.08rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.hero-stat span { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-discord { background: linear-gradient(135deg, var(--discord), var(--discord-2)); color: #fff; box-shadow: 0 4px 16px rgba(88,101,242,0.3); }
.btn-discord:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(88,101,242,0.45); }
.btn-download { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 4px 16px rgba(255,61,92,0.3); }
.btn-download:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,61,92,0.45); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { text-decoration: none; background: var(--bg-card-hover); transform: translateY(-1px); }
.btn-danger { background: #3a1414; color: #ff8080; border: 1px solid #5c1f1f; }
.btn-danger:hover { background: #4a1818; }
.btn-like { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 8px; }
.btn-like:hover { border-color: var(--accent); }
.btn-like.is-liked { background: #123a26; color: #7fe08a; border-color: #235c3d; }
.btn-like:disabled { cursor: default; }
.btn:active { transform: translateY(0) scale(0.98); }

/* ---------- Sections / grid ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-header h1, .section-header h2 { margin: 0; font-size: 1.5rem; }
.section-link { color: var(--text-muted); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.section-link:hover { color: var(--accent-2); }
.section-about-teaser {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
}
.section-about-teaser h2 { margin-top: 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.video-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(255,61,92,0.35);
}
.thumb-wrap { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.video-card:hover .thumb-wrap img { transform: scale(1.06); }
.thumb-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #232336, #14141d); }
.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0,0,0,0.25);
}
.video-card:hover .thumb-play { opacity: 1; }
.thumb-play span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255,61,92,0.5);
}
.badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.badge-youtube { background: linear-gradient(135deg, #ff0000, #c40000); }
.video-card-body { padding: 14px 16px 16px; }
.video-card-body h3 { font-size: 0.98rem; margin: 0 0 8px; line-height: 1.4; font-family: var(--font-body); font-weight: 700; }
.video-meta { color: var(--text-muted); font-size: 0.82rem; margin: 0; }

.muted { color: var(--text-muted); }
.small { font-size: 0.8rem; }

.pagination { display: flex; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pagination a { padding: 8px 14px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); font-weight: 600; }
.pagination a:hover { text-decoration: none; border-color: var(--accent); }
.pagination a.page-active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

.feed-more { margin-top: 28px; text-align: center; }
.feed-note { margin-top: -10px; margin-bottom: 28px; }

/* ---------- Download / features strip ---------- */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature-card .feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,61,92,0.18), rgba(255,138,61,0.18));
  margin-bottom: 14px;
  font-size: 1.2rem;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Watch page ---------- */
.watch-section { max-width: 960px; }
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.player-wrap video { width: 100%; max-height: 70vh; display: block; }
.watch-header { margin-top: 20px; }
.watch-header h1 { margin: 0 0 8px; font-size: 1.6rem; }
.watch-actions { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.watch-description {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  white-space: pre-wrap;
}

/* ---------- Comments ---------- */
.comments { margin-top: 44px; }
.comments h2 { font-size: 1.2rem; }
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
  margin-bottom: 28px;
}
.comment-form input, .comment-form textarea,
.upload-form input, .upload-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.comment-form input:focus, .comment-form textarea:focus,
.upload-form input:focus, .upload-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.comment-date { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- Prose pages (about/guide/error) ---------- */
.prose { max-width: 800px; }
.prose h1 { font-size: 2rem; }
.prose h2 { margin-top: 36px; font-size: 1.35rem; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.cta-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.guide-cta {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin: 28px 0;
}
.guide-cta p { margin-top: 12px; }

/* ---------- Admin ---------- */
.upload-form { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.upload-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert-error { background: #3a1414; color: #ff9d9d; border: 1px solid #5c1f1f; }
.alert-success { background: #123a1f; color: #8ee0a8; border: 1px solid #235c37; }
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; min-width: 560px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.admin-table th { color: var(--text-muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.status-badge { padding: 3px 9px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; }
.status-ready { background: #123a1f; color: #8ee0a8; }
.status-processing { background: #3a3512; color: #e0d18e; }
.status-error { background: #3a1414; color: #ff9d9d; }
.admin-actions { display: flex; gap: 8px; align-items: center; }
.edit-thumb-preview {
  max-width: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.diag-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
}
.diag-box h2 { margin: 0 0 4px; font-size: 1.05rem; }
.diag-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.diag-list li { display: flex; gap: 10px; align-items: baseline; }
.diag-ok { color: var(--success); }
.diag-fail { color: #ff8080; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  margin-top: 56px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 18px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand strong { font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand p { color: var(--text-muted); max-width: 340px; font-size: 0.9rem; margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-heading { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.footer-discord { color: #9aa4ff; font-weight: 700; }
.footer-download { color: var(--accent-2); font-weight: 700; }
.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 14px 20px 30px;
  margin: 0;
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
}

/* Zawiera przewijanie tabeli w jej własnym boksie na wąskich ekranach,
   zamiast pozwalać jej rozepchnąć całą stronę w poziomie (znaleziony
   realny bug na 320px - patrz mapy-i-krolestwa.php). */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 20px 0; }
.table-scroll .admin-table { margin: 0; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .crumb-sep { opacity: 0.5; }
.breadcrumbs .crumb-current { color: var(--text); }

/* ---------- Przycisk "do góry" i mobilny pasek CTA ---------- */
/* Oba pokazują się dopiero po przewinięciu strony (main.js), żeby na
   starcie nie dublować przycisku pobierania, który już jest w hero. */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  z-index: 90;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, bottom 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { border-color: var(--accent); }
.back-to-top svg { width: 20px; height: 20px; }

.mobile-sticky-cta { display: none; }
.mobile-sticky-cta-link {
  flex: 1;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mobile-sticky-cta-link:hover { text-decoration: none; }
.mobile-sticky-cta-close {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---------- Upload w panelu admina (pasek postępu, checkbox) ---------- */
.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
  font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] { width: auto; }

.upload-progress-wrap { margin: 8px 0; }
.upload-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--discord), var(--accent));
  transition: width 0.2s ease;
}

.logout-form { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  .main-nav {
    order: 4;
    flex: 1 1 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 420px; margin-top: 10px; overflow-y: auto; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 14px; border-radius: 10px; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: none;
    padding: 0 0 4px 10px;
    display: none;
  }
  .nav-dropdown.is-open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { padding: 10px 14px; }
  .header-ctas { margin-left: auto; }
  .download-btn span.btn-label-full { display: none; }

  .mobile-sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    align-items: center;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid var(--border-soft);
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }
  body.has-mobile-cta .mobile-sticky-cta { transform: translateY(0); }
  body.has-mobile-cta { padding-bottom: 74px; }
  body.has-mobile-cta .back-to-top { bottom: 86px; }
}

@media (max-width: 640px) {
  .hero-inner { padding: 52px 18px 44px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-stats { gap: 20px; }
  .feature-strip { grid-template-columns: 1fr; }
  .section { padding: 36px 16px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .header-ctas .btn-label-full { display: none; }
}

@media (max-width: 400px) {
  .logo-text { display: none; }
}
