:root {
  --bg: #0f0f13;
  --card: #1a1a22;
  --accent: #00c2a8;   /* Viki teal-ish */
  --text: #ffffff;
  --muted: #9aa0ad;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 60px;
}
a { color: inherit; text-decoration: none; }

/* Header */
header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; background: #14141b;
  position: sticky; top: 0; z-index: 50;
}
.logo { font-size: 22px; font-weight: 800; color: var(--accent); }
nav { display: flex; gap: 18px; }
nav a { color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--text); }
.search-box { margin-left: auto; display: flex; }
.search-box input {
  background: #20202b; border: none; padding: 8px 14px;
  border-radius: 20px 0 0 20px; color: #fff; width: 200px; outline: none;
}
.search-box button {
  background: var(--accent); border: none; padding: 8px 16px;
  border-radius: 0 20px 20px 0; color: #000; font-weight: 700; cursor: pointer;
}

/* Section */
.section { padding: 24px 20px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.section-head h2 { font-size: 20px; }
.see-all { color: var(--accent); font-weight: 700; font-size: 14px; }

/* Grid — 3 per row */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-box input { width: 120px; }
}

/* Card */
.card {
  background: var(--card); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform .15s;
}
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #2a2a35;
}
.card .info { padding: 10px; }
.card .info .t { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .info .m { font-size: 12px; color: var(--muted); margin-top: 4px; }
.badge {
  display: inline-block; background: var(--accent); color: #000;
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
}

/* Pagination */
.pagination {
  display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap;
}
.pagination button {
  background: var(--card); color: #fff; border: 1px solid #2a2a35;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.pagination button.active { background: var(--accent); color: #000; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* Watch page */
.watch-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px; }
.watch-wrap h1 { margin-bottom: 8px; }
.player {
  width: 100%; aspect-ratio: 16/9; background: #000;
  border-radius: 12px; overflow: hidden; margin: 16px 0;
}
.player iframe { width: 100%; height: 100%; border: 0; }
.btn {
  display: inline-block; background: var(--accent); color: #000;
  padding: 12px 24px; border-radius: 10px; font-weight: 800; cursor: pointer; border: none;
}
.btn.outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.ep-list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.ep-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); padding: 12px 16px; border-radius: 8px; cursor: pointer;
}
.ep-item:hover { background: #22222d; }
.ep-item.active { border: 1px solid var(--accent); }

/* Admin */
.admin-form { max-width: 600px; margin: 0 auto; }
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%; padding: 10px; margin-bottom: 12px;
  background: #20202b; border: 1px solid #2a2a35; border-radius: 8px; color: #fff;
}
.admin-list { margin-top: 30px; }
.admin-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); padding: 10px 14px; border-radius: 8px; margin-bottom: 8px;
}
.admin-row button { margin-left: 6px; padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; }
.del-btn { background: #e74c3c; color: #fff; }
.edit-btn { background: #f39c12; color: #000; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
