/*
Purpose:
    Provide shared component styling for normal FlipOut DTSP pages.

Inputs:
    Page-specific content rendered inside the shared base.html shell.

Outputs:
    Reusable hero, divider, tag, utility, and content presentation.

Requirements:
    site.css loaded first.

Goal:
    Avoid page-local CSS and keep reusable visual elements centralized.

Section:
    Main-site shared component styling.
*/

.home-hero {
    padding:
        clamp(
            28px,
            6vw,
            58px
        )
        0
        0;
    text-align: center;
}

.home-title {
    margin: 0;
    font-size:
        clamp(
            2.8rem,
            10vw,
            5.5rem
        );
    line-height: .95;
    letter-spacing: -.055em;
}

.home-title .night {
    display: block;
    color: var(--red-bright);
}

.hero-accent {
    width:
        min(
            360px,
            78%
        );
    height: 5px;
    margin: 30px auto 27px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--red),
            var(--gold),
            var(--red)
        );
}

.home-subtitle {
    max-width: 560px;
    margin: 0 auto;
    color: #d2d2d2;
    font-size:
        clamp(
            1.05rem,
            3vw,
            1.35rem
        );
    line-height: 1.65;
}

.short-divider {
    width: 82px;
    height: 3px;
    margin: 34px auto;
    border-radius: 999px;
    background: var(--red);
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.game-tags span {
    padding: 9px 14px;
    border:
        1px solid #3c3c3c;
    border-radius: 999px;
    background: var(--panel2);
    color: #ddd;
    font-size: .88rem;
}

.site-footer {
    margin-top: 34px;
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}

.content-section {
    width: 100%;
}

.utility-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title {
    margin: 4px 0 0;
    font-size:
        clamp(
            1.8rem,
            7vw,
            2.8rem
        );
    line-height: 1;
    letter-spacing: -.035em;
}

.section-divider {
    width:
        min(
            460px,
            82%
        );
    height: 4px;
    margin: 38px auto;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            var(--red),
            var(--gold),
            var(--red)
        );
}

/*
Section:
    Recent completed games and winning-photo thumbnails.
*/

.recent-game-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.recent-game-card {
    display: grid;
    grid-template-columns:
        minmax(
            0,
            1fr
        )
        auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border:
        1px solid var(--border);
    border-radius: 14px;
    background: var(--panel2);
}

.recent-game-card:not(:has(.recent-game-photo-link)) {
    grid-template-columns: 1fr;
}

.recent-game-photo-link {
    order: 2;
    display: block;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border:
        1px solid var(--border);
    border-radius: 11px;
    background: #111;
}

.recent-game-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-game-details {
    order: 1;
    min-width: 0;
}

.recent-game-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.recent-game-name {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 900;
}

.recent-game-date {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .82rem;
}

.recent-game-winner-label {
    margin-top: 8px;
    color: var(--gold);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.recent-game-winners {
    margin-top: 2px;
    color: var(--text);
    font-weight: 800;
}

.recent-game-empty {
    color: var(--muted);
}

@media (max-width: 470px) {
    .recent-game-photo-link {
        width: 78px;
        height: 78px;
    }

    .recent-game-heading {
        display: grid;
        gap: 3px;
    }
}



/*
Section:
    Full winning-photo page.
*/

.winning-photo-view {
    display: grid;
    gap: 16px;
}

.winning-photo-meta {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border:
        1px solid var(--border);
    border-radius: 14px;
    background: var(--panel2);
}

.winning-photo-game {
    margin: 4px 0 6px;
    font-size:
        clamp(
            1.8rem,
            7vw,
            2.8rem
        );
    line-height: 1;
}

.winning-photo-names {
    display: block;
    font-size: 1.05rem;
}

.winning-photo-date {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: .86rem;
}

.winning-photo-frame {
    display: grid;
    place-items: center;
    overflow: hidden;
    border:
        1px solid var(--border);
    border-radius: 16px;
    background: #09090b;
}

.winning-photo-large {
    display: block;
    width: 100%;
    max-height: 800px;
    object-fit: contain;
}

.winning-photo-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 16px;
    border:
        1px solid var(--border);
    border-radius: 11px;
    background: var(--panel2);
    color: var(--text);
    font-weight: 850;
    text-decoration: none;
}

.winning-photo-back:hover,
.winning-photo-back:focus-visible {
    border-color:
        rgba(224,170,68,.65);
    color: var(--gold);
    outline: none;
}

@media (max-width: 470px) {
    .winning-photo-meta {
        align-items: start;
        flex-direction: column;
    }
}

/*
Section:
    Shared normal-site form controls.
*/

.site-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.site-form-field {
    display: grid;
    gap: 0.5rem;
}

.site-form-field > span {
    font-weight: 700;
}

.site-form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #3d3d46;
    border-radius: 0.8rem;
    background: #202027;
    color: #f4f1eb;
    font: inherit;
}

.site-form-textarea {
    min-height: 10rem;
    resize: vertical;
}

.site-form-actions {
    display: flex;
}

.site-form-actions > button {
    width: 100%;
}

.site-form-message {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
}

.site-form-message.success {
    border: 1px solid #356744;
}

.site-form-message.error {
    border: 1px solid #8b3030;
}
