:root {
    color-scheme: dark;
    --bg: #101114;
    --panel: #1a1d22;
    --panel-soft: #22262d;
    --text: #f7f7f8;
    --muted: #b6bbc4;
    --accent: #e50914;
    --accent-soft: rgba(229, 9, 20, 0.14);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px clamp(18px, 5vw, 48px);
    background: rgba(16, 17, 20, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.search-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.site-header .search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 36px);
    max-width: 400px;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 21;
}

.brand {

    color: var(--accent);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
    font-weight: 700;
}

.main-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav .nav-list li {
    display: inline-flex;
}

.main-nav a,
.category-dropdown summary {
    color: var(--text);
    cursor: pointer;
    list-style: none;
    text-decoration: none;
}

.category-dropdown summary::-webkit-details-marker {
    display: none;
}

.category-dropdown summary::after {
    content: " v";
    color: var(--accent);
    font-size: 0.8rem;
}

.main-nav a:hover,
.category-dropdown summary:hover {
    color: var(--accent);
}

.category-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    min-width: 160px;
    padding: 8px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
}

.dropdown-menu a:hover {
    background: var(--accent-soft);
}

.hero {
    min-height: 62vh;
    display: flex;
    align-items: center;
    padding: clamp(56px, 9vw, 110px) clamp(18px, 5vw, 48px);
    background:
        linear-gradient(90deg, rgba(16, 17, 20, 0.98) 0%, rgba(16, 17, 20, 0.82) 52%, rgba(16, 17, 20, 0.48) 100%),
        radial-gradient(circle at 80% 28%, rgba(229, 9, 20, 0.34), transparent 30%),
        linear-gradient(135deg, #2f1522, #122438 48%, #111318);
}

.hero-content {
    width: min(680px, 100%);
}

.skip-link {
    position: absolute;
    left: 18px;
    top: -48px;
    padding: 12px 18px;
    border-radius: 0 0 10px 10px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 18px;
}

.search-panel {
    margin-top: 22px;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.search-panel input {
    flex: 1 1 170px;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    font-size: 0.9rem;
}

.search-panel button {
    min-width: 100px;
    padding: 0 18px;
    min-height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.search-panel button:hover {
    background: #ff1a25;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: #ffb7bd;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.35rem, 7vw, 4.9rem);
    line-height: 0.98;
}

.hero p {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.btn-primary,
.see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

.btn-primary {
    margin-top: 10px;
    padding: 0 24px;
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #ff1a25;
}

.container {
    width: min(1200px, calc(100% - 36px));
    margin: 0 auto;
    padding: 42px 0 18px;
}

section {
    scroll-margin-top: 92px;
    margin-bottom: 50px;
}

.section-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.section-top h2 {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.see-more {
    flex: 0 0 auto;
    padding: 0 14px;
    background: var(--accent-soft);
    color: #ff6f77;
    font-size: 0.9rem;
}

.see-more:hover {
    background: rgba(229, 9, 20, 0.22);
}

.show-list,
.update-list,
.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.show-item,
.show-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.show-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.show-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.show-card-link:hover .show-meta h3 {
    color: #fff;
}

.show-item:hover,
.show-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.show-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.show-card .show-meta {
    padding: 18px;
}

.show-card .show-meta h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.show-card .show-meta p {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.show-card .show-poster {
    padding: 18px;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.show-card .show-poster strong {
    font-size: 1.2rem;
    line-height: 1.1;
}

.show-details {
    padding: 32px 0;
}

.show-details h1 {
    margin-top: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.show-details p {
    color: var(--muted);
    line-height: 1.7;
}

.show-details .media-links {
    margin-top: 24px;
}

.show-details .media-links ul {
    padding-left: 20px;
}

.back-button {
    display: inline-flex;
    margin-top: 24px;
    padding: 12px 22px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 800;
}

.back-button:hover {
    background: #ff1a25;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 32px;
}

.page-link {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.page-link.active,
.page-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page-count {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.language-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.show-poster {
    display: grid;
    place-items: end start;
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 18px;
    color: #fff;
    font-size: clamp(1.4rem, 4vw, 2.15rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.poster-rose { background: linear-gradient(135deg, #442332, #b52645 58%, #15161c); }
.poster-gold { background: linear-gradient(135deg, #1d1f25, #93702c 52%, #17191e); }
.poster-blue { background: linear-gradient(135deg, #182333, #12679d 58%, #101114); }
.poster-green { background: linear-gradient(135deg, #172821, #2c765d 55%, #111318); }
.poster-teal { background: linear-gradient(135deg, #10282c, #188a91 58%, #15161c); }
.poster-purple { background: linear-gradient(135deg, #241735, #7b4ab0 58%, #111318); }
.poster-red { background: linear-gradient(135deg, #301316, #b7131d 58%, #15161c); }
.poster-lime { background: linear-gradient(135deg, #182313, #75a83b 58%, #101114); }
.poster-amber { background: linear-gradient(135deg, #312015, #c57a20 58%, #15161c); }
.poster-navy { background: linear-gradient(135deg, #111827, #315f99 58%, #101114); }
.poster-silver { background: linear-gradient(135deg, #30343a, #8e98a5 58%, #15161c); }
.poster-electric { background: linear-gradient(135deg, #1d1b2e, #415ee0 58%, #101114); }
.poster-crimson { background: linear-gradient(135deg, #1f161a, #9f1f35 58%, #15161c); }
.poster-coffee { background: linear-gradient(135deg, #211915, #8d5c38 58%, #101114); }
.poster-sea { background: linear-gradient(135deg, #122329, #247a8c 58%, #15161c); }

.show-meta {
    padding: 16px;
}

.show-meta h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
}

.show-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.site-footer {
    padding: 48px 18px;
    border-top: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.footer-section h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 12px;
}

.footer-section p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-copyright {
    font-weight: 800;
    color: var(--accent);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .site-footer {
        padding: 32px 16px;
    }

    .footer-content {
        gap: 24px;
        grid-template-columns: 1fr;
    }

    .footer-section h3 {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header {
        flex-wrap: wrap;
        gap: 14px;
        padding: 18px;
    }

    .main-nav .nav-list {
        justify-content: flex-start;
        gap: 12px;
    }

    .section-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-panel {
        flex-direction: column;
        align-items: stretch;
        width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto;
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 720px) {
    .site-header {
        align-items: center;
        flex-direction: row;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .search-toggle {
        order: 2;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
        order: 3;
    }

    .brand {
        order: 1;
    }

    .dropdown-menu {
        left: 0;
        right: auto;
    }

    .section-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .see-more {
        min-height: 36px;
    }
}

@media (max-width: 420px) {
    .main-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .show-list,
    .update-list,
    .show-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hero {
        padding: clamp(36px, 10vw, 60px) 16px;
    }

    .hero-content {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 28px 16px 16px;
    }

    .show-card .show-poster {
        min-height: 130px;
        padding: 14px;
    }

    .show-card .show-meta {
        padding: 14px;
    }

    .show-details {
        padding: 24px 0;
    }

    .back-button {
        width: 100%;
        justify-content: center;
    }

    .pagination {
        gap: 8px;
    }

    .page-link {
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
    }

    .page-count {
        width: 100%;
        text-align: left;
    }

    .search-panel {
        gap: 10px;
    }

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