:root {
    --bg: #0f1115;
    --card-bg: #1a1d24;
    --accent: #5b8def;
    --text: #e8e9ec;
    --muted: #9a9ea8;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: #14161c;
    position: sticky;
    top: 0;
    z-index: 10;
}
.logo { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 640px;
}
.search-form input, .search-form select {
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #2a2e38;
    background: #1a1d24;
    color: var(--text);
}
.search-form input { flex: 1; }
.search-form button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.container { max-width: 1300px; margin: 0 auto; padding: 1.5rem 2rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.card {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    aspect-ratio: 4/3;
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover img { transform: scale(1.05); }
.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}
.tags { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }

.pagination { display: flex; justify-content: center; gap: 1.5rem; margin: 2rem 0; color: var(--muted); }
.pagination a { color: var(--accent); }

.empty-state { text-align: center; color: var(--muted); padding: 4rem 0; }

.site-footer { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.85rem; }

.detail { display: flex; gap: 2rem; flex-wrap: wrap; }
.detail-img { max-width: 100%; flex: 2 1 500px; border-radius: 10px; }
.detail-info { flex: 1 1 260px; }
.detail-info h1 { font-size: 1.4rem; text-transform: capitalize; }
.stats { color: var(--muted); font-size: 0.9rem; }
.badge { background: #22c55e33; color: #4ade80; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.75rem; }
.btn-download {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
}
.source-link { font-size: 0.8rem; color: var(--muted); }

.res-heading { font-size: 1rem; margin-top: 1.5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.resolution-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-top: 0.8rem;
}
.res-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 0.5rem;
    background: var(--card-bg);
    border: 1px solid #2a2e38;
    border-radius: 8px;
    text-align: center;
    transition: border-color .2s, background .2s;
}
.res-item:hover { border-color: var(--accent); background: #202430; }
.res-label { font-weight: 600; font-size: 0.9rem; }
.res-dim { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }
