/* VidPlay — BRANDED CARDS layout.
   Premium dark branded background (subtle accent glow), dark header band
   with play-mark logo chip + accent line, red-gradient section bars,
   white episode cards, dark footer band. Accent colour comes from the
   panel (Layout settings) via --accent.
   The same file also styles the panel (light, plain) — the panel
   classes below are unchanged. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
/* Premium branded page background — frontend pages and the panel login
   page only. The logged-in panel has .panel but no .login-box, so it
   keeps the plain white background above. Browsers without :has() or
   color-mix simply keep the white background (safe fallback). */
body:not(:has(.panel)),
body:has(.login-box) {
  background-color: #0f1116;
  background-image:
    radial-gradient(1000px 520px at 50% -120px, color-mix(in srgb, var(--accent, #e50914) 30%, transparent), transparent 70%),
    radial-gradient(820px 420px at 88% -60px, color-mix(in srgb, var(--accent, #e50914) 16%, transparent), transparent 70%),
    linear-gradient(180deg, #15171e 0%, #0e1013 100%);
  background-attachment: fixed;
  color: #e8e9ec;
}
a { color: #0b57d0; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 12px; }

/* ---- header: dark band, play-mark logo chip, accent line ---- */
.site-header { background: #14161c; border-bottom: 3px solid var(--accent, #e50914); padding: 12px 0; }
.header-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { display: inline-block; position: relative; padding-left: 48px; font-size: 24px; font-weight: 800; color: #fff; line-height: 1.15; }
.logo:hover { text-decoration: none; }
.logo::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 9px;
  background-color: var(--accent, #e50914);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 20px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.logo span { display: block; font-size: 11px; font-weight: 400; letter-spacing: 1px; color: rgba(255,255,255,.6); }
.main-nav { display: flex; gap: 14px; }
.main-nav a { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 700; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.search { margin-left: auto; display: flex; gap: 6px; }
.search input {
  width: 210px; max-width: 55vw; padding: 6px 10px; border-radius: 4px;
  border: 1px solid #3a3f4a; background: #23262e; color: #eee; font-size: 14px; outline: none;
}
.search input::placeholder { color: #8a8f9a; }
.search input:focus { border-color: var(--accent, #e50914); }
.search button {
  padding: 6px 14px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--accent, #e50914); color: #fff; font-weight: 700; font-size: 14px;
}

/* ---- latest updates / category listing (branded cards) ---- */
.updates-head h1 { display: inline-block; font-size: 30px; font-weight: 800; color: #fff; margin: 22px 0 12px; border-bottom: 3px solid var(--accent, #e50914); padding-bottom: 6px; }
.cat-bar {
  background: var(--accent, #e50914);
  background: linear-gradient(90deg, var(--accent, #e50914), color-mix(in srgb, var(--accent, #e50914) 62%, #000));
  color: #fff; text-align: center;
  font-size: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 10px; margin: 0 0 12px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
/* ---- two-column card grid: INDIAN + PARTS side by side (dramavideo.se) ----
   Two equal cards (1fr 1fr) in one row; on narrow screens they stack
   full-width, INDIAN first, then PARTS. */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.cat-col { min-width: 0; }
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: 1fr; }
}
.cat-head {
  font-size: 14px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: #f2f3f5; border-bottom: 2px solid var(--accent, #e50914);
  padding-bottom: 4px; margin: 22px 0 12px;
}
.ep-list { margin: 0; padding: 0; }
.ep-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e6e7eb; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  padding: 14px 16px; margin-bottom: 10px;
}
.ep-item-main { flex: 1; min-width: 0; }
.ep-item-main a { display: block; font-size: 16px; font-weight: 700; color: #1d2026; }
.ep-item-main a:hover { color: var(--accent, #e50914); text-decoration: none; }
.ep-item-time { display: block; color: #888; font-size: 13px; margin-top: 2px; }
.ep-item-actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }
.view-btn {
  background: var(--accent, #e50914); color: #fff; border: 1px solid var(--accent, #e50914);
  border-radius: 5px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.view-btn:hover { filter: brightness(.92); color: #fff; text-decoration: none; }
.copy-iframe {
  background: #fff; color: var(--accent, #e50914); border: 1px solid var(--accent, #e50914);
  border-radius: 5px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.copy-iframe:hover { background: var(--accent, #e50914); color: #fff; text-decoration: none; }
.empty { border: 1px dashed rgba(255,255,255,.28); border-radius: 8px; padding: 24px; text-align: center; color: #c6c9d1; margin: 14px 0; background: rgba(255,255,255,.04); }
.empty a { color: var(--accent, #e50914); font-weight: 700; }

/* ---- drama page ---- */
.drama-head { margin: 20px 0 4px; }
.drama-head .cat { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent, #e50914); }
.drama-head h1 { margin: 2px 0 6px; font-size: 22px; color: #fff; }
.drama-head p { color: #c6c9d1; margin: 4px 0; max-width: 640px; }
.drama-head .drama-count { color: #9aa0a6; font-size: 13px; }

/* ---- watch page (player itself is unchanged) ---- */
.watch-head { margin: 20px 0 12px; }
.watch-head h1 { margin: 0 0 4px; font-size: 20px; color: #fff; }
.watch-head .crumb { color: #9aa0a6; font-size: 13px; }
.watch-head .crumb a { color: var(--accent, #e50914); font-weight: 700; }
.player-wrap { background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.player-wrap iframe { display: block; width: 100%; height: 380px; border: 0; background: #000; }
.watch-nav { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 4px; flex-wrap: wrap; }
.watch-nav a { font-size: 14px; font-weight: 700; color: #e8e9ec; }
.watch-nav a:hover { color: var(--accent, #e50914); }
.watch-nav a.disabled { color: #55595f; pointer-events: none; }

/* ---- footer: dark band ---- */
.site-footer { background: #0c0d10; border-top: 3px solid var(--accent, #e50914); margin-top: 34px; padding: 18px 0 28px; color: #9aa0a6; font-size: 13px; }
.foot-name { color: #fff; font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.site-footer p { margin: 4px 0; }

/* ---- panel login page: branded ---- */
body:has(.login-box) .login-box .panel-card {
  border-radius: 14px; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 55px rgba(0,0,0,.5);
  padding: 28px 26px;
}
body:has(.login-box) .login-box h2 {
  position: relative; padding-left: 52px; min-height: 40px;
  display: flex; align-items: center; font-size: 22px;
}
body:has(.login-box) .login-box h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 10px;
  background-color: var(--accent, #e50914);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 22px 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* ---- panel (same classes as before, light restyle) ---- */
.panel { max-width: 1080px; }
.panel-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; }
.panel-card h2 { margin: 0 0 4px; font-size: 18px; }
.panel-card .hint { color: #777; font-size: 13.5px; margin: 0 0 14px; }
/* ---- panel: left sidebar navigation ---- */
.panel-body { display: flex; gap: 18px; align-items: flex-start; }
.panel-tabs { display: flex; flex-direction: column; gap: 6px; flex: 0 0 200px; margin: 0; }
.panel-tabs a { display: block; padding: 9px 14px; border-radius: 8px; background: #f1f1f1; border: 1px solid #ddd; font-weight: 700; font-size: 14px; color: #444; }
.panel-tabs a:hover { text-decoration: none; }
.panel-tabs a.on { background: var(--accent, #e50914); border-color: var(--accent, #e50914); color: #fff; }
.panel-main { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .panel-body { flex-direction: column; }
  .panel-tabs { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; width: 100%; }
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: #f8f8f8; border: 1px solid #ddd; border-radius: 6px; padding: 14px; }
.stat b { display: block; font-size: 26px; color: #222; }
.stat span { color: #777; font-size: 13px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 4px; color: #333; }
.field input[type=text], .field input[type=number], .field input[type=password], .field input[type=date], .field select, .field textarea {
  width: 100%; padding: 9px 11px; border-radius: 5px; border: 1px solid #bbb;
  background: #fff; color: #222; font-size: 14px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent, #e50914); }
.field textarea { min-height: 110px; font-family: monospace; font-size: 13px; }
.field .hint { color: #888; font-size: 12.5px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; margin-bottom: 10px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent, #e50914); }
.btn {
  display: inline-block; background: var(--accent, #e50914); color: #fff; border: 0; cursor: pointer;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: #e8e8e8; color: #222; }
.btn.danger { background: #b3261e; }
.btn.small { padding: 6px 13px; font-size: 13px; }
.msg-ok { background: #e6f4ea; border: 1px solid #a3d9a5; color: #137333; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.msg-err { background: #fce8e6; border: 1px solid #f5a9a2; color: #a50e0e; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
table.tbl th { color: #777; font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.iframe-box { width: 200px; max-width: 28vw; padding: 6px 8px; border-radius: 5px; border: 1px solid #bbb; background: #f8f8f8; color: #444; font-family: monospace; font-size: 12px; }
.color-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eee; }
.color-row:last-child { border-bottom: 0; }
.color-row label { flex: 1; font-weight: 600; text-transform: capitalize; }
.color-row input[type=color] { width: 46px; height: 32px; border: 1px solid #bbb; background: #fff; border-radius: 6px; padding: 2px; cursor: pointer; }
.color-row code { color: #888; font-size: 13px; }
.login-box { max-width: 420px; margin: 60px auto; }
.preview { border: 1px dashed #bbb; border-radius: 6px; padding: 16px; margin-top: 16px; background: #fafafa; }
.preview .pv-head { font-size: 20px; font-weight: 800; }
.preview .pv-head span { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent, #e50914); }
.preview .pv-hero { margin-top: 12px; border-radius: 6px; padding: 18px; background: #f1f1f1; }
.preview .pv-hero b { font-size: 18px; }
.preview .pv-hero p { color: #555; font-size: 13px; margin: 6px 0 0; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; }
  .ep-item { flex-wrap: wrap; }
  .ep-item-actions { width: 100%; }
}
