* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #101116;
    --surface: #191b23;
    --text: #f5f5f7;
    --muted: #9294a0;
    --accent: #e83e55;
}

body {
    margin: 0;
    padding: 0 0 78px;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    height: 58px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 17, 22, 0.96);
    position: sticky;
    top: 0;
    z-index: 5;
}

.brand {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand span {
    color: var(--accent);
}

.header-link {
    font-size: 27px;
    color: var(--text);
}

.page-section {
    padding: 18px 14px 24px;
}

.eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0 0 6px;
}

h1 {
    font-size: 21px;
    margin: 0;
}

.content-section {
    margin-top: 25px;
}

.content-section h2 {
    font-size: 16px;
    margin: 0 0 12px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 9px;
}

.movie-card {
    min-width: 0;
    display: block;
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    background: var(--surface);
}

.movie-card span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message, .muted, .loading, .empty-state {
    color: var(--muted);
    font-size: 13px;
}

.loading, .empty-state {
    padding: 35px 16px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    z-index: 10;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 62px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    background: #191b23;
    border-top: 1px solid #292b35;
}

.bottom-nav a {
    min-width: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10px;
}

.bottom-nav a span {
    font-size: 20px;
    line-height: 22px;
}

.bottom-nav a.active {
    color: var(--accent);
}

@media (min-width: 700px) {
    .page-section {
        max-width: 1100px;
        margin: 0 auto;
        padding: 28px 24px;
    }

    .movie-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 18px 14px;
    }

    .movie-card span {
        font-size: 13px;
    }

    .bottom-nav {
        left: 50%;
        right: auto;
        width: min(520px, 100%);
        transform: translateX(-50%);
        border: 1px solid #292b35;
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
    }
}
