:root {
    color-scheme: dark;
    font-family: system-ui, sans-serif;
    background: #151210;
    color: #f6eddf;
    --gold: #efc783;
    --line: #63472e;
}

* { box-sizing: border-box; }
body { margin: 0; }

.masthead {
    padding: clamp(2.5rem, 7vw, 5rem) 1rem;
    text-align: center;
    border-bottom: 3px double var(--line);
    background: radial-gradient(ellipse at 50% 0%, #55301f, #241713 65%, #1c1511);
}

h1, h2 { font-family: Georgia, serif; }
h1 { margin: 0; font-size: clamp(3rem, 9vw, 6rem); color: var(--gold); }
.masthead p { margin: .6rem 0 0; color: #ecdac6; }
main { width: min(72rem, calc(100% - 2rem)); margin: 2.5rem auto 4rem; }
section + section { margin-top: 3rem; }
h2 { color: var(--gold); font-size: clamp(1.45rem, 4vw, 2rem); }

.films {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
    gap: clamp(.75rem, 2vw, 1.5rem);
}

section:first-child .films {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.films li {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: .45rem;
    overflow: hidden;
    background: #241c17;
}

section:first-child li { border-color: #a17949; }
.films img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; background: #100e0c; }
.caption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem; }
h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
button {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    padding: .25rem .6rem;
    border-radius: .3rem;
    border: 1px solid var(--line);
    color: var(--gold);
    background: #151210;
    font: inherit;
    cursor: pointer;
}

button span { font-size: 1.4rem; }
button[aria-pressed="true"] { background: #512924; color: #ffd0a7; border-color: #cf9471; }
button:hover { border-color: var(--gold); }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.empty { padding: 1.5rem; border: 1px solid var(--line); }
.empty h2 { margin-top: 0; }
.empty p { margin-bottom: 0; }

@media (max-width: 38rem) {
    .films, section:first-child .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .caption { align-items: flex-start; flex-direction: column; }
}

.imdb { display: inline-block; margin-top: .25rem; color: var(--gold); }
