/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  background: #0d0d0d;
  color: #fff;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,.95) 60%, transparent);
  padding: 14px 0;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon { font-size: 26px; }

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #e50914, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-admin-btn {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  transition: background .2s;
}
.nav-admin-btn:hover { background: rgba(255,255,255,.18); }

/* ── Main ─────────────────────────────────────────────────────────────────── */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

/* ── Loading ──────────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 280px;
}

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255,255,255,.1);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,.5);
}
.empty-emoji { font-size: 60px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; color: rgba(255,255,255,.75); margin-bottom: 8px; }
.empty-state p  { font-size: 15px; }
.empty-state a  { color: #e50914; text-decoration: none; font-weight: 600; }

/* ── Video Grid ───────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  background: #1c1c1c;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
}
.card:hover {
  transform: scale(1.045);
  box-shadow: 0 14px 48px rgba(0,0,0,.65);
  z-index: 2;
}

/* Thumbnail */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}
.card-thumb img,
.card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover .play-overlay { opacity: 1; }

.play-btn {
  width: 54px;
  height: 54px;
  background: rgba(229,9,20,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* Info */
.card-info { padding: 11px 13px 13px; }

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-views {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  cursor: pointer;
}

.modal-box {
  position: relative;
  width: 92%;
  max-width: 980px;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #e50914; }

#modal-video {
  width: 100%;
  display: block;
  max-height: 68vh;
  background: #000;
}

.modal-meta {
  padding: 14px 20px 18px;
}
.modal-meta h2 { font-size: 17px; font-weight: 600; margin-bottom: 5px; }
.modal-meta p  { font-size: 13.5px; color: rgba(255,255,255,.55); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .main { padding: 24px 16px 48px; }
}
