/* ── Layout ─────────────────────────────────────────────────────────── */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
    opacity: 0.6;
}


/* ── Header ─────────────────────────────────────────────────────────── */

header nav {
    padding: 0.5rem 0;
}

.site-name {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.tagline {
    opacity: 0.5;
}


/* ── Search bar ─────────────────────────────────────────────────────── */

.search-bar {
    margin-bottom: 1.5rem;
}

.search-bar input[type="search"] {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.filters input[type="radio"] {
    margin: 0;
}


/* ── Results grid ───────────────────────────────────────────────────── */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
    margin-bottom: 2rem;
}

.result-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--pico-muted-border-color);
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
}

.result-card img,
.result-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.result-card video {
    position: absolute;
    top: 0;
    left: 0;
}

.result-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.15s;
}

.result-card:hover .result-label,
.result-card:focus .result-label {
    opacity: 1;
}

.results-status {
    text-align: center;
    padding: 2rem 0;
    opacity: 0.5;
}

.load-more-wrap {
    text-align: center;
    margin: 1rem 0 2rem;
}


/* ── Shot detail page ───────────────────────────────────────────────── */

.shot-detail video {
    width: 100%;
    max-height: 70vh;
    background: #000;
    display: block;
    margin-bottom: 1rem;
    border-radius: 3px;
}

.shot-meta {
    margin-bottom: 1.5rem;
}

.shot-meta dt {
    font-weight: 600;
    display: inline;
}

.shot-meta dt::after {
    content: ": ";
}

.shot-meta dd {
    display: inline;
    margin: 0;
}

.shot-meta dd::after {
    content: "";
    display: block;
    margin-bottom: 0.25rem;
}

.shot-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shot-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.shot-actions a {
    font-size: 0.9rem;
}


/* ── Film page ──────────────────────────────────────────────────────── */

.film-header {
    margin-bottom: 1.5rem;
}

.film-header h2 {
    margin-bottom: 0.25rem;
}

.film-header p {
    opacity: 0.6;
    margin: 0;
}


/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 576px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 4px;
    }

    .result-label {
        opacity: 1;          /* Always visible on mobile (no hover) */
    }

    .tagline {
        display: none;
    }
}
