:root {
  --bg: #0f0f0f;
  --bg2: #171717;
  --bg3: #222;
  --line: #2b2b2b;
  --text: #ececec;
  --muted: #9b9b9b;
  --accent: #ff6a00;
  --accent-hover: #ff8124;
  --red: #e2232a;
  --radius: 6px;
  --max: 1440px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.4 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg.i { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- Header ---------- */
.hdr { background: #000; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.hdr-top { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.burger { display: none; background: none; border: 0; padding: 6px; }
.logo { flex: none; display: block; }
.logo img { height: 40px; width: auto; display: block; }
.search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.search input {
  flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); border-right: 0;
  color: var(--text); padding: 9px 14px; border-radius: 4px 0 0 4px; outline: none; font-size: 14px;
}
.search input:focus { border-color: #444; }
.search button { background: var(--bg3); border: 1px solid var(--line); border-radius: 0 4px 4px 0; padding: 0 16px; display: grid; place-items: center; }
.search button:hover { background: #2c2c2c; }
.hdr-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg2);
  padding: 7px 14px; border-radius: 4px; font-weight: 600; font-size: 13px; white-space: nowrap;
}
.btn:hover { background: var(--bg3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #000; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--bg2); }
.search-toggle { display: none; }

.nav { max-width: var(--max); margin: 0 auto; display: flex; gap: 2px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 12px; font-weight: 600; color: #cfcfcf; white-space: nowrap; border-bottom: 3px solid transparent; font-size: 13.5px; }
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; border-bottom-color: var(--accent); }
.nav .prem { color: var(--accent); }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 18px 16px 40px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.sec-head h1, .sec-head h2 { font-size: 20px; margin: 0; font-weight: 700; }
.sec-head h1 small { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 4px; background: var(--bg2); color: #cfcfcf; font-weight: 600; font-size: 13px; }
.tabs a:hover { background: var(--bg3); }
.tabs a.on { background: var(--accent); color: #000; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips a { padding: 6px 12px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line); white-space: nowrap; font-size: 13px; color: #d5d5d5; }
.chips a:hover, .chips a.on { border-color: var(--accent); color: #fff; }

/* ---------- Video grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 14px; }
.card { display: block; min-width: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #1c1412; }
.thumb canvas { width: 100%; height: 100%; display: block; }
.thumb .dur, .thumb .badge {
  position: absolute; font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: rgba(0,0,0,.78);
}
.thumb .dur { right: 6px; bottom: 6px; }
.thumb .badge { left: 6px; top: 6px; color: var(--accent); }
.thumb .badge.prem { left: auto; right: 6px; background: var(--accent); color: #000; }
.thumb .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; }
.card:hover .prog { width: 100%; transition: width 2.2s linear; }
.thumb .wl { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.7); border-radius: 3px; padding: 3px; opacity: 0; transition: opacity .15s; display: grid; }
.card:hover .wl { opacity: 1; }
.card:hover .thumb .badge.prem ~ .wl { top: 30px; }
.card h3 { font-size: 14px; font-weight: 600; margin: 8px 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { color: var(--accent); }
.card .m { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.card .m .ch { display: inline-flex; align-items: center; gap: 4px; color: #bdbdbd; }
.card .m .ok { width: 12px; height: 12px; fill: var(--accent); }
.card .m .up { color: #6fbf73; }
.card .m .up svg { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 34px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 12px; border-radius: 4px; background: var(--bg2); font-weight: 700; }
.pager a:hover { background: var(--bg3); }
.pager .on { background: var(--accent); color: #000; }
.pager span.dots { background: none; }

/* ---------- Ads ---------- */
.ad { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin: 26px 0; cursor: pointer;
  background: linear-gradient(110deg, #2a0d14, #3a1420 45%, #1a0a10); }
.ad::before { content: "Anzeige"; position: absolute; right: 8px; top: 6px; font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: .5px; }
.ad .big { font-size: 22px; font-weight: 800; line-height: 1.15; }
.ad .big em { color: #ff4f7a; font-style: normal; }
.ad p { margin: 4px 0 0; color: #d9b7c0; }
.ad .cta { margin-left: auto; background: #ff4f7a; color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 4px; white-space: nowrap; }
.ad .dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc6f; display: inline-block; box-shadow: 0 0 8px #3ddc6f; margin-right: 6px; }
.ad.side { flex-direction: column; align-items: flex-start; margin: 0 0 16px; padding: 18px; }
.ad.side .cta { margin: 10px 0 0; }

/* ---------- Category / star tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile .thumb { aspect-ratio: 4 / 3; }
.tile .name { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-weight: 700; font-size: 15px; }
.tile .cnt { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.stars { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.star { text-align: center; }
.star .av { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--bg3); }
.star:hover .av { border-color: var(--accent); }
.star .av canvas { width: 100%; height: 100%; display: block; }
.star b { display: block; margin-top: 8px; }
.star .rank { color: var(--muted); font-size: 12px; }

/* ---------- Watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; user-select: none; }
.player canvas.poster { width: 100%; height: 100%; display: block; }
.player .bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(28px) brightness(.45); }
.player .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player .bigplay {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 84px; height: 84px; border-radius: 50%;
  background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.85); display: grid; place-items: center;
}
.player .bigplay:hover { background: var(--accent); border-color: var(--accent); }
.player .bigplay svg { width: 38px; height: 38px; margin-left: 5px; }
.player .loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(0,0,0,.55); font-weight: 700; }
.spinner { width: 54px; height: 54px; border: 5px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player .msg {
  position: absolute; left: 50%; top: 16px; translate: -50% 0; background: rgba(0,0,0,.85); border: 1px solid var(--accent); padding: 10px 16px;
  border-radius: 6px; font-weight: 800; font-size: 16px; white-space: nowrap; z-index: 2; box-shadow: 0 6px 24px rgba(0,0,0,.5); animation: pop .35s ease-out;
}
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.ctrls {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85));
  display: flex; align-items: center; gap: 12px; transition: opacity .25s;
}
.player.playing:not(:hover) .ctrls { opacity: 0; }
.ctrls button { background: none; border: 0; padding: 2px; display: grid; }
.ctrls button svg { width: 22px; height: 22px; }
.ctrls .time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctrls .bar { flex: 1; height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; position: relative; cursor: pointer; }
.ctrls .bar .buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.35); border-radius: 3px; }
.ctrls .bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.ctrls .q { font-size: 12px; font-weight: 800; background: var(--accent); color: #000; padding: 1px 5px; border-radius: 3px; }

.v-title { font-size: 21px; margin: 14px 0 8px; line-height: 1.3; }
.v-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.v-stats { color: var(--muted); display: flex; gap: 14px; align-items: center; }
.v-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.v-acts .btn.on { color: var(--accent); border-color: var(--accent); }
.rate-bar { height: 3px; background: #555; border-radius: 2px; overflow: hidden; margin-top: 4px; }
.rate-bar i { display: block; height: 100%; background: #6fbf73; }
.uploader { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.uploader .av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; }
.uploader .av canvas { width: 100%; height: 100%; display: block; }
.uploader .who b { display: flex; align-items: center; gap: 4px; }
.uploader .who b svg { width: 14px; height: 14px; fill: var(--accent); }
.uploader .who span { color: var(--muted); font-size: 12.5px; }
.uploader .btn { margin-left: auto; }
.meta-rows { padding: 12px 0; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.meta-rows > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meta-rows .lbl { color: var(--muted); min-width: 92px; }
.pill { background: var(--bg2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; font-size: 12.5px; }
.pill:hover { border-color: var(--accent); }

.comments h2 { font-size: 17px; margin: 22px 0 12px; }
.c-new { display: flex; gap: 10px; margin-bottom: 18px; }
.c-new input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 10px 12px; }
.cmt { display: flex; gap: 12px; padding: 10px 0; }
.cmt .av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #000; }
.cmt b { font-size: 13px; }
.cmt time { color: var(--muted); font-size: 12px; margin-left: 6px; }
.cmt p { margin: 3px 0 4px; }
.cmt .cm-act { color: var(--muted); font-size: 12px; display: flex; gap: 14px; }
.cmt .cm-act button { background: none; border: 0; padding: 0; color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.cmt .cm-act svg { width: 13px; height: 13px; }

.side h2 { font-size: 16px; margin: 0 0 12px; }
.side-list { display: grid; gap: 12px; }
.side-list .card { display: grid; grid-template-columns: 168px 1fr; gap: 0 10px; align-content: start; }
.side-list .card .thumb { grid-row: span 3; }
.side-list .card h3 { margin-top: 0; font-size: 13px; }
.side-list .card .m { flex-wrap: wrap; gap: 2px 8px; font-size: 12px; }

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--line); background: #000; margin-top: 30px; }
.ftr-in { max-width: var(--max); margin: 0 auto; padding: 28px 16px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.ftr img { height: 30px; width: auto; }
.ftr p { color: var(--muted); font-size: 12.5px; }
.ftr h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: #bbb; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ftr li a { color: var(--muted); font-size: 13px; }
.ftr li a:hover { color: #fff; }
.ftr-bot { border-top: 1px solid var(--line); text-align: center; color: #777; font-size: 12px; padding: 14px; }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; padding: 16px; }
.dlg { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; width: min(520px, 100%); padding: 26px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); max-height: calc(100vh - 32px); overflow: auto; }
.dlg img.logo-img { height: 40px; max-width: 100%; object-fit: contain; margin-bottom: 14px; }
.dlg h2 { margin: 6px 0 10px; font-size: 21px; }
.dlg p { color: #c9c9c9; margin: 0 0 12px; }
.dlg .gag-text { white-space: pre-line; } /* keep \n line breaks from GAGS texts */
.dlg small { color: var(--muted); display: block; font-size: 12px; margin-top: 14px; }
.dlg .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.dlg .row .btn { padding: 11px 22px; font-size: 14px; }
.dlg .gag-media { width: 100%; max-height: 300px; object-fit: contain; border-radius: 6px; background: #000; margin: 4px 0 12px; display: block; }
.age .badge18 { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--red); color: var(--red); font-weight: 900; font-size: 18px; }

.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 760px; margin: 0 auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; gap: 16px; align-items: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.cookie p { margin: 0; color: #c9c9c9; font-size: 13px; flex: 1; }
.cookie a { color: var(--accent); }
.cookie .row { display: flex; gap: 8px; flex: none; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; background: #fff; color: #000; font-weight: 600; padding: 10px 16px; border-radius: 6px; z-index: 120; box-shadow: 0 8px 30px rgba(0,0,0,.5); animation: pop .25s ease-out; max-width: calc(100vw - 32px); }

.drawer { position: fixed; inset: 0 auto 0 0; width: 270px; background: var(--bg2); z-index: 110; padding: 16px; overflow: auto; transform: translateX(-100%); transition: transform .2s; }
.drawer.open { transform: none; }
.drawer a { display: block; padding: 10px 8px; border-radius: 4px; font-weight: 600; }
.drawer a:hover { background: var(--bg3); }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 105; }

.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty img { max-width: 260px; width: 100%; border-radius: 8px; margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .watch { grid-template-columns: 1fr; }
  .side-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .side-list .card { display: block; }
  .side-list .card h3 { margin-top: 8px; }
  .ad.side { display: none; }
}
@media (max-width: 860px) {
  .hdr-actions .btn.hide-m { display: none; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .ftr-in > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .burger { display: grid; }
  .logo img { height: 28px; }
  .hdr-top { gap: 8px; padding: 8px 12px; }
  .search { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px 12px; background: #000; max-width: none; border-bottom: 1px solid var(--line); }
  .hdr.s-open .search { display: flex; }
  .search-toggle { display: grid; background: none; border: 0; padding: 6px; }
  .hdr-actions { margin-left: auto; }
  .hdr-actions .btn { padding: 6px 10px; }
  .nav { display: none; }
  main { padding: 14px 12px 30px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .card h3 { font-size: 13px; }
  .card .m { font-size: 11.5px; gap: 6px; }
  .card .m .hide-xs { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad { flex-direction: column; align-items: flex-start; }
  .ad .cta { margin: 6px 0 0; }
  .ad .big { font-size: 18px; }
  .cookie { flex-direction: column; align-items: stretch; }
  .cookie .row .btn { flex: 1; justify-content: center; }
  .v-title { font-size: 17px; }
  .player .bigplay { width: 64px; height: 64px; }
  .player .msg { font-size: 13px; top: 10px; padding: 7px 12px; }
  .ctrls .hide-xs { display: none; }
  main.watch-main { padding-left: 0; padding-right: 0; padding-top: 0; }
  main.watch-main .player { border-radius: 0; }
  main.watch-main .watch > div { min-width: 0; }
  main.watch-main .info-pad, main.watch-main .side { padding: 0 12px; }
}
@media (max-width: 380px) {
  .hdr-actions .btn.primary { display: none; }
}
