/* porn-games.org — v1 baseline. Deliberately minimal; iterate on design later. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #14161a;
    color: #d8d8d8;
    line-height: 1.5;
}
a { color: #66b3ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }

header {
    background: #0c0e11;
    border-bottom: 1px solid #20232a;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-weight: 700; font-size: 1.2rem; color: #fff; }
.lang-switch a {
    border: 1px solid #303641;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    color: #d8d8d8;
}

main.container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 720px) { main.container { grid-template-columns: 1fr; } }

#filter-panel {
    background: #1b1e24;
    border: 1px solid #20232a;
    border-radius: 6px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}
#filter-panel h2 { margin-top: 0; font-size: 1rem; }
.filter-group { margin-bottom: 0.75rem; }
.filter-group h3 { margin: 0.5rem 0 0.25rem; font-size: 0.85rem; color: #888; text-transform: uppercase; }
.filter-options { display: flex; flex-direction: column; gap: 0.15rem; max-height: 220px; overflow-y: auto; }
.filter-option { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; cursor: pointer; }
.filter-option.disabled { color: #4a4d56; cursor: default; }
.filter-option input { accent-color: #66b3ff; }

#filter-popup {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #14161a;
    border: 1px solid #20232a;
    border-radius: 4px;
    font-size: 0.85rem;
}
#filter-popup-count { font-weight: 600; margin-bottom: 0.4rem; }
#filter-popup-titles { list-style: none; padding: 0; margin: 0 0 0.5rem; max-height: 280px; overflow-y: auto; }
#filter-popup-titles li { padding: 0.15rem 0; }
#filter-show-all {
    background: #66b3ff; color: #0c0e11; border: none;
    padding: 0.4rem 0.8rem; border-radius: 3px; cursor: pointer; font-weight: 600;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.game-card {
    background: #1b1e24;
    border: 1px solid #20232a;
    border-radius: 6px;
    overflow: hidden;
    color: inherit;
    transition: transform .08s;
    display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-2px); text-decoration: none; }
.game-cover {
    width: 100%; aspect-ratio: 3/4; object-fit: contain;
    background: #0c0e11;
}
.game-cover--missing::before {
    content: "no image"; color: #4a4d56; display: flex;
    align-items: center; justify-content: center; height: 100%;
}
.game-meta { padding: 0.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.game-title { margin: 0; font-size: 0.95rem; line-height: 1.25; }
.game-developer { font-size: 0.8rem; color: #888; }
.game-badges { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.badge { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 2px; background: #303641; color: #d8d8d8; }
.badge-tag { background: #233247; }
.badge-tag:hover { background: #2b405c; text-decoration: none; }

.pagination { display: flex; gap: 1rem; justify-content: center; margin: 2rem 0 1rem; align-items: center; }
.pagination a {
    padding: 0.3rem 0.8rem; border: 1px solid #303641; border-radius: 3px; color: #d8d8d8;
}
.muted { color: #888; }

/* Game page */
.game-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 720px) { .game-hero { grid-template-columns: 1fr; } }
.game-hero-cover {
    width: 100%; border-radius: 6px;
}
.game-hero-meta h1 { margin: 0 0 0.5rem; }
.game-title-original { color: #888; font-style: italic; margin-bottom: 0.5rem; }
.kv { font-size: 0.9rem; margin: 0.25rem 0; }
.kv span:first-child { display: inline-block; min-width: 110px; color: #888; }

.game-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1.5rem; }
.game-description-body { white-space: pre-wrap; }
.screenshot-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem;
}
.screenshot-grid img { width: 100%; border-radius: 4px; }
.link-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.link-list li { margin: 0; }
.link-list a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #233247;
    border: 1px solid #2b405c;
    border-radius: 4px;
    color: #d8d8d8;
    font-size: 0.85rem;
    text-decoration: none;
}
.link-list a:hover { background: #2b405c; }

.not-found { text-align: center; padding: 4rem 1rem; }
.not-found h1 { font-size: 4rem; margin: 0 0 1rem; color: #303641; }

/* Age gate — visible by default; the inline <head> script removes it for
   returning visitors by adding `.age-ok` to <html> before first paint. */
#age-gate {
    position: fixed; inset: 0;
    background: rgba(8, 9, 12, 0.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 1rem;
}
html.age-ok #age-gate { display: none; }
html:not(.age-ok) body { overflow: hidden; }
.age-gate-box {
    background: #1b1e24;
    border: 1px solid #303641;
    border-radius: 8px;
    max-width: 480px; padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
}
.age-gate-box h2 { margin: 0 0 0.75rem; }
.age-gate-box p { margin: 0 0 1rem; }
.age-gate-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 0.5rem; }
.age-gate-actions button {
    padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer;
    border: 1px solid #303641; background: #14161a; color: #d8d8d8; font-weight: 600;
}
.age-gate-actions .btn-primary { background: #66b3ff; color: #0c0e11; border-color: #66b3ff; }
.age-gate-mini { font-size: 0.8rem; margin: 0.75rem 0 0; }
