:root {
    --bg: #000000;
    --panel: #101010;
    --panel-2: #171717;
    --line: #2a2a2a;
    --text: #f5f5f5;
    --muted: #9a9a9a;
    --faint: #6f6f6f;
    --yellow: #ffd400;
    --yellow-2: #ffe56a;
    --ink: #111111;
    --danger: #ff5d5d;
    --ok: #d6f25c;
    --header: 74px;
    --font: "Outfit", "Segoe UI", sans-serif;
    --display: "Oswald", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(255, 212, 0, 0.08), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
}
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: var(--yellow);
    color: var(--ink);
    padding: 8px 12px;
    z-index: 30;
    font-weight: 700;
}
.skip:focus { top: 12px; }

.header-inner,
.chips-inner,
.wrap {
    width: min(1240px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    border-top: 3px solid var(--yellow);
    border-bottom: 1px solid #1c1c1c;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: var(--header);
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}
.logo-mark {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='8,5 8,19 19,12' fill='%23111111'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: 0 0 22px rgba(255, 212, 0, 0.28);
}
.logo-type {
    font-family: var(--display);
    font-size: 28px;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}
.logo-type em {
    font-style: normal;
    color: var(--yellow);
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--ink); background: var(--yellow); }
.search {
    margin-left: auto;
    display: flex;
    width: min(420px, 34vw);
    background: #141414;
    border: 1px solid #2c2c2c;
    border-radius: 999px;
    overflow: hidden;
}
.search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    padding: 11px 16px;
}
.search input:focus { outline: none; }
.search button {
    border: 0;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
}
.search button:hover { background: var(--yellow-2); }
.age-pill {
    border: 1px solid var(--yellow);
    color: var(--yellow);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #2c2c2c;
    background: #111;
    padding: 0;
    cursor: pointer;
    place-items: center;
    gap: 4px;
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--yellow);
}

.chips {
    border-bottom: 1px solid #161616;
    background: #050505;
}
.chips-inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}
.chips-inner::-webkit-scrollbar { display: none; }
.chips a {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
}
.chips a:hover,
.chips a.is-active {
    color: var(--ink);
    background: var(--yellow);
    border-color: var(--yellow);
}

main.wrap { flex: 1; padding: 28px 0 72px; }

.listing-head,
.panel-head,
.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}
.listing-head { margin-bottom: 22px; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 0.95; }
h2 { font-size: 28px; }
.listing-head p,
.help,
.login-lead,
.age-fine,
.card-meta,
.watch-meta,
.starring,
.description,
.site-footer p { color: var(--muted); }
.listing-head p { margin: 8px 0 0; }
.listing-tools { text-align: right; }
.count { margin: 0 0 8px; color: var(--yellow); font-weight: 700; }
.sort-links { display: flex; gap: 8px; justify-content: flex-end; }
.sort-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}
.sort-links a.is-active,
.sort-links a:hover { color: var(--yellow); }

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 16px;
}
.card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.grid .card:hover { transform: translateY(-3px); }
.card:hover .meta-cat { color: var(--yellow-2); }
.thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    border: 1px solid #262626;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumb::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}
.thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%) scale(0.92);
    border-radius: 50%;
    background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='9,6 9,18 18,12' fill='%23111111'/%3E%3C/svg%3E") center / 22px no-repeat;
    opacity: 0;
    transition: opacity 0.16s ease, transform 0.16s ease;
}
.card:hover .thumb::after,
.card:focus-visible .thumb::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.card:hover .thumb { border-color: rgba(255, 212, 0, 0.7); }
.duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.78);
    color: var(--yellow);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}
.meta-cat { color: var(--yellow); font-weight: 700; }

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.pager-btn,
.pager-num {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #2e2e2e;
    text-decoration: none;
    font-weight: 700;
    padding: 0 14px;
    background: #121212;
}
a.pager-btn,
a.pager-num:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.pager-num.is-current { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.pager-btn.is-disabled,
.pager-gap { color: var(--faint); }
.pager-status {
    text-align: center;
    color: var(--muted);
    margin: 12px 0 0;
}

.empty {
    border: 1px dashed #333;
    border-radius: 18px;
    padding: 48px 24px;
    text-align: center;
    background: #0c0c0c;
}
.empty h1, .empty h2 { margin-bottom: 8px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--yellow);
    color: var(--ink);
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
}
.btn:hover { background: var(--yellow-2); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid #3a3a3a;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); background: transparent; }
.btn-block { width: 100%; }

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}
.player {
    background: #000;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    margin-bottom: 18px;
}
.player video { width: 100%; height: 100%; background: #000; display: block; }
.player-empty { position: relative; height: 100%; }
.player-empty img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.8); }
.player-empty p {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.78);
    color: var(--yellow);
    font-weight: 700;
}
.watch-main h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 10px; }
.watch-meta, .starring { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 8px; }
.watch-meta a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.description p { margin: 0 0 10px; }
.legal { max-width: 760px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { margin: 0 0 22px; color: var(--faint); font-size: 14px; }
.legal h2 { font-size: 22px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 8px 0 0; padding-left: 18px; }
.legal a { color: var(--yellow); white-space: nowrap; }
.related { display: flex; flex-direction: column; gap: 14px; }
.related h2 { font-size: 22px; margin-bottom: 4px; }
.related .card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.site-footer {
    border-top: 1px solid #1b1b1b;
    background: #050505;
    margin-top: auto;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr auto auto;
    gap: 24px;
    align-items: center;
    padding: 28px 0;
}
.site-footer strong {
    font-family: var(--display);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 22px;
}
.site-footer nav { display: flex; gap: 14px; }
.footer-inner nav a { color: var(--yellow); text-decoration: none; font-weight: 700; }
.copy { margin: 0; }
.legal-bar {
    border-top: 1px solid #161616;
    background: #070707;
}
.legal-bar nav {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 0;
    padding: 16px 0 18px;
}
.site-footer .legal-bar a {
    color: #c6c6c6;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 4px 12px;
}
.site-footer .legal-bar a:hover { color: var(--yellow); }
.legal-bar .sep { color: #5c5c5c; }

.age-body { display: block; background: #000; }
.age-screen, .login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.age-card, .login-card {
    width: min(460px, 100%);
    background: #0d0d0d;
    border: 1px solid rgba(255, 212, 0, 0.35);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 212, 0, 0.06);
}
.age-card h1, .login-card h1 { font-size: 58px; margin: 6px 0 10px; }
.age-card h1 em, .login-card h1 em { font-style: normal; color: var(--yellow); }
.age-kicker {
    margin: 14px 0 0;
    color: var(--yellow);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 12px;
}
.age-card p, .login-lead { margin-top: 0; }
.age-card form, .login-card { display: grid; gap: 12px; }
.age-fine { font-size: 13px; margin-bottom: 0; }

.admin-body { display: block; background: #000; }
.admin-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    background: #070707;
    border-right: 1px solid #1d1d1d;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-kicker {
    margin: 18px 8px 6px;
    color: var(--faint);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
}
.side-nav { display: grid; gap: 4px; }
.side-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 650;
    padding: 10px 12px;
    border-radius: 12px;
}
.side-nav a:hover,
.side-nav a.is-active { background: var(--yellow); color: var(--ink); }
.signout { margin-top: auto; }
.signout button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
}
.signout button:hover { color: var(--yellow); }
.admin-main { padding: 28px 28px 64px; }
.admin-top { margin-bottom: 22px; }
.admin-top h1 { font-size: 42px; }
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat, .panel {
    background: var(--panel);
    border: 1px solid #242424;
    border-radius: 18px;
    padding: 18px;
}
.panel { margin-bottom: 16px; }
.panel.narrow { max-width: 560px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat strong {
    display: block;
    margin-top: 6px;
    font-family: var(--display);
    font-size: 40px;
    color: var(--yellow);
    line-height: 1;
}
.panel-head { margin-bottom: 14px; }
.panel-head a { color: var(--yellow); font-weight: 800; text-decoration: none; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.data-table th {
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 0 10px 10px;
}
.data-table td {
    padding: 12px 10px;
    border-top: 1px solid #242424;
    vertical-align: middle;
}
.data-table a { color: white; font-weight: 700; text-decoration: none; }
.data-table a:hover { color: var(--yellow); }
.video-cell { display: flex; align-items: center; gap: 12px; }
.video-cell img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #000; }
.video-cell span { display: grid; gap: 2px; }
.video-cell small { color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.share-link { display: flex; gap: 8px; align-items: center; }
.share-link input {
    width: min(340px, 46vw);
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 13px;
}
.share-link .btn { padding: 8px 14px; white-space: nowrap; }
.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
}
.status-live { background: var(--yellow); color: var(--ink); }
.status-draft { background: #2a2a2a; color: var(--muted); }
.row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.row-actions form { margin: 0; }
.row-actions button {
    background: transparent;
    border: 0;
    color: var(--danger);
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}
.form { display: grid; gap: 14px; }
.inline-form { grid-template-columns: minmax(0, 360px) auto; align-items: end; }
.field { display: grid; gap: 6px; }
.field label, .login-card label, .checkline { font-weight: 700; }
.form input[type="text"],
.form input[type="password"],
.form input[type="url"],
.form input[type="number"],
.form input[type="file"],
.form textarea,
.form select,
.login-card input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px 12px;
}
.form textarea { resize: vertical; }
.form .share-link input { width: auto; flex: 1; min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkline { display: flex; align-items: center; gap: 8px; }
.checkline input { accent-color: var(--yellow); width: 16px; height: 16px; }
.help { margin: 0; font-size: 13px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-preview {
    width: 220px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #333;
}
.alert, .error-list {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 14px;
}
.alert-error, .error-list {
    background: rgba(255, 93, 93, 0.1);
    color: #ffd0d0;
    border: 1px solid rgba(255, 93, 93, 0.35);
}
.alert-ok {
    background: rgba(214, 242, 92, 0.08);
    color: var(--ok);
    border: 1px solid rgba(214, 242, 92, 0.3);
}
.error-list { display: grid; gap: 4px; }

@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .watch-layout, .footer-inner, .admin-shell, .stats { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid #1d1d1d; }
    .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .signout { margin-top: 8px; }
}
@media (max-width: 860px) {
    .nav-toggle { display: flex; flex-direction: column; justify-content: center; margin-left: auto; }
    .site-nav, .header-inner .search { display: none; }
    body.nav-open .site-nav,
    body.nav-open .header-inner .search { display: flex; }
    .header-inner { flex-wrap: wrap; padding: 10px 0; }
    .site-nav, .header-inner .search { width: 100%; max-width: none; margin-left: 0; }
    .site-nav { flex-direction: column; align-items: stretch; }
    .age-pill { margin-left: 8px; }
    .listing-head, .admin-top, .inline-form { display: grid; justify-content: stretch; }
    .listing-tools, .sort-links { text-align: left; justify-content: flex-start; }
}
@media (max-width: 700px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
    .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
