/* ================================================================
   VIDEO PLATFORM v4 — Production CSS
   Mobile-First | CSS3 | No Framework
   Author: Claude Sonnet 4.6
   ================================================================ */

/* ── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #08080f;
  color: #e8e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── DESIGN TOKENS ────────────────────────────────────────────── */
:root {
  --c-bg:        #08080f;
  --c-bg1:       #0d0d1a;
  --c-bg2:       #121220;
  --c-bg3:       #181828;
  --c-bg4:       #1e1e30;
  --c-border:    rgba(255,255,255,.07);
  --c-border2:   rgba(255,255,255,.12);
  --c-text:      #e8e8f0;
  --c-muted:     #8a8aaa;
  --c-dim:       #444464;
  --c-accent:    #7c3aed;
  --c-accent2:   #a855f7;
  --c-blue:      #3b82f6;
  --c-green:     #10b981;
  --c-red:       #ef4444;
  --c-vip:       #f59e0b;
  --c-vip2:      #fbbf24;
  --r:           12px;
  --r-sm:        8px;
  --r-lg:        18px;
  --shadow:      0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:   0 12px 48px rgba(0,0,0,.7);
  --t:           .18s ease;
  --glow:        0 0 32px rgba(124,58,237,.2);
  --navbar-h:    60px;
}

/* ── GRID PATTERN ─────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-accent); border-radius: 2px; }

/* ── TYPOGRAPHY ───────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }

/* ================================================================
   LAYOUT
   ================================================================ */

.wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* ── PAGE GRID ────────────────────────────────────────────────── */
.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 16px 0 48px;
}

/* ── SIDEBAR ──────────────────────────────────────────────────── */
.sidebar {
  display: none;
  flex-direction: column;
  gap: 20px;
}

/* ================================================================
   NAVBAR
   ================================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--navbar-h);
  background: rgba(8,8,15,.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--c-border);
}
.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar__brand {
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--c-accent2) 0%, var(--c-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -.02em;
}
.navbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* VIP badge */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #92400e, #78350f);
  border: 1px solid rgba(251,191,36,.35);
  color: var(--c-vip2);
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.vip-badge.sm { font-size: .68rem; padding: 3px 8px; }

/* Avatar */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent), var(--c-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(124,58,237,.4);
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navbar buttons */
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--t);
  white-space: nowrap;
  border: 1px solid var(--c-border2);
  color: var(--c-muted);
  background: var(--c-bg3);
}
.btn-nav:hover { background: var(--c-bg4); color: var(--c-text); }
.btn-nav.primary {
  background: linear-gradient(135deg, var(--c-accent), var(--c-blue));
  color: #fff;
  border-color: transparent;
}
.btn-nav.primary:hover { opacity: .88; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--t);
  margin-left: auto;
}
.hamburger:hover { background: var(--c-bg3); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-muted);
  border-radius: 2px;
  transition: all var(--t);
}

/* ── MOBILE NAV DRAWER ────────────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer__bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}
.mobile-drawer__panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--c-bg2);
  border-left: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 8px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-drawer.open .mobile-drawer__panel {
  transform: translateX(0);
}
.mobile-drawer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--c-bg4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 1rem;
  transition: all var(--t);
}
.mobile-drawer__close:hover { background: var(--c-red); color: #fff; }
.mobile-drawer__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 8px;
  margin-top: 16px;
}
.mobile-drawer__name { font-weight: 700; font-size: .9rem; }
.mobile-drawer__sub  { font-size: .75rem; color: var(--c-muted); }
.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--t);
}
.drawer-link:hover, .drawer-link.active {
  background: rgba(124,58,237,.12);
  color: var(--c-accent2);
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  transition: all var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-blue) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(124,58,237,.45); }
.btn-vip {
  background: linear-gradient(135deg, var(--c-vip) 0%, #f97316 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(245,158,11,.3);
}
.btn-vip:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost {
  background: var(--c-bg3);
  color: var(--c-muted);
  border: 1px solid var(--c-border2);
}
.btn-ghost:hover { background: var(--c-bg4); color: var(--c-text); }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.w-full { width: 100%; }
.btn:disabled, .btn-loading { opacity: .6; pointer-events: none; }

/* ================================================================
   AUTH WALL
   ================================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg), var(--glow);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo__icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.auth-logo h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.auth-logo p {
  font-size: .875rem;
  color: var(--c-muted);
}

/* Steps */
.auth-steps {
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 24px;
}
.auth-steps h3 {
  font-size: .875rem;
  color: var(--c-muted);
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.step-item:last-child { margin-bottom: 0; }
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(124,58,237,.2);
  border: 1px solid rgba(124,58,237,.4);
  color: var(--c-accent2);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-text { font-size: .83rem; color: var(--c-muted); line-height: 1.5; }
.step-text strong { color: var(--c-text); }

/* Telegram button */
.tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #229ed9, #1a7bbf);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  border-radius: 100px;
  transition: opacity var(--t);
  margin-bottom: 20px;
}
.tg-btn:hover { opacity: .88; }
.tg-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-divider {
  text-align: center;
  color: var(--c-dim);
  font-size: .78rem;
  margin-bottom: 20px;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--c-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-input {
  width: 100%;
  background: var(--c-bg3);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  color: var(--c-text);
  font-size: .95rem;
  transition: border-color var(--t);
  outline: none;
}
.form-input:focus { border-color: var(--c-accent); }
.form-input::placeholder { color: var(--c-dim); }
.code-input {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* ================================================================
   CATEGORY TABS
   ================================================================ */

.cat-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 14px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  -webkit-overflow-scrolling: touch;
}
.cat-strip::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  border-radius: 100px;
  color: var(--c-muted);
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t);
  flex-shrink: 0;
  cursor: pointer;
}
.cat-pill:hover { background: var(--c-bg4); color: var(--c-text); border-color: var(--c-border2); }
.cat-pill.active {
  background: linear-gradient(135deg, var(--c-accent), var(--c-blue));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(124,58,237,.35);
}

/* ── SORT TABS ────────────────────────────────────────────────── */
.sort-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.sort-tab {
  padding: 12px 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: all var(--t);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sort-tab:hover { color: var(--c-text); }
.sort-tab.active {
  color: var(--c-accent2);
  border-bottom-color: var(--c-accent2);
}

/* ── SECTION HEADER ───────────────────────────────────────────── */
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
}
.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 18px;
  background: linear-gradient(to bottom, var(--c-accent), var(--c-blue));
  border-radius: 2px;
}
.section-count { font-size: .8rem; color: var(--c-dim); }

/* ================================================================
   VIDEO GRID
   ================================================================ */

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.video-card {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  position: relative;
}
.video-card:active { transform: scale(.97); }

.video-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--c-bg3);
  overflow: hidden;
}
.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.video-card__thumb .no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--c-dim);
}

.badge-vip-card {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(146,64,14,.9);
  border: 1px solid rgba(251,191,36,.3);
  color: var(--c-vip2);
  font-size: .66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
  backdrop-filter: blur(4px);
}
.badge-new-card {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--c-green), #059669);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .72rem;
  color: #ccc;
}
.lock-overlay .lock-ic {
  width: 38px;
  height: 38px;
  background: rgba(251,191,36,.12);
  border: 2px solid rgba(251,191,36,.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t);
}
.play-overlay .ic {
  width: 46px;
  height: 46px;
  background: rgba(124,58,237,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform var(--t);
  backdrop-filter: blur(4px);
}

.video-card__info {
  padding: 9px 11px 11px;
}
.video-card__title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.video-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-tag {
  display: inline-block;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.22);
  color: var(--c-accent2);
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
}
.meta-stat { font-size: .72rem; color: var(--c-dim); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--c-muted);
}
.empty-state .ic { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3  { font-size: 1rem; margin-bottom: 6px; }
.empty-state p   { font-size: .875rem; }

/* ── PAGINATION ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 600;
  background: var(--c-bg3);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  transition: all var(--t);
  padding: 0 10px;
}
.page-btn:hover { background: var(--c-bg4); color: var(--c-text); }
.page-btn.active {
  background: var(--c-accent);
  color: #fff;
  border-color: transparent;
}

/* ================================================================
   SIDEBAR WIDGETS
   ================================================================ */

.widget {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
}
.widget__head {
  padding: 14px 16px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg3);
}
.widget__body { padding: 4px 0; }
.w-video-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  transition: background var(--t);
  border-bottom: 1px solid var(--c-border);
}
.w-video-item:last-child { border-bottom: none; }
.w-video-item:hover { background: var(--c-bg3); }
.w-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--c-bg4);
  color: var(--c-dim);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.w-rank.top { background: rgba(124,58,237,.2); color: var(--c-accent2); }
.w-thumb {
  width: 50px;
  height: 34px;
  border-radius: 6px;
  background: var(--c-bg4);
  overflow: hidden;
  flex-shrink: 0;
}
.w-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.w-meta { font-size: .7rem; color: var(--c-dim); margin-top: 3px; }

/* VIP Upsell */
.vip-upsell {
  background: linear-gradient(135deg, rgba(146,64,14,.25), rgba(120,53,15,.15));
  border: 1px solid rgba(251,191,36,.2);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
}
.vip-upsell h3 { font-size: .95rem; color: var(--c-vip2); margin-bottom: 8px; }
.vip-upsell p  { font-size: .82rem; color: var(--c-muted); margin-bottom: 14px; }

/* ================================================================
   VIDEO PAGE
   ================================================================ */

/* Embed wrapper — responsive 16:9 */
.embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
  border-radius: var(--r);
}
.embed-wrap > * {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}
.embed-wrap iframe,
.embed-wrap video,
.embed-wrap embed,
.embed-wrap object {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

/* Video locked */
.vip-locked {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--c-bg3);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}

/* Video info */
.video-info { padding: 16px 0 0; }
.video-title {
  font-size: clamp(.95rem, 3vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-text);
  margin-bottom: 12px;
}
.video-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--c-dim);
}

/* ACTION BAR */
.action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 16px;
}
.action-bar::-webkit-scrollbar { display: none; }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--c-bg3);
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: all var(--t);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.action-btn:hover { background: var(--c-bg4); color: var(--c-text); border-color: var(--c-border2); }
.action-btn.liked {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.35);
  color: var(--c-red);
}
.action-btn .n { font-weight: 700; color: var(--c-text); }
.action-btn.liked .n { color: var(--c-red); }

/* Share — Portal dropdown */
.share-wrap {
  position: relative;
  flex-shrink: 0;
}
.share-dropdown {
  position: fixed;
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  border-radius: var(--r);
  padding: 6px;
  min-width: 190px;
  box-shadow: var(--shadow-lg);
  z-index: 800;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.share-dropdown.open { display: flex; }
.share-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  color: var(--c-muted);
  transition: all var(--t);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-weight: 500;
  text-align: left;
  width: 100%;
}
.share-opt:hover { background: var(--c-bg4); color: var(--c-text); }

/* Video description */
.video-desc {
  padding: 14px 16px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-muted);
  font-size: .875rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.video-desc.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc-toggle {
  font-size: .8rem;
  color: var(--c-accent2);
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
}

/* ================================================================
   COMMENTS
   ================================================================ */

.comments-box {
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 20px;
}
.comments-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--c-border);
  gap: 10px;
}
.comments-hd h3 {
  font-size: .95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  background: rgba(124,58,237,.2);
  color: var(--c-accent2);
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  padding: 0 7px;
}

/* Comment form */
.comment-form {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  align-items: flex-start;
}
.c-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent), var(--c-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.c-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.c-form-body { flex: 1; min-width: 0; }
.c-textarea {
  width: 100%;
  background: var(--c-bg3);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--c-text);
  font-size: .875rem;
  font-family: inherit;
  resize: none;
  min-height: 40px;
  max-height: 150px;
  outline: none;
  transition: border-color var(--t), min-height .2s ease;
  line-height: 1.5;
  overflow-y: hidden;
}
.c-textarea:focus {
  border-color: rgba(124,58,237,.5);
  min-height: 80px;
}
.c-textarea::placeholder { color: var(--c-dim); }
.c-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.c-form-actions.hidden { display: none; }
.c-cancel {
  padding: 7px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-muted);
  background: none;
  border: 1px solid var(--c-border2);
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}
.c-cancel:hover { background: var(--c-bg4); color: var(--c-text); }
.c-submit {
  padding: 7px 18px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--c-accent), var(--c-blue));
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--t);
}
.c-submit:hover { opacity: .85; }
.c-submit:disabled { opacity: .5; pointer-events: none; }

/* Comment list */
.comment-list { padding: 4px 0; }
.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--t);
}
.comment-item:last-child { border-bottom: none; }
.comment-item:hover { background: rgba(255,255,255,.02); }
.comment-body { flex: 1; min-width: 0; }
.comment-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.comment-author { font-size: .83rem; font-weight: 700; }
.comment-time { font-size: .72rem; color: var(--c-dim); }
.comment-text {
  font-size: .875rem;
  color: var(--c-muted);
  line-height: 1.55;
  word-break: break-word;
}
.c-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: var(--c-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  background: none;
  border: none;
  font-family: inherit;
  transition: all var(--t);
  margin-top: 6px;
}
.c-like-btn:hover { color: var(--c-red); background: rgba(239,68,68,.07); }

/* Comments empty/loading */
.c-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-dim);
  font-size: .875rem;
}
.c-loading {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--c-muted);
  font-size: .85rem;
}
.c-load-more {
  width: 100%;
  padding: 14px;
  background: none;
  border: none;
  border-top: 1px solid var(--c-border);
  color: var(--c-accent2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t);
}
.c-load-more:hover { background: rgba(124,58,237,.06); }

/* ================================================================
   MODAL
   ================================================================ */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-bg.open { display: flex; }
.modal-box {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--c-bg2);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--c-border);
  border-bottom: none;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.modal-bg.open .modal-box { transform: translateY(0); }
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  background: var(--c-bg2);
  z-index: 1;
}
.modal-hd h3 { font-size: 1rem; font-weight: 700; }
.modal-close-btn {
  width: 30px;
  height: 30px;
  background: var(--c-bg4);
  border: none;
  border-radius: 50%;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--t);
}
.modal-close-btn:hover { background: var(--c-red); color: #fff; }
.modal-bd { padding: 20px; }

/* Package grid */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.pkg-card {
  background: var(--c-bg3);
  border: 2px solid var(--c-border);
  border-radius: var(--r);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}
.pkg-card:hover { border-color: var(--c-accent); }
.pkg-card.selected {
  border-color: var(--c-vip);
  background: rgba(245,158,11,.08);
  box-shadow: 0 0 0 1px rgba(245,158,11,.3);
}
.pkg-days  { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.pkg-price { font-size: .85rem; font-weight: 700; color: var(--c-vip2); margin-bottom: 2px; }
.pkg-name  { font-size: .7rem; color: var(--c-dim); }

/* ================================================================
   TOAST
   ================================================================ */

.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--c-bg3);
  border: 1px solid var(--c-border2);
  border-radius: var(--r);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hide { opacity: 0; transform: translateY(-8px); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-title { font-size: .875rem; font-weight: 700; margin-bottom: 2px; }
.toast-msg { font-size: .8rem; color: var(--c-muted); }
.toast--success { border-left: 3px solid var(--c-green); }
.toast--error   { border-left: 3px solid var(--c-red); }
.toast--warning { border-left: 3px solid var(--c-vip); }
.toast--info    { border-left: 3px solid var(--c-blue); }

/* ================================================================
   SPINNER
   ================================================================ */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--c-accent2);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid var(--c-border);
  color: var(--c-dim);
  font-size: .78rem;
  position: relative;
  z-index: 1;
}

/* ================================================================
   AD SLOTS
   ================================================================ */

.ad-slot { margin: 12px 0; }

/* ================================================================
   UTILITIES
   ================================================================ */

.hidden { display: none !important; }
.divider { height: 1px; background: var(--c-border); margin: 20px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ================================================================
   RESPONSIVE — TABLET (640px+)
   ================================================================ */

@media (min-width: 640px) {
  :root { --navbar-h: 64px; }
  .wrap { padding: 0 24px; }
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .video-card__title { font-size: .875rem; }
  .auth-card { padding: 40px 36px; }
  .modal-bg { align-items: center; padding: 20px; }
  .modal-box { border-radius: 20px; border-bottom: 1px solid var(--c-border); max-height: 85vh; }
}

/* ================================================================
   RESPONSIVE — DESKTOP (1024px+)
   ================================================================ */

@media (min-width: 1024px) {
  .wrap { padding: 0 32px; }

  .page-grid {
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding: 24px 0 56px;
  }

  .sidebar {
    display: flex;
  }

  .hamburger { display: none; }

  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }

  /* Hover effects — desktop only */
  .video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,.35);
    box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(124,58,237,.15);
  }
  .video-card:hover .video-card__thumb img { transform: scale(1.04); }
  .video-card:hover .play-overlay { opacity: 1; }
  .video-card:hover .play-overlay .ic { transform: scale(1.1); }
  .video-card:active { transform: translateY(-2px); }
}

@media (min-width: 1280px) {
  .wrap { max-width: 1400px; padding: 0 40px; }
  .video-grid { grid-template-columns: repeat(4, 1fr); }
  .page-grid { grid-template-columns: 1fr 320px; }
}


/* ================================================================
   BACKWARD-COMPAT — Eski CSS değişkenleri için alias
   ================================================================ */
:root {
  --bg:          var(--c-bg);
  --bg2:         var(--c-bg1);
  --bg3:         var(--c-bg2);
  --bg4:         var(--c-bg3);
  --border:      var(--c-border);
  --border2:     var(--c-border2);
  --text:        var(--c-text);
  --text-muted:  var(--c-muted);
  --text-dim:    var(--c-dim);
  --accent:      var(--c-accent);
  --accent2:     var(--c-accent2);
  --accent3:     #c084fc;
  --success:     var(--c-green);
  --danger:      var(--c-red);
  --warning:     #f59e0b;
  --vip:         var(--c-vip);
  --vip2:        var(--c-vip2);
  --radius:      var(--r);
  --radius-sm:   var(--r-sm);
  --radius-lg:   var(--r-lg);
}

/* ================================================================
   MISSING UTILITY CLASSES
   ================================================================ */

/* Old form-control → form-input alias */
.form-control {
  width: 100%;
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--c-text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t);
}
.form-control:focus { border-color: var(--c-accent); }
.form-control::placeholder { color: var(--c-dim); }

/* Container alias */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }


/* ================================================================
   MOBILE OVERRIDES — Extra polish for < 480px
   ================================================================ */
@media (max-width: 480px) {
  /* Tighter wrap padding */
  .wrap { padding: 0 12px; }

  /* Video grid: 2 col, tighter gap */
  .video-grid { gap: 10px; }

  /* Card info tighter */
  .video-card__info { padding: 8px 10px 10px; }
  .video-card__title { font-size: .78rem; }
  .cat-tag { font-size: .62rem; padding: 1px 6px; }
  .meta-stat { font-size: .68rem; }

  /* Cat strip - smaller pills */
  .cat-pill { font-size: .76rem; padding: 6px 12px; }

  /* Sort tabs - tighter */
  .sort-tab { padding: 10px 14px; font-size: .82rem; }

  /* Section count */
  .section-count { font-size: .75rem; }

  /* Section header margin */
  .section-hd { margin-bottom: 12px; }

  /* Navbar tighter */
  .navbar__brand { font-size: .95rem; }
  .btn-nav { padding: 6px 10px; font-size: .76rem; }
  .vip-badge.sm { display: none; }

  /* Modal full width */
  .modal-box { max-width: 100%; border-radius: 20px 20px 0 0; }
  .pkg-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .pkg-days { font-size: .95rem; }
  .pkg-price { font-size: .78rem; }
  .pkg-name { font-size: .6rem; }
  .pkg-card { padding: 10px 8px; }

  /* Auth card */
  .auth-card { padding: 28px 20px; }
  .code-input { font-size: 1.2rem; letter-spacing: .1em; }

  /* Toast at bottom with safe area */
  .toast-wrap {
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    width: calc(100% - 24px);
  }
}

/* ================================================================
   VERY SMALL — 360px and below
   ================================================================ */
@media (max-width: 360px) {
  .wrap { padding: 0 10px; }
  .video-grid { gap: 8px; }
  .video-card__title { font-size: .74rem; }
  .navbar__brand { font-size: .88rem; }
  .cat-pill { padding: 5px 10px; font-size: .72rem; }
}

/* ================================================================
   VIP PAGE MOBILE
   ================================================================ */
@media (max-width: 600px) {
  /* Feature cards single column on phones */
  .vip-features-grid {
    grid-template-columns: 1fr !important;
  }
}

