@font-face {
    font-family: "Netflix Sans";
    src: url("/assets/fonts/NetflixSans-Regular.ttf") format("truetype");
    font-weight: 400;
}

@font-face {
    font-family: "Netflix Sans";
    src: url("/assets/fonts/NetflixSans-Medium.ttf") format("truetype");
    font-weight: 500;
}

:root {
    color-scheme: dark;
    --cw-bg: #06080d;
    --cw-panel: rgba(11, 13, 20, 0.82);
    --cw-panel-strong: rgba(17, 20, 30, 0.94);
    --cw-border: rgba(255, 255, 255, 0.1);
    --cw-text: rgba(255, 255, 255, 0.96);
    --cw-text-muted: rgba(255, 255, 255, 0.66);
    --cw-accent: #e50914;
    --cw-accent-soft: rgba(229, 9, 20, 0.22);
    --cw-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top, rgba(229, 9, 20, 0.12), transparent 34%),
        linear-gradient(180deg, #0a0d15 0%, #05070b 100%);
    color: var(--cw-text);
    font-family: "Netflix Sans", Arial, sans-serif;
}

body {
    padding: 28px;
}

.cw-shell {
    width: min(1680px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.cw-hero,
.cw-card {
    border: 1px solid var(--cw-border);
    border-radius: 28px;
    background: var(--cw-panel);
    box-shadow: var(--cw-shadow);
    backdrop-filter: blur(24px);
}

.cw-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
}

.cw-kicker,
.cw-card-kicker {
    margin: 0 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.cw-title,
.cw-card-title {
    margin: 0;
    font-weight: 500;
    line-height: 1.08;
}

.cw-title {
    font-size: clamp(2rem, 4vw, 3.8rem);
    max-width: 880px;
}

.cw-card-title {
    font-size: clamp(1.28rem, 2vw, 1.72rem);
}

.cw-lead,
.cw-card-copy {
    margin: 14px 0 0;
    max-width: 900px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--cw-text-muted);
}

.cw-hero-actions {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cw-link-button,
.cw-secondary-button,
.cw-preset-button {
    border: 1px solid var(--cw-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--cw-text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cw-link-button,
.cw-secondary-button {
    padding: 13px 18px;
}

.cw-preset-button {
    padding: 14px 18px;
    min-height: 48px;
}

.cw-link-button:hover,
.cw-secondary-button:hover,
.cw-preset-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.cw-preset-button.is-active {
    border-color: rgba(229, 9, 20, 0.48);
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.88), rgba(186, 8, 18, 0.92));
}

.cw-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 24px;
}

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

.cw-card {
    padding: 24px;
}

.cw-card-head {
    margin-bottom: 18px;
}

.cw-button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cw-field-stack {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.cw-field {
    display: grid;
    gap: 8px;
}

.cw-field span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.62);
}

.cw-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--cw-text);
    font: inherit;
}

.cw-player-frame {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.cw-player-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.cw-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.cw-empty-state {
    padding: 26px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    color: var(--cw-text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.cw-watch-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.cw-watch-artwork {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #111 center center / cover no-repeat;
}

.cw-watch-artwork::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.cw-watch-copy {
    display: grid;
    gap: 6px;
}

.cw-watch-title {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 500;
}

.cw-watch-episode,
.cw-watch-time {
    margin: 0;
    font-size: 0.92rem;
    color: var(--cw-text-muted);
}

.cw-watch-progress {
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.cw-watch-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cw-accent), #ff5a5f);
}

.cw-watch-actions {
    display: flex;
    gap: 10px;
}

.cw-watch-action {
    flex: 1;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--cw-text);
    font: inherit;
    cursor: pointer;
}

.cw-watch-action.is-primary {
    border-color: transparent;
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.96), rgba(186, 8, 18, 0.96));
}

.cw-code-block,
.cw-event-log {
    min-height: 260px;
    max-height: 420px;
    overflow: auto;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: var(--cw-panel-strong);
}

.cw-code-block {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.92rem;
    line-height: 1.55;
}

.cw-event-log {
    display: grid;
    gap: 10px;
    align-content: start;
}

.cw-log-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.cw-log-item strong {
    color: var(--cw-text);
}

code {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 1120px) {
    .cw-grid,
    .cw-grid-bottom,
    .cw-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .cw-hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    body {
        padding: 16px;
    }

    .cw-card,
    .cw-hero {
        padding: 18px;
        border-radius: 22px;
    }

    .cw-list {
        grid-template-columns: 1fr;
    }
}
