/* VidBox clone — dark streaming theme */
:root {
  --bg:        #0d0f14;
  --bg-elev:  #141821;
  --bg-card:  #1a1d24;
  --line:     #232734;
  --text:     #e8eaf0;
  --muted:    #8b90a0;
  --accent:   #ff3d4d;
  --accent-2: #ff6b78;
  --gold:     #ffb648;
  --radius:   10px;
  --maxw:     1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
.vb-container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.vb-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.vb-header__inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.vb-logo {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text);
}
.vb-logo__accent { color: var(--accent); }
.vb-nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.vb-nav a, .vb-nav__trigger {
  background: none; border: 0; padding: 0;
  color: var(--muted); font-weight: 500; font-size: 14px;
  transition: color .15s;
}
.vb-nav a:hover, .vb-nav__trigger:hover { color: var(--text); }
.vb-nav__dropdown { position: relative; }
.vb-nav__menu {
  position: absolute; top: 28px; left: -10px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px;
  display: none; min-width: 180px;
  grid-template-columns: 1fr 1fr; gap: 2px;
}
.vb-nav__dropdown:hover .vb-nav__menu,
.vb-nav__dropdown:focus-within .vb-nav__menu { display: grid; }
.vb-nav__menu a { padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.vb-nav__menu a:hover { background: var(--bg-card); }

.vb-search {
  display: flex; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 16px;
  width: 320px; max-width: 40vw;
}
.vb-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 14px;
}
.vb-search input::placeholder { color: var(--muted); }
.vb-search button {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); border: 0; color: white;
  display: grid; place-items: center;
}
.vb-search button:hover { background: var(--accent-2); }

.vb-burger { display: none; background: none; border: 0; }
.vb-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); margin: 4px 0; border-radius: 2px;
}

/* ---------- Hero ---------- */
.vb-hero {
  position: relative;
  min-height: 460px;
  display: flex; align-items: flex-end;
  padding: 80px 0 40px;
  overflow: hidden;
}
.vb-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.45);
  z-index: 0;
}
.vb-hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--bg) 100%);
}
.vb-hero__content { position: relative; z-index: 1; max-width: 720px; }
.vb-hero__badge {
  display: inline-block; padding: 4px 10px;
  background: var(--accent); color: white;
  border-radius: 4px; font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 16px;
}
.vb-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 12px; line-height: 1.1;
}
.vb-hero__meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; margin-bottom: 14px;
}
.vb-hero__meta .vb-rating { color: var(--gold); font-weight: 600; }
.vb-hero p {
  color: #c7cad4; margin: 0 0 22px; max-width: 600px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.vb-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; border: 0;
  transition: transform .15s, background .15s;
}
.vb-btn:hover { transform: translateY(-1px); }
.vb-btn--primary { background: var(--accent); color: white; }
.vb-btn--primary:hover { background: var(--accent-2); color: white; }
.vb-btn--ghost {
  background: rgba(255,255,255,.1); color: var(--text);
  border: 1px solid rgba(255,255,255,.15);
}

/* ---------- Sections ---------- */
.vb-section { padding: 36px 0; }
.vb-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.vb-section__head h2 {
  font-size: 20px; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.vb-section__head h2::before {
  content: ''; width: 4px; height: 22px;
  background: var(--accent); border-radius: 2px;
}
.vb-section__head a { color: var(--muted); font-size: 13px; }

/* ---------- Card grid ---------- */
.vb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}
.vb-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
  display: block; color: inherit;
}
.vb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  color: inherit;
}
.vb-card__poster {
  position: relative; aspect-ratio: 2/3;
  background: #0a0c11; overflow: hidden;
}
.vb-card__poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.vb-card:hover .vb-card__poster img { transform: scale(1.05); }
.vb-card__badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: white;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.vb-card__rating {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.7); color: var(--gold);
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.vb-card__type {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,.7); color: white;
  padding: 2px 6px; border-radius: 3px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .5px;
}
.vb-card__body { padding: 12px 14px; }
.vb-card__title {
  font-size: 14px; font-weight: 600; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.vb-card__meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Detail page ---------- */
.vb-detail__hero {
  position: relative; padding: 60px 0; overflow: hidden;
}
.vb-detail__bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; filter: brightness(.3); z-index: 0;
}
.vb-detail__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,15,20,.6) 0%, var(--bg) 100%);
}
.vb-detail__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 280px 1fr; gap: 36px;
}
.vb-detail__poster img {
  width: 100%; border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.vb-detail h1 { font-size: 36px; margin: 0 0 12px; }
.vb-detail__meta {
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
  color: var(--muted); font-size: 14px;
}
.vb-detail__meta .vb-rating { color: var(--gold); font-weight: 700; }
.vb-detail__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vb-chip {
  background: var(--bg-elev); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 999px; font-size: 12px;
  color: var(--text);
}
.vb-detail__overview { color: #c7cad4; max-width: 720px; margin-bottom: 24px; }
.vb-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.vb-detail__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; max-width: 720px; }
.vb-detail__facts dt { color: var(--muted); font-size: 13px; }
.vb-detail__facts dd { margin: 0 0 8px; font-size: 14px; }

/* ---------- Watch page ---------- */
.vb-watch { padding: 30px 0 60px; }
.vb-player {
  position: relative; aspect-ratio: 16/9; width: 100%;
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.vb-player iframe { width: 100%; height: 100%; border: 0; }
.vb-player__placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); text-align: center;
}
.vb-watch__bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.vb-source {
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text); padding: 8px 14px; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: background .15s;
}
.vb-source:hover { background: var(--bg-card); }
.vb-source.is-active {
  background: var(--accent); border-color: var(--accent); color: white;
}
.vb-episodes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px; margin-top: 12px;
}
.vb-episodes a {
  background: var(--bg-elev); border: 1px solid var(--line);
  text-align: center; padding: 8px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
}
.vb-episodes a:hover { background: var(--bg-card); }
.vb-episodes a.is-active {
  background: var(--accent); border-color: var(--accent); color: white;
}
.vb-season-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vb-season-tabs a {
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-elev); font-size: 13px; color: var(--muted);
}
.vb-season-tabs a.is-active { background: var(--accent); color: white; }

/* ---------- Footer ---------- */
.vb-footer {
  background: var(--bg-elev); border-top: 1px solid var(--line);
  margin-top: 60px; padding: 50px 0 20px;
  color: var(--muted); font-size: 14px;
}
.vb-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.vb-footer h4 { color: var(--text); font-size: 14px; margin: 0 0 14px; }
.vb-footer ul { list-style: none; padding: 0; margin: 0; }
.vb-footer li { margin-bottom: 8px; }
.vb-footer__genres { columns: 2; column-gap: 12px; }
.vb-footer__copy { color: var(--muted); margin-top: 14px; max-width: 320px; }
.vb-footer__bottom {
  border-top: 1px solid var(--line); padding-top: 20px;
  text-align: center; font-size: 13px;
}

/* ---------- Empty state ---------- */
.vb-empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.vb-empty h3 { color: var(--text); margin: 0 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .vb-detail__inner { grid-template-columns: 1fr; }
  .vb-detail__poster { max-width: 220px; }
  .vb-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .vb-nav, .vb-search { display: none; }
  .vb-burger { display: block; }
  .vb-header.is-open .vb-nav,
  .vb-header.is-open .vb-search {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-elev); padding: 16px 20px;
    flex-direction: column; align-items: stretch; gap: 14px;
    border-bottom: 1px solid var(--line);
  }
  .vb-header.is-open .vb-search { width: 100%; max-width: none; }
  .vb-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .vb-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
