/* ═══════════════════════════════════════════════════════════════════════════
   VORON MEDIA HUB — Main Stylesheet
   Dark Netflix-inspired design with red accents
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111118;
  --bg-card:       #16161f;
  --bg-card-hover: #1e1e2a;
  --bg-admin:      #0d0d14;
  --bg-sidebar:    #090910;

  --accent:        #dc2626;
  --accent-hover:  #ef4444;
  --accent-dark:   #991b1b;
  --gold:          #f59e0b;

  --text-primary:   #f1f1f3;
  --text-secondary: #a1a1b5;
  --text-muted:     #6b6b80;

  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.15);

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  /* Transitions */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width: 1400px;
  --sidebar-w: 240px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; }

/* ─── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER / NAV
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0.80) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  color: var(--accent);
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(220,38,38,0.6));
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.logo-accent { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-actions { margin-left: auto; }

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn-subscribe:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s var(--ease);
}

.mobile-menu {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(220,38,38,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-secondary:hover { background: rgba(255,255,255,0.14); border-color: var(--border-hover); }

.btn-full { width: 100%; justify-content: center; }

.btn-watch-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
}

.btn-watch-now:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(220,38,38,0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-section {
  padding: 32px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.hero-video-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-video-card:hover { transform: scale(1.01); box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.hero-video-card:focus { outline: 2px solid var(--accent); outline-offset: 3px; }

.hero-thumbnail-wrap { position: relative; aspect-ratio: 16/9; }

.hero-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.85) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.hero-video-card:hover .hero-overlay { opacity: 1; }

.play-btn-large {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(220,38,38,0.8));
  transform: scale(0.85);
  transition: transform 0.2s var(--ease);
}

.hero-video-card:hover .play-btn-large { transform: scale(1); }

.hero-info {
  padding: 20px;
  background: linear-gradient(0deg, rgba(10,10,15,1) 0%, rgba(10,10,15,0) 100%);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 8px 0 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1.3;
}

/* Banner area */
.hero-banner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.banner-img { border-radius: var(--radius-md); object-fit: cover; }
.banner-300x600 { width: 300px; height: 600px; }
.banner-1200x200 { width: 100%; max-width: 1200px; height: 200px; }

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
}

.banner-placeholder.banner-300x600 { width: 300px; height: 600px; }
.banner-placeholder.banner-1200x200 { width: 100%; height: 200px; }
.banner-placeholder a { color: var(--accent); }

.banner-wide-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

.hero-placeholder {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
  color: var(--text-muted);
}

.hero-placeholder a { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-featured { background: var(--accent); color: #fff; }
.badge-top { background: var(--gold); color: #000; }

/* ═══════════════════════════════════════════════════════════════════════════
   SUBSCRIBE / TELEGRAM SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.subscribe-section {
  background: linear-gradient(135deg, rgba(38,120,214,0.10) 0%, rgba(10,10,15,0) 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px;
  margin: 0;
}

.subscribe-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.subscribe-text h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.subscribe-text p { color: var(--text-secondary); font-size: 15px; }

.subscribe-actions { flex-shrink: 0; }

/* ─── Telegram Buttons ────────────────────────────────────────────────────── */
.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: #229ED9;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-telegram:hover {
  background: #1a8cbe;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34,158,217,0.45);
}

.btn-telegram-lg { font-size: 16px; padding: 14px 32px; }

.btn-telegram-outline {
  background: transparent;
  border: 2px solid #229ED9;
  color: #229ED9;
}

.btn-telegram-outline:hover {
  background: #229ED9;
  color: #fff;
  box-shadow: 0 6px 24px rgba(34,158,217,0.35);
}

.tg-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Telegram Channel Banner Block ───────────────────────────────────────── */
.tg-channel-banner-section {
  max-width: var(--max-width);
  margin: 32px auto;
  padding: 0 24px;
}

.tg-channel-banner {
  background: linear-gradient(135deg, rgba(34,158,217,0.1) 0%, rgba(17,17,24,0.7) 100%);
  border: 1px solid rgba(34, 158, 217, 0.25);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tg-channel-banner:hover {
  border-color: rgba(34, 158, 217, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 158, 217, 0.15);
}

.tg-banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.tg-banner-icon {
  width: 52px;
  height: 52px;
  background: rgba(34, 158, 217, 0.18);
  color: #229ED9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(34, 158, 217, 0.25);
}

.tg-banner-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.tg-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tg-banner-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-align: left;
}

.tg-banner-text p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  text-align: left;
}

.tg-banner-text strong {
  color: #229ED9;
}

.tg-banner-btn {
  background: #229ED9;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  flex-shrink: 0;
}

.tg-channel-banner:hover .tg-banner-btn {
  background: #1a8cbe;
  box-shadow: 0 4px 15px rgba(34, 158, 217, 0.4);
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .tg-channel-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }
  .tg-banner-left {
    flex-direction: column;
    gap: 12px;
  }
  .tg-banner-text h3, .tg-banner-text p {
    text-align: center;
  }
  .tg-banner-btn {
    width: 100%;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACTS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.contacts-section {
  background: linear-gradient(135deg, rgba(34,158,217,0.08) 0%, rgba(10,10,15,0) 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
  margin-top: 32px;
}

.contacts-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.contacts-text h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.contacts-text p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 480px;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADERS & LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title .accent { color: var(--accent); margin-right: 8px; }

.see-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
}

.see-all:hover { color: var(--accent-hover); transform: translateX(2px); }

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO CAROUSEL
   ═══════════════════════════════════════════════════════════════════════════ */
.carousel-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 0;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 16px;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track .video-card {
  flex: 0 0 220px;
}

.carousel-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  z-index: 2;
  line-height: 1;
}

.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.video-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
  border: 1px solid var(--border);
}

.video-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  background: var(--bg-card-hover);
  border-color: rgba(220,38,38,0.3);
}

.video-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}

.video-card:hover .card-thumb { transform: scale(1.06); }

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.video-card:hover .card-play-overlay { opacity: 1; }

.play-btn-small {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 0 20px rgba(220,38,38,0.6);
  transform: scale(0.8);
  transition: transform 0.2s var(--ease);
}

.video-card:hover .play-btn-small { transform: scale(1); }

.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-top { background: var(--gold); color: #000; }

.card-info { padding: 10px 12px; }

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .card-title { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY GRID SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.category-grid-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 0 24px;
}

.video-grid-full {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.category-full-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 0;
}

.back-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent-hover); }

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s var(--ease);
}

.modal-overlay.is-open { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: slideUp 0.25s var(--ease);
}

@keyframes slideUp {
  from { transform: translateY(32px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1);       opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.modal-close:hover { background: var(--accent); transform: scale(1.1); }

.modal-title-bar {
  padding: 16px 56px 12px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title-bar h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.modal-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE HERO (category page)
   ═══════════════════════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, rgba(220,38,38,0.15) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}

.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.flash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  animation: slideDown 0.3s var(--ease);
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.flash-success {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  color: #10b981;
}

.flash-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  color: #ef4444;
}

.flash-icon { font-size: 16px; font-weight: 700; }

.flash-close {
  margin-left: auto;
  font-size: 18px;
  opacity: 0.6;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  padding: 0 4px;
}

.flash-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo-text { font-size: 16px; margin-top: 4px; display: inline-block; }
.footer-brand p { margin-top: 12px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.footer-links h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }
.footer-tg-link:hover { color: #229ED9 !important; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-inner { text-align: center; padding: 32px; }
.error-code { font-size: 120px; font-weight: 900; color: var(--accent); line-height: 1; opacity: 0.8; }
.error-msg { font-size: 24px; font-weight: 600; margin: 16px 0 8px; }
.error-detail { color: var(--text-muted); margin-bottom: 24px; }

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}

.empty-state p { margin-bottom: 20px; font-size: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — GLOBAL
   ═══════════════════════════════════════════════════════════════════════════ */
.admin-body {
  background: var(--bg-admin);
  min-height: 100vh;
}

/* ─── Admin Login ─────────────────────────────────────────────────────────── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(220,38,38,0.12) 0%, transparent 60%);
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.admin-logo { text-align: center; margin-bottom: 28px; }
.admin-login-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 28px; }

/* ─── Admin Layout ────────────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
}

.sidebar-brand {
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.sidebar-link.active { color: var(--accent); background: rgba(220,38,38,0.1); }

.sidebar-icon { font-size: 16px; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-logout {
  color: var(--text-muted);
}

.sidebar-logout:hover { color: var(--accent); background: rgba(220,38,38,0.08); }

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px;
  min-width: 0;
}

/* ─── Admin Page Header ───────────────────────────────────────────────────── */
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-page-header h2 {
  font-size: 24px;
  font-weight: 700;
}

/* ─── Stats Grid ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover { border-color: rgba(220,38,38,0.3); transform: translateY(-2px); }

.stat-icon { font-size: 32px; flex-shrink: 0; }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 32px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ─── Admin Two Col ───────────────────────────────────────────────────────── */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ─── Admin Panel ─────────────────────────────────────────────────────────── */
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 { font-size: 15px; font-weight: 600; }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.admin-form { padding: 20px; }

.admin-form-inline { padding: 16px 20px; }

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-grow { flex: 1; min-width: 180px; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  padding: 9px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

.form-select { min-width: 140px; }

.form-check-group { justify-content: flex-end; padding-bottom: 9px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--accent); }

.search-form {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
}

.search-form .form-input { max-width: 360px; }

/* ─── Buttons (Admin) ─────────────────────────────────────────────────────── */
.btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.btn-sm:hover { background: rgba(255,255,255,0.13); }

.btn-xs {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: background 0.15s;
}

.btn-xs:hover { background: rgba(255,255,255,0.14); }
.btn-xs.btn-accent { background: rgba(220,38,38,0.15); border-color: rgba(220,38,38,0.3); color: #ef4444; }
.btn-xs.btn-accent:hover { background: rgba(220,38,38,0.25); }
.btn-xs.btn-danger { background: rgba(220,38,38,0.1); border-color: rgba(220,38,38,0.2); color: #ef4444; }
.btn-xs.btn-danger:hover { background: rgba(220,38,38,0.25); }

/* ─── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.table-thumb {
  width: 56px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-secondary);
}

.table-link { color: var(--text-primary); transition: color 0.2s; }
.table-link:hover { color: var(--accent); }

.table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  padding: 16px 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Admin Modal (Edit Video) ─────────────────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}

.admin-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 520px;
}

.admin-modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 24px; }

.modal-btn-row { display: flex; gap: 12px; margin-top: 20px; }

/* ─── Badge Category ──────────────────────────────────────────────────────── */
.badge-category {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(220,38,38,0.15);
  color: #ef4444;
  border: 1px solid rgba(220,38,38,0.2);
}

/* ─── Banners Admin ───────────────────────────────────────────────────────── */
.banners-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.banner-preview {
  margin: 16px 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-preview-img { width: 100%; max-height: 240px; object-fit: contain; }

.banner-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 32px;
  text-align: center;
}

/* ─── Code ────────────────────────────────────────────────────────────────── */
code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-banner { display: none; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
  .banners-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-burger { display: flex; }

  .stats-grid { grid-template-columns: 1fr; }

  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s var(--ease); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }

  .subscribe-inner { flex-direction: column; text-align: center; }
  .subscribe-actions { width: 100%; display: flex; justify-content: center; }

  .contacts-inner { flex-direction: column; text-align: center; }
  .contacts-inner .btn-telegram { width: auto; }

  .subscribe-form { max-width: 100%; flex-direction: column; }
  .subscribe-form .btn-primary { width: 100%; justify-content: center; }

  .hero-title { font-size: 16px; }

  .footer-container { grid-template-columns: 1fr; gap: 24px; }

  .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .section-header { padding: 0 12px; }
  .carousel-track .video-card { flex: 0 0 160px; }
}

@media (max-width: 480px) {
  .hero-section { padding: 16px 12px; }
  .category-grid-section { padding: 20px 0; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
  .page-hero { padding: 28px 16px; }
  .page-hero h1 { font-size: 26px; }
}
