/* ═══════════════════════════════════════════════
   STREAMHUB — styles.css
   Light/Dark mode + volledig mobiel responsive
   ═══════════════════════════════════════════════ */

/* ── LIGHT MODE (standaard) ── */
:root {
  --bg:         #ffffff;
  --bg-soft:    #f8f9fb;
  --panel:      #ffffff;
  --panel-soft: #f6f7f9;
  --line:       #e5e7eb;
  --text:       #0f172a;
  --muted:      #64748b;
  --red:        #ff2d2d;
  --dark:       #111827;
  --yellow:     #b7791f;
  --yellow-bg:  #fff5d6;
  --shadow:     0 8px 30px rgba(15,23,42,.08);
  --modal-bg:   #ffffff;
  --topbar-bg:  rgba(255,255,255,.96);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bg:         #0e0f11;
  --bg-soft:    #13151a;
  --panel:      #1c1f24;
  --panel-soft: #16181c;
  --line:       rgba(255,255,255,.08);
  --text:       #f0f2f5;
  --muted:      #7a8290;
  --red:        #ff4444;
  --dark:       #f0f2f5;
  --yellow:     #f59e0b;
  --yellow-bg:  rgba(245,158,11,.12);
  --shadow:     0 8px 30px rgba(0,0,0,.3);
  --modal-bg:   #1c1f24;
  --topbar-bg:  rgba(14,15,17,.96);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background .2s, color .2s;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.hidden { display: none !important; }

/* ── UTILITY ── */
.message  { margin: .6rem 0 0; color: var(--red); font-size: .95rem; }
.warning  { color: var(--yellow); background: var(--yellow-bg); border: 1px solid rgba(245,158,11,.3); padding: 12px 14px; border-radius: 14px; }
.empty-state { background: var(--panel-soft); border: 1px dashed var(--line); border-radius: 16px; padding: 18px; color: var(--muted); }
.inline-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left  { flex-shrink: 0; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

.brand-wrap { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 12px;
  background: var(--red); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.brand-text { font-size: 1.2rem; }

#searchInput {
  width: 100%; max-width: 500px;
  border: 1px solid var(--line); background: var(--panel-soft);
  color: var(--text); border-radius: 999px;
  padding: 9px 16px; outline: none; transition: border-color .15s;
}
#searchInput:focus { border-color: var(--red); }
#searchInput::placeholder { color: var(--muted); }

/* ── DARK MODE TOGGLE KNOP ── */
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-soft);
  color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background .15s;
  flex-shrink: 0; padding: 0;
}
.theme-btn:hover { background: var(--line); }

.studio-link {
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: .18s ease; white-space: nowrap; font-size: .9rem;
}
.studio-link:hover { background: var(--panel-soft); }

/* ── PAGE ── */
.page { max-width: 1500px; margin: 0 auto; padding: 22px 20px 60px; }
.hero-section { margin-bottom: 24px; }

/* ── FEATURED CARD ── */
.featured-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
}
.featured-layout { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(280px,1fr); }
.featured-video-thumb, .media-thumb { position: relative; background: #0b0b0b; }
.featured-video-thumb { aspect-ratio: 16/9; }
.featured-video-thumb img, .media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-info { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.featured-info h1 { margin: 0; font-size: 1.8rem; line-height: 1.15; }
.featured-info p { margin: 0; color: var(--muted); line-height: 1.5; }

/* ── SECTIONS ── */
.section-block { margin-top: 30px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; font-size: 1.25rem; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge.planned, .badge.ended { background: var(--panel-soft); color: var(--muted); border: 1px solid var(--line); }
.badge.live   { background: var(--red); color: #fff; }
.badge.locked { background: var(--yellow-bg); color: var(--yellow); }

.badge.viewer-count {
  background: var(--yellow-bg);
  color: var(--red);
  border: 1.5px solid rgba(255,45,45,.25);
  gap: 5px; font-weight: 700;
  animation: viewer-pulse 2.4s ease-in-out infinite;
}
@keyframes viewer-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,45,45,.18); }
  50%      { box-shadow: 0 0 0 5px rgba(255,45,45,0); }
}

/* ── CARD GRID ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 16px; }
.media-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .18s ease;
}
.media-card:hover { transform: translateY(-2px); }
.media-thumb { aspect-ratio: 16/9; }
.thumb-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.play-pill {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(15,23,42,.88); color: #fff;
  border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .82rem;
}
.media-content { padding: 13px 14px 16px; }
.media-content h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.3; }
.media-content p  { margin: 0; color: var(--muted); line-height: 1.45; font-size: .9rem; }

/* ── MODAL ── */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,20,.7); }
.modal-panel {
  position: relative; z-index: 2;
  background: var(--modal-bg);
  border-radius: 22px;
  width: min(1100px, 96vw);
  max-height: 92vh; overflow: auto;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
  border: 1px solid var(--line);
}
.single-panel { max-width: 1100px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; font-size: 1.4rem;
  background: var(--panel-soft); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.player-area { padding: 18px; }
.only-player { max-width: 100%; }
.player-shell { background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; }
.player-shell iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-meta { padding: 14px 2px 0; }
.player-meta h3 { margin: 0 0 8px; font-size: 1.3rem; }
.player-meta p  { margin: 0; color: var(--muted); line-height: 1.55; }
.player-status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.unlock-area {
  margin-top: 14px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel-soft);
}
.unlock-area h4 { margin: 0 0 6px; }
.unlock-area p  { margin: 0 0 10px; color: var(--muted); }
.unlock-area input {
  flex: 1; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); border-radius: 10px; padding: 9px 13px; outline: none;
}
.unlock-area input:focus { border-color: var(--red); }
.unlock-area button {
  border: 1px solid var(--line); background: var(--dark); color: var(--bg);
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
  white-space: nowrap; transition: .15s;
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 700px) {
  .topbar { padding: 8px 14px; gap: 8px; }
  .brand-text { font-size: 1rem; }
  #searchInput { font-size: .9rem; padding: 8px 14px; }
  .studio-link { padding: 7px 12px; font-size: .82rem; }

  .page { padding: 14px 12px 50px; }
  .featured-layout { grid-template-columns: 1fr; }
  .featured-info { padding: 14px; gap: 10px; }
  .featured-info h1 { font-size: 1.3rem; }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }

  .modal-panel { width: 100vw; max-height: 100vh; border-radius: 20px 20px 0 0; margin-top: auto; align-self: flex-end; }
  .modal { align-items: flex-end; }
  .player-area { padding: 14px; }
  .player-meta h3 { font-size: 1.1rem; }

  .section-title-row h2 { font-size: 1.1rem; }
  .legend { display: none; }
}

@media (max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
  .brand-text { display: none; }
}
