:root {
    --page-bg: #070707;
    --panel-bg: #1d1d1f;
    --panel-soft: #2b2b2e;
    --text: #f3f3f3;
    --muted: #b9b9b9;
    --gold: #f1a208;
    --red: #d91e18;
}

body.site-body {
    background: var(--page-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-shell {
    max-width: 1560px;
}

.site-nav {
    background: #111;
    border-bottom: 3px solid var(--gold);
}

.navbar-brand {
    font-weight: 800;
    color: var(--gold) !important;
}

.site-main {
    padding: 18px 0;
}

.content-band,
.side-panel,
.auth-panel,
.movie-detail {
    background: var(--panel-bg);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
}

.section-title {
    align-items: center;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
}

.section-title h1,
.section-title h2 {
    font-size: 1.35rem;
    margin: 0;
}

.section-title a,
.side-list a,
.year-grid a,
.link-grid a {
    color: var(--text);
    text-decoration: none;
}

.movie-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.movie-card {
    min-width: 0;
}

.movie-poster {
    aspect-ratio: 2 / 3;
    background: #111;
    border-radius: 6px;
    display: block;
    overflow: hidden;
    position: relative;
}

.movie-poster img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.movie-quality {
    background: var(--red);
    border-radius: 0 0 0 6px;
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    padding: 4px 7px;
    position: absolute;
    right: 0;
    top: 0;
}

.movie-card h3 {
    font-size: .95rem;
    line-height: 1.35;
    margin: 8px 0 4px;
}

.movie-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.movie-card p,
.movie-meta,
.site-footer {
    color: var(--muted);
}

.side-panel h2 {
    background: linear-gradient(#c88602, var(--gold));
    border-radius: 6px 6px 0 0;
    color: #fff;
    font-size: 1rem;
    margin: -16px -16px 12px;
    padding: 10px 14px;
}

.side-list {
    display: grid;
    gap: 8px;
}

.year-grid,
.link-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.year-grid a,
.link-grid a {
    background: var(--panel-soft);
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
}

.ad img {
    border-radius: 6px;
    height: auto;
    max-width: 100%;
}

.ad-band {
    text-align: center;
}

.side-ad-panel {
    display: grid;
    gap: 10px;
}

.side-ad-panel .ad,
.side-ad-panel .ad-image {
    display: block;
    text-align: center;
}

.side-ad-panel img {
    display: block;
    margin: 0 auto;
    width: 100%;
}

.movie-detail h1 {
    font-size: 1.5rem;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.movie-meta span {
    background: var(--panel-soft);
    border-radius: 999px;
    padding: 4px 10px;
}

.movie-showcase {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    margin-bottom: 16px;
}

.movie-cover {
    align-self: start;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
}

.movie-cover img {
    aspect-ratio: 2 / 3;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.movie-trailer {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    min-height: 100%;
    overflow: hidden;
}

.movie-trailer .section-title {
    background: var(--panel-soft);
    margin: 0;
    padding: 10px 12px;
}

.movie-trailer .section-title h2 {
    font-size: 1rem;
}

.movie-trailer iframe {
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    width: 100%;
}

.trailer-empty {
    align-items: center;
    color: var(--muted);
    display: flex;
    justify-content: center;
    min-height: 260px;
}

.player-shell {
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid #333;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.movie-player,
.preroll-video,
.movie-frame-holder,
.movie-frame-holder iframe {
    background: #000;
    height: 100%;
    width: 100%;
}

.movie-player,
.preroll-video {
    object-fit: contain;
}

.movie-frame-holder {
    display: none;
}

.movie-frame-holder iframe {
    border: 0;
    display: block;
}

.play-overlay,
.preroll-skip,
.preroll-link {
    background: var(--gold);
    border: 0;
    border-radius: 6px;
    color: #111;
    font-weight: 800;
    padding: 10px 18px;
}

.play-overlay {
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.preroll-layer {
    background: #000;
    inset: 0;
    position: absolute;
    z-index: 4;
}

.preroll-actions {
    display: grid;
    gap: 8px;
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 5;
}

.preroll-skip {
    background: rgba(0, 0, 0, .72);
    color: #fff;
}

.preroll-skip.enabled {
    background: var(--red);
    cursor: pointer;
}

.preroll-link {
    background: var(--red);
    color: #fff;
}

.detail-body {
    color: #e8e8e8;
    line-height: 1.75;
}

.form-stack {
    display: grid;
    gap: 12px;
}

.auth-panel {
    margin: 0 auto;
    max-width: 460px;
}

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

.tv-item {
    background: var(--panel-soft);
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: 8px;
    padding: 12px;
    text-align: center;
    text-decoration: none;
}

.tv-item img {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    width: 100%;
}

.empty-state,
.empty-player {
    align-items: center;
    color: var(--muted);
    display: flex;
    justify-content: center;
    min-height: 180px;
}

.site-footer {
    border-top: 1px solid #222;
    padding: 18px 0;
}

@media (max-width: 767.98px) {
    .site-main {
        padding: 10px 0;
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .movie-showcase {
        grid-template-columns: 1fr;
    }

    .movie-cover {
        margin: 0 auto;
        max-width: 240px;
        width: 70%;
    }

    .content-band,
    .movie-detail,
    .auth-panel {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }
}
