* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08080b;
  --panel: #131319;
  --panel-line: #232330;
  --ink: #f1f0ee;
  --ink-dim: #8b8a95;
  --brand: #6b2fb3;
  --brand-deep: #3d1a66;
  --brand-glow: #b47aff;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a { color: inherit; text-decoration: none; }

/* ---------- HEADER + HAMBURGER ---------- */
header {
  background: linear-gradient(180deg, var(--brand-deep), #1a0b2e);
  border-bottom: 1px solid rgba(107,47,179,.4);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-logo { height: 28px; width: auto; display: block; }

.menu-btn {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 90;
  display: none;
}
.menu-overlay.open { display: block; }

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: var(--panel);
  border-left: 1px solid var(--panel-line);
  z-index: 91;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.menu-panel.open { transform: translateX(0); }
.menu-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--panel-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-panel-header span { font-weight: 700; font-size: .95rem; }
.menu-close {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.3rem;
  cursor: pointer;
}
.menu-list { display: flex; flex-direction: column; padding: 8px 0; }
.menu-list a {
  padding: 13px 20px;
  font-size: .92rem;
  color: var(--ink);
  border-bottom: 1px solid var(--panel-line);
}
.menu-list a:active, .menu-list a:hover { background: rgba(107,47,179,.15); }
.menu-list .menu-sep {
  padding: 10px 20px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* ---------- SECTION / EYEBROW ---------- */
.eyebrow {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--brand-glow);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ---------- CHANNEL GRID (index & kategori) ---------- */
.page-body {
  width: 100%;
  max-width: 1160px;
  padding: 24px 20px 40px;
}
.category-section { margin-bottom: 32px; }
.category-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-line);
  margin-bottom: 14px;
}
.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.channel-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.channel-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}
.channel-card span {
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
}

/* ---------- PLAYER (live-page) ---------- */
.player-stage { width: 100%; max-width: 1160px; padding: 22px 20px 0; }
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 20px 50px -12px rgba(0,0,0,.7);
}
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- EPG LIST (live-page) ---------- */
.epg-section { width: 100%; max-width: 1160px; margin: 36px 0 8px; padding: 0 20px; }
.epg-list { display: flex; flex-direction: column; gap: 10px; }
.epg-date-label {
  font-size: .78rem; font-weight: 700; color: var(--ink-dim);
  text-transform: uppercase; letter-spacing: .8px; padding: 4px 2px 2px;
}
.epg-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  overflow: hidden;
}
.epg-item.now {
  background: linear-gradient(90deg, rgba(107,47,179,.22), var(--panel) 70%);
  border-color: rgba(107,47,179,.55);
  box-shadow: 0 4px 20px -6px rgba(107,47,179,.35);
}
.epg-time-col {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px; padding: 14px 8px; border-right: 1px solid var(--panel-line);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.epg-item.now .epg-time-col { border-right-color: rgba(107,47,179,.35); }
.epg-time { font-size: .95rem; font-weight: 700; text-align: center; }
.epg-time-sep { font-size: .68rem; color: var(--ink-dim); }
.epg-live-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .62rem; font-weight: 800; letter-spacing: .6px;
  color: var(--brand-glow); margin-top: 2px;
}
.epg-live-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-glow); animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.epg-body { padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.epg-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.epg-desc {
  font-size: .85rem; color: var(--ink-dim); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.loading, .error { text-align: center; padding: 48px 20px; color: var(--ink-dim); }
.error { color: var(--brand-glow); }
.spinner {
  width: 30px; height: 30px; border: 3px solid #2a2a35; border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- STRIP CHANNEL LAIN (scroll horizontal, di live-page) ---------- */
.strip-section { width: 100%; max-width: 1160px; margin: 8px 0 8px; padding: 0 20px; }
.channel-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.channel-strip .channel-card { flex: 0 0 140px; }
.channel-strip .channel-card img { aspect-ratio: 16 / 9; }

/* ---------- STATIC PAGE (about/privacy) ---------- */
.static-content {
  width: 100%;
  max-width: 800px;
  padding: 32px 20px 48px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.static-content h1 { color: var(--ink); font-size: 1.6rem; margin-bottom: 16px; }
.static-content h2 { color: var(--ink); font-size: 1.1rem; margin: 20px 0 8px; }
.static-content p { margin-bottom: 12px; }

/* ---------- FOOTER ---------- */
footer {
  width: 100%;
  text-align: center;
  padding: 28px 16px 32px;
  margin-top: 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #4a4a55;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .page-body { padding: 18px 12px 32px; }
  .epg-item { grid-template-columns: 84px 1fr; }
  .epg-time { font-size: .82rem; }
}
