:root {
    --navy: #071a34;
    --blue: #102b4b;
    --gold: #d3b477;
    --white: #f5f5f5;
    --muted: #b7c5d7;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: var(--navy);
    color: var(--white);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--gold);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 15px;
    background: #041124;
    border-bottom: 1px solid var(--gold);
}

.hero {
    text-align: center;
    padding: 45px 15px;
    background: radial-gradient(
        ellipse at top,
        #244c72,
        var(--navy)
    );
}

.logo {
    font-size: 65px;
}

.hero h1 {
    font-size: clamp(25px, 5vw, 48px);
    color: var(--gold);
    margin: 10px 0;
}

.hero h2 {
    margin: 0;
    font-size: clamp(18px, 3vw, 28px);
}

.hero p {
    color: var(--muted);
}

main {
    max-width: 1250px;
    margin: auto;
    padding: 20px;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.statistics div {
    background: var(--blue);
    border: 1px solid #ffffff20;
    border-radius: 12px;
    padding: 18px 8px;
    text-align: center;
}

.statistics strong {
    display: block;
    font-size: 32px;
    color: var(--gold);
}

.statistics span {
    font-size: 14px;
}

.filters {
    background: var(--blue);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

input, select, button {
    font: inherit;
}

input[type="search"], select {
    background: var(--navy);
    color: white;
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    min-width: 0;
}

input[type="search"] {
    margin: 8px 0 12px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px 20px 0 0;
}

input[type="checkbox"] {
    accent-color: var(--gold);
    width: 18px;
    height: 18px;
}

.section-title {
    color: var(--gold);
    border-bottom: 1px solid #d3b47755;
    padding-bottom: 10px;
}

#resultsCount {
    color: var(--muted);
}

#movieGrid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    background: var(--blue);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ffffff18;
    transition: transform .2s;
}

.movie-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.poster {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    background: linear-gradient(
        135deg, #244c72, #071a34
    );
    font-size: 65px;
}

.movie-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.movie-content h3 {
    color: var(--gold);
    margin: 0 0 8px;
}

.movie-meta {
    font-size: 13px;
    color: var(--muted);
}

.movie-description {
    font-size: 14px;
    flex: 1;
}

.movie-language {
    font-size: 12px;
    color: #bce6c8;
}

.movie-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

button {
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    background: var(--gold);
    color: var(--navy);
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.1);
}

button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible {
    outline: 3px solid white;
    outline-offset: 3px;
}

.watch-button {
    flex: 1;
}

.favorite-button {
    background: #071a34;
    color: var(--gold);
    border: 1px solid var(--gold);
}

#playerSection {
    background: var(--blue);
    border: 1px solid var(--gold);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 25px;
    scroll-margin-top: 15px;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.player-header h2 {
    color: var(--gold);
}

#player {
    background: black;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
}

#player iframe, #player video {
    width: 100%;
    height: 100%;
    border: none;
}

.player-notice {
    padding: 20px;
    text-align: center;
}

#movieDetails {
    margin: 15px 0;
    overflow-wrap: anywhere;
}

.information {
    background: var(--blue);
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
}

.information h2, .information h3 {
    color: var(--gold);
}

blockquote {
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding: 10px 15px;
    margin: 20px 0;
}

footer {
    text-align: center;
    padding: 25px 15px;
    margin-top: 35px;
    border-top: 1px solid var(--gold);
    background: #041124;
}

@media (max-width: 650px) {
    main {
        padding: 12px;
    }

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    #movieGrid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .movie-content {
        padding: 10px;
    }

    .movie-content h3 {
        font-size: 15px;
    }

    .movie-buttons {
        flex-wrap: wrap;
    }

    button {
        font-size: 13px;
        padding: 10px;
    }

    .poster {
        font-size: 45px;
    }
}

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