/* v1.0.0 */

:root {
    color-scheme: dark;
    --bg: #08090d;
    --panel: #12141b;
    --panel-soft: #191c25;
    --text: #f4f1ea;
    --muted: #a9a49a;
    --accent: #f4a340;
    --accent-strong: #ffbd66;
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(244, 163, 64, 0.15), transparent 34rem),
        linear-gradient(180deg, #10121a 0%, var(--bg) 24rem);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header,
.site-footer,
.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.brand,
.site-nav a {
    text-decoration: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px var(--bg);
}

.site-nav a {
    color: var(--muted);
    font-size: 0.95rem;
}

.page {
    padding: 28px 0 56px;
}

.hero {
    max-width: 820px;
    padding: 72px 0 52px;
}

.hero h1,
.section-header h1,
.movie-summary h1 {
    margin: 0;
    font-size: clamp(2.4rem, 8vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-copy,
.overview {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.1rem;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.search-form {
    position: relative;
    display: flex;
    gap: 10px;
    width: min(720px, 100%);
    margin-top: 28px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.search-form.compact {
    margin-top: 18px;
}

.search-form input,
.search-form button {
    border: 0;
    border-radius: 999px;
    font: inherit;
}

.search-form input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
    background: transparent;
    color: var(--text);
    outline: none;
}

.search-form button {
    padding: 14px 22px;
    background: var(--accent);
    color: #160d03;
    cursor: pointer;
    font-weight: 800;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 6px;
    max-height: min(420px, 58vh);
    overflow-y: auto;
    padding: 10px;
    background: rgba(18, 20, 27, 0.98);
    border: 1px solid rgba(244, 163, 64, 0.24);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
}

.search-suggestions[hidden] {
    display: none;
}

.suggestion-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    color: var(--text);
    text-decoration: none;
    border-radius: 16px;
    transition: background 140ms ease, transform 140ms ease;
}

.suggestion-item:hover,
.suggestion-item:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    outline: none;
    transform: translateY(-1px);
}

.suggestion-item img {
    width: 44px;
    height: 62px;
    border-radius: 8px;
    background: var(--panel-soft);
    object-fit: cover;
}

.suggestion-title,
.suggestion-meta {
    display: block;
}

.suggestion-title {
    font-weight: 800;
}

.suggestion-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.suggestion-empty {
    padding: 12px 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.feature-grid,
.card-grid,
.extras-grid {
    display: grid;
    gap: 18px;
}

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

.feature-grid article,
.media-card,
.extra-card,
.empty-state,
.notice {
    background: rgba(18, 20, 27, 0.82);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.feature-grid article {
    padding: 22px;
}

.feature-grid h2,
.empty-state h2,
.extras-section h3 {
    margin-top: 0;
}

.muted,
.feature-grid p,
.extra-card p {
    color: var(--muted);
}

.section-header {
    margin: 28px 0 26px;
}

.section-header h1,
.section-header h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: -0.04em;
}

.notice {
    margin: 0 0 18px;
    padding: 16px 18px;
    color: var(--text);
}

.notice-error {
    border-color: rgba(255, 95, 95, 0.5);
}

.card-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.media-card {
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease;
}

.media-card:hover,
.extra-card:hover {
    border-color: rgba(244, 163, 64, 0.55);
    transform: translateY(-2px);
}

.media-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--panel-soft);
}

.media-card-body,
.extra-card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.media-card small {
    color: var(--accent-strong);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.media-card span span {
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-hero {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 34px;
    align-items: end;
    margin: 24px 0 40px;
}

.poster {
    width: 100%;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.movie-summary {
    padding-bottom: 10px;
}

.extras-section {
    margin-top: 34px;
}

.source-status-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0 0 28px;
    padding: 14px;
    background: rgba(18, 20, 27, 0.76);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.source-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

.source-status strong,
.source-status small {
    display: block;
}

.source-status small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: capitalize;
}

.status-light {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7d8494;
    box-shadow: 0 0 0 4px rgba(125, 132, 148, 0.13);
}

.source-status-searched .status-light {
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14), 0 0 18px rgba(74, 222, 128, 0.34);
}

.source-status-disabled .status-light {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.source-status-error .status-light {
    background: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.extras-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.extra-card {
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease;
}

.extra-card iframe,
.extra-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
    object-fit: cover;
}

.extra-card h4 {
    margin: 0;
}

.extra-card a {
    color: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
}

.empty-state {
    padding: 24px;
}

.query-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.query-list li {
    padding: 9px 12px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer {
    padding: 28px 0 40px;
    color: var(--muted);
    font-size: 0.9rem;
}

.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;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 35%, rgba(244, 163, 64, 0.18), transparent 28rem),
        rgba(8, 9, 13, 0.92);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.loading-screen.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.loading-card {
    width: min(520px, 100%);
    padding: 34px;
    background: linear-gradient(145deg, rgba(25, 28, 37, 0.96), rgba(12, 14, 20, 0.96));
    border: 1px solid rgba(244, 163, 64, 0.22);
    border-radius: 32px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.loading-card h2 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.loading-card p:not(.eyebrow) {
    margin: 16px auto 0;
    max-width: 380px;
    color: var(--muted);
}

.film-reel {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 0 auto 24px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin-reel 1.2s linear infinite;
    box-shadow: 0 0 34px rgba(244, 163, 64, 0.24);
}

.film-reel::before {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: var(--accent);
}

.film-reel span {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.film-reel span:nth-child(1) {
    top: 12px;
    left: 33px;
}

.film-reel span:nth-child(2) {
    top: 33px;
    right: 12px;
}

.film-reel span:nth-child(3) {
    bottom: 12px;
    left: 33px;
}

.film-reel span:nth-child(4) {
    top: 33px;
    left: 12px;
}

.loading-bar {
    height: 4px;
    margin-top: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
}

.loading-bar span {
    display: block;
    width: 42%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: inherit;
    animation: scan-bar 1.15s ease-in-out infinite;
}

@keyframes spin-reel {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scan-bar {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(260%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .film-reel,
    .loading-bar span {
        animation: none;
    }
}

@media (max-width: 760px) {
    .hero {
        padding-top: 42px;
    }

    .feature-grid,
    .movie-hero {
        grid-template-columns: 1fr;
    }

    .movie-hero {
        align-items: start;
    }

    .poster {
        max-width: 230px;
    }

    .search-form {
        border-radius: 24px;
        flex-direction: column;
    }

    .search-form input,
    .search-form button {
        width: 100%;
    }
}
