/* ============================================
   LEAKED ARCHIVES — COMPLETE STYLESHEET
   ============================================ */

/* ---- CSS VARIABLES ---- */
:root {
  --bg: #0f0f0f;
  --bg2: #181818;
  --bg3: #222222;
  --bg4: #2e2e2e;
  --red: #e63946;
  --red-dark: #b02030;
  --white: #f1f1f1;
  --muted: #aaaaaa;
  --border: #333333;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --sidebar-w: 220px;
  --nav-h: 60px;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
input, textarea, select {
  font-family: var(--font-body);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  font-size: 16px;
  outline: none;
  transition: border var(--transition);
  -webkit-appearance: none;
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); }
select option { background: var(--bg3); }
.hidden { display: none !important; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  z-index: 1000;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hamburger {
  color: var(--white);
  font-size: 22px;
  padding: 8px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background var(--transition);
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger:active { background: var(--bg3); }
.logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.logo-red { color: var(--red); }
.logo-white { color: var(--white); }

/* Search */
.search-bar {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  padding: 0 6px 0 12px;
}
.search-bar input {
  background: none;
  border: none;
  padding: 8px 4px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  border-radius: 0;
  width: 100%;
}
.search-bar button {
  background: var(--red);
  color: white;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.search-bar button:active { background: var(--red-dark); }

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-login {
  background: var(--red);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-login:active { background: var(--red-dark); }

/* User Avatar + Dropdown */
.user-menu { position: relative; cursor: pointer; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--red);
  object-fit: cover;
}
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px 0;
  display: none;
  box-shadow: var(--shadow);
  z-index: 1100;
}
.user-menu:hover .dropdown,
.user-menu:focus-within .dropdown { display: block; }
.dropdown span {
  display: block;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--red);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  font-size: 13px;
}
.dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  transition: background var(--transition);
}
.dropdown a:hover,
.dropdown a:active { background: var(--bg3); }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--nav-h));
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  z-index: 900;
  transition: transform 0.25s ease;
  -webkit-overflow-scrolling: touch;
}
.side-nav { display: flex; flex-direction: column; }
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--transition);
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.side-link:hover,
.side-link.active,
.side-link:active {
  color: var(--white);
  background: var(--bg3);
  border-left-color: var(--red);
}
.side-link i { width: 18px; text-align: center; color: var(--muted); flex-shrink: 0; }
.side-link:hover i, .side-link.active i { color: var(--red); }
.side-nav hr { border-color: var(--border); margin: 8px 16px; }

.side-section-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  padding: 13px 20px;
  text-align: left;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.side-section-btn:hover,
.side-section-btn:active {
  color: var(--white);
  background: var(--bg3);
  border-left-color: var(--red);
}
.side-section-btn i:first-child { width: 18px; text-align: center; flex-shrink: 0; }
.side-arrow { margin-left: auto; transition: transform 0.3s; font-size: 12px; }
.side-submenu { display: none; flex-direction: column; background: var(--bg); }
.side-submenu.open { display: flex; }
.side-link.sub { font-size: 13px; padding: 11px 20px 11px 32px; opacity: 0.9; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 850;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--nav-h);
  padding: 0 0 80px;
  min-height: calc(100vh - var(--nav-h));
  width: calc(100% - var(--sidebar-w));
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1a0005 0%, #0f0f0f 40%, #1a0a00 100%);
  padding: 40px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(230,57,70,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-sub {
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 56px);
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.hero-text p { color: var(--muted); font-size: 14px; }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 400;
  width: 100%;
  box-sizing: border-box;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-dropdown-wrap { flex-shrink: 0; }

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.filter-dropdown-btn i:first-child { color: var(--red); font-size: 12px; }
.filter-dropdown-btn i:last-child { font-size: 10px; color: var(--muted); }
.filter-dropdown-btn:hover,
.filter-dropdown-btn:active { border-color: #555; background: var(--bg4); }
.filter-dropdown-btn.active-filter { border-color: var(--red); }
.filter-dropdown-btn span { color: var(--red); font-style: italic; font-weight: 700; }

.filter-dropdown-menu {
  position: fixed;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 160px;
  z-index: 99999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
}
.filter-option {
  display: block;
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.filter-option:hover,
.filter-option:active { background: var(--bg3); color: var(--white); }
.filter-option.active { color: var(--red); background: var(--bg3); border-left-color: var(--red); }

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 8px;
  box-sizing: border-box;
  width: 100%;
}
.section-header h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; }
.video-count {
  background: var(--bg3);
  color: var(--muted);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
}

/* ============================================
   VIDEO GRID
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
}

.video-card {
  background: var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeIn 0.3s ease both;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  box-sizing: border-box;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(230,57,70,0.15);
  border-color: #444;
}
.video-card:active { transform: scale(0.98); }

.card-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg3);
  overflow: hidden;
}
.card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.video-card:hover .card-thumb img { transform: scale(1.04); }

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s;
}
.video-card:hover .play-overlay,
.video-card:active .play-overlay { opacity: 1; }
.play-overlay i { font-size: 44px; color: white; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8)); }

.card-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.duration-badge {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.85);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.quality-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-info { padding: 10px 12px; }
.card-info h3 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.card-meta span { display: flex; align-items: center; gap: 3px; }
.card-cat-badge {
  background: var(--bg4);
  color: var(--muted);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: capitalize;
  margin-left: auto;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton-card {
  background: var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.skeleton-thumb {
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-info { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton-line.long { width: 85%; }
.skeleton-line.short { width: 50%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   LAZY IMAGE
   ============================================ */
img.lazy-img {
  filter: blur(6px);
  transition: filter 0.4s ease;
  background: var(--bg3);
}
img:not(.lazy-img) { filter: none; }

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.loading-screen {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  color: var(--muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg4);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state i { font-size: 44px; margin-bottom: 14px; color: var(--bg4); display: block; }
.empty-state h3 { font-size: 18px; color: var(--white); margin-bottom: 8px; }

.load-more-wrap { text-align: center; padding: 24px; }
.btn-load-more {
  background: var(--bg3);
  color: var(--white);
  border: 1px solid var(--border);
  padding: 12px 32px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
}
.btn-load-more:hover,
.btn-load-more:active { background: var(--red); border-color: var(--red); }

/* ============================================
   WATCH PAGE
   ============================================ */
.watch-layout { padding: 0; }
.watch-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  padding: 20px;
  max-width: 1400px;
  box-sizing: border-box;
  width: 100%;
}
.player-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.video-info-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
  box-sizing: border-box;
  width: 100%;
}
.video-category-badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.video-title { font-size: clamp(16px, 2.5vw, 24px); font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.video-meta-row {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.video-meta-row span { display: flex; align-items: center; gap: 5px; }

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  color: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}
.action-btn:hover,
.action-btn:active { background: var(--red); border-color: var(--red); }
.action-btn.liked { background: var(--red); border-color: var(--red); }
.video-description { font-size: 14px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; }

.comments-section {
  margin-top: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-sizing: border-box;
  width: 100%;
}
.comments-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-count-badge {
  background: var(--bg3);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
}
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; align-items: flex-start; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.comment-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.comment-input-wrap input { border-radius: 20px; padding: 10px 16px; }
.btn-post-comment {
  align-self: flex-end;
  background: var(--red);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-post-comment:active { background: var(--red-dark); }

.comment-item { display: flex; gap: 10px; margin-bottom: 16px; animation: fadeIn 0.3s ease; }
.comment-item .comment-avatar { width: 32px; height: 32px; flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-name { font-size: 13px; font-weight: 800; color: var(--white); margin-bottom: 3px; }
.comment-name span { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.comment-text { font-size: 13px; color: var(--muted); line-height: 1.6; word-break: break-word; }
.comment-delete { font-size: 11px; color: var(--red); cursor: pointer; margin-top: 4px; }

.watch-right { padding-top: 0; }
.related-title { font-family: var(--font-display); font-size: 18px; margin-bottom: 12px; letter-spacing: 1px; }
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-card {
  display: flex;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.related-card:hover,
.related-card:active { border-color: #555; background: var(--bg3); }
.related-thumb { width: 120px; min-width: 120px; height: 68px; object-fit: cover; background: var(--bg3); }
.related-info { padding: 8px 8px 8px 0; flex: 1; min-width: 0; }
.related-info h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.related-info span { font-size: 11px; color: var(--muted); }

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-page {
  background: radial-gradient(ellipse at 50% 0%, rgba(230,57,70,0.1) 0%, var(--bg) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
  box-sizing: border-box;
  width: 100%;
}
.back-home {
  position: fixed;
  top: 16px; left: 16px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.back-home:hover { color: var(--white); }
.auth-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}
.auth-logo { font-family: var(--font-display); font-size: 34px; text-align: center; margin-bottom: 6px; }
.auth-tagline { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: all var(--transition);
}
.auth-tab.active { background: var(--red); color: white; }
.auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 600;
}
.auth-message.success { background: rgba(40,200,80,0.15); color: #4cdb7a; border: 1px solid rgba(40,200,80,0.3); }
.auth-message.error { background: rgba(230,57,70,0.15); color: var(--red); border: 1px solid rgba(230,57,70,0.3); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group i { position: absolute; left: 14px; color: var(--muted); font-size: 14px; z-index: 1; }
.input-group input { padding-left: 38px; padding-right: 38px; }
.toggle-pw { position: absolute; right: 12px; color: var(--muted); font-size: 14px; padding: 4px; }
.btn-auth {
  background: var(--red);
  color: white;
  padding: 13px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition);
  margin-top: 4px;
  width: 100%;
}
.btn-auth:active { background: var(--red-dark); }
.auth-divider { text-align: center; position: relative; color: var(--muted); font-size: 12px; margin: 4px 0; }
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
  width: 100%;
}
.btn-google img { width: 18px; height: 18px; }
.btn-google:active { background: var(--bg4); }
.forgot-pw { text-align: center; font-size: 13px; color: var(--muted); }
.forgot-pw a { color: var(--red); font-weight: 700; }

/* ============================================
   ADMIN PAGE
   ============================================ */
.admin-page { background: var(--bg); }
.access-denied { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.denied-box {
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 400px;
  width: 100%;
}
.denied-box i { color: var(--red); }
.admin-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
  width: 100%;
}
.admin-badge {
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 1px;
}
.admin-nav-right { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.admin-container { padding: 20px; max-width: 1400px; box-sizing: border-box; width: 100%; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-card i { font-size: 26px; color: var(--red); flex-shrink: 0; }
.stat-card span { font-size: 26px; font-weight: 800; display: block; }
.stat-card p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-sizing: border-box; }
.admin-card h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.admin-card h2 i { color: var(--red); }
.admin-hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.admin-hint a { color: var(--red); font-weight: 700; }
.admin-message { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; font-weight: 600; }
.admin-message.success { background: rgba(40,200,80,0.15); color: #4cdb7a; border: 1px solid rgba(40,200,80,0.3); }
.admin-message.error { background: rgba(230,57,70,0.15); color: var(--red); border: 1px solid rgba(230,57,70,0.3); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.form-group small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-group small strong { color: var(--red); }
.hint-icon {
  background: var(--bg4); color: var(--muted); border-radius: 50%;
  width: 16px; height: 16px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 10px; cursor: help; margin-left: 4px; vertical-align: middle;
}
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-switch input { width: auto; }
.toggle-slider { width: 42px; height: 24px; background: var(--bg4); border-radius: 12px; position: relative; transition: background var(--transition); flex-shrink: 0; }
.toggle-switch input:checked ~ .toggle-slider { background: var(--red); }
.toggle-slider::before { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 3px; left: 3px; transition: transform var(--transition); }
.toggle-switch input:checked ~ .toggle-slider::before { transform: translateX(18px); }
.btn-upload {
  background: var(--red); color: white; padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px;
  transition: background var(--transition); width: 100%; justify-content: center;
}
.btn-upload:active { background: var(--red-dark); }
.video-manager-search { margin-bottom: 14px; }
.manage-list { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; }
.manage-item { display: flex; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; align-items: center; }
.manage-thumb { width: 90px; height: 51px; object-fit: cover; flex-shrink: 0; }
.manage-info { flex: 1; padding: 8px; min-width: 0; }
.manage-info h4 { font-size: 13px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manage-info span { font-size: 11px; color: var(--muted); }
.manage-actions { display: flex; gap: 6px; padding: 8px; flex-shrink: 0; }
.btn-edit, .btn-delete { padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.btn-edit { background: var(--bg4); color: var(--white); }
.btn-delete { background: rgba(230,57,70,0.15); color: var(--red); }
.btn-delete:active { background: var(--red); color: white; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
  box-sizing: border-box;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; width: 100%; max-width: 420px; position: relative;
  animation: slideUp 0.25s ease; box-sizing: border-box;
}
.modal-large { max-width: 560px; }
.modal-close { position: absolute; top: 16px; right: 16px; color: var(--muted); font-size: 16px; padding: 4px; }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.share-btn.whatsapp { background: #25d366; color: white; }
.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.twitter { background: #000; color: white; border: 1px solid #333; }
.share-btn.telegram { background: #0088cc; color: white; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-left: var(--sidebar-w);
  padding: 28px 16px;
  text-align: center;
  box-sizing: border-box;
  width: calc(100% - var(--sidebar-w));
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-logo { font-family: var(--font-display); font-size: 26px; margin-bottom: 8px; }
.footer p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { font-size: 13px; color: var(--muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--red); }
.footer-copy { font-size: 12px; color: var(--bg4); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   TABLET — max 1024px
   ============================================ */
@media (max-width: 1024px) {
  .watch-container { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .watch-right {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
  .related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
  .related-title { grid-column: 1 / -1; }
}

/* ============================================
   MOBILE — max 768px
   ============================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --nav-h: 56px;
  }

  /* Fix the root cause — everything uses full width */
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Sidebar slides in — does NOT affect page width */
  .sidebar {
    transform: translateX(-240px);
    width: 240px;
    z-index: 950;
    box-shadow: none;
    left: 0;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.6);
  }
  .sidebar-overlay { display: block !important; }
  .sidebar-overlay.hidden { display: none !important; }

  /* Main layout — full width, no left margin */
  .main-content {
    margin-left: 0;
    margin-top: var(--nav-h);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 60px;
  }

  .footer {
    margin-left: 0;
    width: 100%;
    padding: 20px 16px;
  }

  /* Navbar */
  .navbar {
    padding: 0 10px;
    gap: 6px;
    height: var(--nav-h);
    width: 100%;
  }
  .logo { font-size: 16px; }
  .btn-login { padding: 7px 10px; font-size: 12px; }

  /* Search */
  .search-bar { max-width: none; flex: 1; }
  .search-bar input { font-size: 14px; }

  /* Hero — full width, no overflow */
  .hero {
    padding: 22px 14px;
    width: 100%;
    overflow: hidden;
  }
  .hero-text h1 { font-size: 24px; }
  .hero-sub { font-size: 10px; letter-spacing: 2px; }
  .hero-text p { font-size: 12px; }

  /* Filter bar */
  .filter-bar {
    padding: 8px 10px;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
  }
  .filter-dropdown-btn { font-size: 11px; padding: 6px 9px; }

  /* Section header */
  .section-header { padding: 12px 10px 6px; width: 100%; }
  .section-header h2 { font-size: 16px; }

  /* Video grid — 2 columns, full width */
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 10px;
    width: 100%;
  }
  .card-info { padding: 7px 8px; }
  .card-info h3 { font-size: 11px; margin-bottom: 4px; }
  .card-meta { font-size: 10px; gap: 4px; }
  .card-cat-badge { display: none; }

  /* Watch page */
  .watch-container { padding: 8px; gap: 10px; width: 100%; }
  .video-info-box { padding: 12px; }
  .action-row { gap: 6px; }
  .action-btn { padding: 7px 10px; font-size: 11px; }
  .comments-section { padding: 12px; }
  .comment-form { gap: 8px; }

  /* Admin */
  .admin-container { padding: 10px; width: 100%; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .admin-card { padding: 12px; }
  .admin-nav { padding: 0 12px; }
  .admin-nav-right { gap: 8px; }

  /* Auth */
  .auth-container { padding: 22px 14px; }
  .auth-logo { font-size: 26px; }

  /* Footer */
  .footer-logo { font-size: 20px; }
  .footer-links { gap: 10px; }

  /* Modal */
  .modal { padding: 18px 14px; }
  .share-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SMALL MOBILE — max 400px
   ============================================ */
@media (max-width: 400px) {
  .logo { font-size: 14px; }
  .hamburger { font-size: 20px; padding: 6px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px 8px; }
  .hero { padding: 18px 12px; }
  .hero-text h1 { font-size: 20px; }
  .filter-dropdown-btn { font-size: 10px; padding: 5px 7px; }
  .section-header h2 { font-size: 14px; }
  .card-info h3 { font-size: 10px; }
  .auth-container { padding: 18px 12px; }
  .btn-login { padding: 6px 8px; font-size: 11px; }
}
/* Auto video thumbnail on cards */
.card-thumb { position: relative; width: 100%; padding-top: 56.25%; background: #111; overflow: hidden; }
.thumb-container { position: absolute; inset: 0; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ===== UNIFORM VIDEO CARD THUMBNAILS ===== */
.card-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  background: #111;
  overflow: hidden;
  border-radius: 8px;
}
.card-thumb img,
.card-thumb video,
.card-thumb-img,
.card-thumb-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 0.2s;
}
.video-card:hover .play-overlay { background: rgba(0,0,0,0.35); }
.play-overlay i {
  font-size: 44px;
  color: rgba(255,255,255,0);
  transition: color 0.2s;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.video-card:hover .play-overlay i { color: rgba(255,255,255,0.9); }

/* Related video thumbnails */
.related-thumb-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  position: relative;
}
.related-thumb-wrap img,
.related-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}