/* CanaleTalk — dark TV theme */

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

:root {
  --bg:          #0e0e0e;
  --surface:     #1a1a1a;
  --surface2:    #242424;
  --border:      #2e2e2e;
  --text:        #e8e8e8;
  --text-muted:  #888;
  --accent:      #e63946;
  --accent2:     #457b9d;
  --radius:      6px;
  --font:        'Segoe UI', system-ui, sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-logo { font-size: 1.5rem; }

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Section label ───────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Live section ────────────────────────────────────────── */
.live-section {
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.player-wrapper {
  max-width: 1100px;
  width: 100%;
}

/* Video.js overrides */
.video-js { border-radius: var(--radius); overflow: hidden; }

/* ── EPG bar ─────────────────────────────────────────────── */
.epg-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 1100px;
  flex-wrap: wrap;
}

.epg-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.epg-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.epg-badge.now  { background: var(--accent);  color: #fff; }
.epg-badge.next { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }

.epg-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
}

.epg-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.epg-divider { color: var(--border); font-size: 1.2rem; }

/* ── VOD section ─────────────────────────────────────────── */
.vod-section {
  padding: 1.5rem 2rem;
}

.vod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vod-header .section-label { margin-bottom: 0; }

.vod-search-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}

.vod-search-input:focus { border-color: var(--accent2); }

/* ── VOD grid ────────────────────────────────────────────── */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.vod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}

.vod-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
}

.vod-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  overflow: hidden;
}

.vod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vod-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface2);
}

.vod-duration {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.vod-info {
  padding: 0.6rem 0.75rem 0.75rem;
}

.vod-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vod-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── Load more button ────────────────────────────────────── */
.vod-footer { text-align: center; margin-top: 1.5rem; }

.load-more-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0.5rem 1.5rem;
  transition: background 0.15s, border-color 0.15s;
}

.load-more-btn:hover {
  background: var(--surface);
  border-color: var(--accent2);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--accent2); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header,
  .live-section,
  .vod-section   { padding: 1rem; }

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

  .epg-title { max-width: 16ch; }

  .vod-search-input { width: 100%; }
}
