/* ── Fonts ── */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrainsmono-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrainsmono-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrainsmono-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ── Palette ── */
:root {
    --bg:      #101010;
    --bg-2:    #212121;
    --card:    #1a1a1a;
    --border:  #2a2a2a;
    --text:    #e8e8e8;
    --dim:     #aaa;
    --accent:  #ffffff;
    --radius:  6px;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg);
    color: var(--text);
    padding: 3rem 1rem;
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 300;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

img[src$=".svg"] {
    filter: invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.container {
    max-width: 52rem;
    margin: 0 auto;
}

/* ── Links ── */
a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

a:hover {
    opacity: 0.7;
}

/* ── Header ── */
header {
    margin-bottom: 2.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.nav-link {
    color: var(--dim);
    font-size: 0.8rem;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--accent);
    opacity: 1;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.header-title h1 {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
}

.header-title img[src$=".svg"] {
    width: 22px;
    height: 22px;
}

.header-subtitle {
    color: var(--dim);
    font-weight: 300;
    font-size: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* ── Sections ── */
section {
    margin-bottom: 2.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--accent);
}

.section-title img[src$=".svg"] {
    width: 18px;
    height: 18px;
}

.section-count {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--dim);
    background: var(--bg-2);
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    margin-left: 0.25rem;
}

/* ── Status Legend ── */
.legend-section {
    margin-bottom: 2rem;
}

.filter-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--dim);
    padding: 0.5rem 0.75rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.legend-badge,
.game-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    border: 1px solid;
    min-width: 65px;
    text-align: center;
    flex-shrink: 0;
}

.game-badge {
    padding: 2px 7px;
    font-size: 0.6rem;
    min-width: unset;
    letter-spacing: 0.02em;
}

.status-playing {
    background-color: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.status-completed {
    background-color: var(--bg-2);
    color: var(--accent);
    border-color: var(--accent);
}

.status-paused {
    background-color: transparent;
    color: var(--dim);
    border-color: var(--dim);
}

/* ── Games List (horizontal cards) ── */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.game-card {
    display: flex;
    align-items: stretch;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.game-card:hover {
    border-color: #444;
    transform: translateY(-1px);
}

/* ── Poster (left) ── */
.game-poster {
    width: 130px;
    min-width: 130px;
    background-color: var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.game-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: none;
}

/* ── Info (right) ── */
.game-info {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 0.35rem;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.game-title {
    font-weight: 500;
    color: var(--accent);
    font-size: 0.9rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.game-year {
    color: var(--dim);
}

.game-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--dim);
    flex-shrink: 0;
}

.game-rating {
    color: var(--text);
    font-weight: 400;
}

.game-store {
    margin-top: 0.15rem;
}

.game-store a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--dim);
    transition: color 0.15s ease;
}

.game-store a:hover {
    color: var(--accent);
    opacity: 1;
}

.game-store img[src$=".svg"] {
    width: 14px;
    height: 14px;
}

/* ── Footer ── */
footer {
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--dim);
    font-size: 0.75rem;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    body {
        padding: 2rem 1rem;
    }

    .container {
        max-width: 100%;
    }

    .game-poster {
        width: 100px;
        min-width: 100px;
    }

    .game-title {
        font-size: 0.8rem;
    }

    .filter-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .game-card {
        flex-direction: column;
    }

    .game-poster {
        width: 100%;
        min-width: unset;
        height: 160px;
    }

    .game-info {
        padding: 0.85rem 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .game-header {
        flex-wrap: wrap;
    }
}
