/* ═══════════════════════════════════════════
   AI MAG — Dark Cinematic Theme
   mag.jomhub.pro
═══════════════════════════════════════════ */

:root {
  --bg:         #07070f;
  --bg2:        #0e0e1c;
  --surface:    #13132a;
  --card:       #1a1a30;
  --card-hover: #20203a;
  --border:     rgba(255,255,255,0.07);
  --accent:     #e63946;
  --accent2:    #ff6b6b;
  --gold:       #ffd60a;
  --text:       #f0f0f8;
  --muted:      #8888aa;
  --dim:        #555577;
  --font-head:  'Bebas Neue', sans-serif;
  --font-body:  'Inter', sans-serif;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --glow:       0 0 30px rgba(230,57,70,0.25);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font: inherit; }

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

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,15,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--accent));
}
.logo-text {
  font-family: var(--font-head);
  font-size: 28px;
  letter-spacing: 2px;
  color: #fff;
}
.logo-accent { color: var(--accent); }

/* Nav */
.main-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-link:hover { color: var(--text); background: var(--surface); }

/* Header CTA */
.header-right { margin-left: auto; flex-shrink: 0; }
.btn-subscribe {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.btn-subscribe:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}
.yt-icon { font-size: 11px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 12px 24px;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.2s;
}
.mobile-nav-link:hover { color: var(--text); background: var(--surface); }

/* ════════════════════════════════════════
   TICKER
════════════════════════════════════════ */
.ticker-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 36px;
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-content {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.ticker-content span { flex-shrink: 0; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  background: linear-gradient(180deg, #0e0e20 0%, var(--bg) 100%);
  padding: 60px 24px;
}
.hero-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}
.hero-player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px rgba(230,57,70,0.15);
}
.player-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: var(--surface);
}
.player-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: #fff;
}
.hero-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.hero-channel { color: var(--accent); font-weight: 600; }
.hero-dot { color: var(--dim); }
.hero-cat {
  background: var(--surface);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* ════════════════════════════════════════
   SECTIONS
════════════════════════════════════════ */
.section { padding: 64px 24px; }
.section-dark { background: var(--bg2); }
.container { max-width: 1300px; margin: 0 auto; }
.section-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}
.section-title {
  font-family: var(--font-head);
  font-size: 32px;
  letter-spacing: 1px;
  color: #fff;
  flex-shrink: 0;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 6px;
  border-radius: 2px;
}
.section-sub {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   CATEGORY TABS
════════════════════════════════════════ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.tab-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-transform: uppercase;
}
.tab-btn:hover { color: var(--text); border-color: var(--dim); }
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(230,57,70,0.3);
}

/* ════════════════════════════════════════
   VIDEO GRID
════════════════════════════════════════ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.video-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.video-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(230,57,70,0.3);
  box-shadow: var(--shadow), 0 0 25px rgba(230,57,70,0.1);
}
.video-thumb {
  position: relative;
  padding-top: 56.25%;
  background: var(--surface);
  overflow: hidden;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface) 0%, #1a1a35 100%);
  color: var(--dim);
  font-size: 40px;
}
.thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.video-card:hover .thumb-overlay { opacity: 1; }
.play-btn {
  width: 56px;
  height: 56px;
  background: rgba(230,57,70,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 20px rgba(230,57,70,0.5);
  padding-left: 4px;
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.video-cat-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.video-body {
  padding: 16px;
}
.video-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.video-channel { color: var(--accent); font-weight: 500; }

/* ════════════════════════════════════════
   CHANNEL GRID
════════════════════════════════════════ */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.channel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.25s;
  cursor: pointer;
}
.channel-card:hover {
  border-color: rgba(230,57,70,0.4);
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-head);
  letter-spacing: 1px;
  color: #fff;
  flex-shrink: 0;
}
.channel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.channel-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.channel-sub {
  font-size: 11px;
  color: var(--dim);
  font-weight: 500;
}
.channel-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: auto;
}

/* ════════════════════════════════════════
   MODAL
════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), var(--glow);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s;
  overflow: hidden;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--accent); }
.modal-player {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}
.modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.modal-info {
  padding: 20px 24px 24px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.modal-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-tagline {
  color: var(--muted);
  font-size: 14px;
}
.footer-note {
  font-size: 12px;
  color: var(--dim);
  max-width: 500px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 8px 0;
}
.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--dim); }

/* ════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════ */
.empty-state {
  grid-column: 1 / -1;
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 14px; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1100px) {
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-title { font-size: 32px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .section-header { flex-direction: column; align-items: flex-start; }
  .category-tabs { margin-left: 0; }
}

@media (max-width: 640px) {
  .main-nav, .header-right { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 32px 16px; }
  .hero-title { font-size: 28px; }
  .video-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 40px 16px; }
}

@media (max-width: 420px) {
  .channel-grid { grid-template-columns: 1fr; }
  .ticker-label { display: none; }
}

/* ── Utility ── */
.hidden { display: none !important; }
