/*
Purpose:
    Provide Games library and manual-search styling for the shared normal site.

Inputs:
    Games content rendered through base.html.

Outputs:
    Multi-game search interface, results, game cards, and resource controls.

Requirements:
    site.css and components.css loaded first.

Goal:
    Make manuals easy to search across all games or one selected game.

Section:
    Shared normal-site Games styling.
*/

.games-intro {
    max-width: 660px;
    margin: 16px 0 30px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

.manual-search {
    padding: 18px;
    border:
        1px solid var(--border);
    border-radius: 18px;
    background:
        rgba(25,25,30,.95);
}

.manual-search-title {
    margin: 5px 0 8px;
    font-size:
        clamp(
            1.7rem,
            6vw,
            2.3rem
        );
    line-height: 1;
}

.manual-search-label {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.45;
}

.manual-search-controls {
    display: grid;
    grid-template-columns:
        minmax(130px,.35fr)
        minmax(0,1fr);
    gap: 10px;
}

.manual-search-controls label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.manual-game-filter,
.manual-search-input {
    width: 100%;
    min-height: 52px;
    padding: 11px 14px;
    border:
        1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--panel2);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

.manual-game-filter:focus,
.manual-search-input:focus {
    border-color:
        rgba(224,170,68,.7);
}

.manual-search-status {
    min-height: 20px;
    margin-top: 10px;
    color: var(--muted);
    font-size: .82rem;
}

.manual-search-results {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.manual-result {
    padding: 13px;
    border:
        1px solid var(--border);
    border-radius: 12px;
    background:
        rgba(255,255,255,.025);
}

.manual-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.manual-result-heading strong {
    font-size: .92rem;
}

.manual-result-heading a {
    flex: 0 0 auto;
    color: var(--gold);
    font-size: .8rem;
    font-weight: 900;
    text-decoration: none;
}

.manual-result p {
    margin: 8px 0 0;
    color: #d1cec7;
    font-size: .9rem;
    line-height: 1.48;
}

.manual-search-empty {
    padding: 16px;
    border:
        1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

.game-library {
    display: grid;
    gap: 15px;
}

.game-card {
    padding: 20px;
    border:
        1px solid var(--border);
    border-radius: 18px;
    background:
        rgba(25,25,30,.95);
}

.game-card h2 {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 1.6rem;
}

.game-card p {
    margin: 9px 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resource {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 17px;
    border:
        1px solid var(--border);
    border-radius: 12px;
    background: var(--panel2);
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
}

.resource.primary {
    border-color:
        rgba(214,58,58,.55);
    background:
        linear-gradient(
            135deg,
            var(--red),
            var(--red-dark)
        );
}

.resource.manual {
    border-color:
        rgba(224,170,68,.52);
}

@media (max-width: 470px) {
    .manual-search {
        padding: 15px;
    }

    .manual-search-controls {
        grid-template-columns: 1fr;
    }

    .manual-result-heading {
        align-items: flex-start;
    }
}
