﻿/* Game landing pages (/games, /games/{slug}), Manuals & Schematics library (/games/docs, /docs/{slug}) and the buy modal. */

.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gp-card { display: flex; flex-direction: column; height: 100%; border-radius: .75rem; overflow: hidden; border: 1px solid rgba(17, 24, 39, .1); background: #fff; box-shadow: 0 1px 3px rgba(17, 24, 39, .08); color: inherit; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.gp-card:hover, .gp-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(17, 24, 39, .14); color: inherit; }
.gp-card-photo { aspect-ratio: 4 / 3; background: #1f1147; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gp-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.gp-card-photo .gp-noimg { color: #c4b5fd; font-family: 'Press Start 2P', 'VT323', monospace; font-size: .7rem; text-align: center; padding: 1rem; }
.gp-card-body { padding: .75rem .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.gp-card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.gp-meta { color: #6b7280; font-size: .85rem; }
.gp-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .4rem; }
.gp-chip { font-size: .72rem; border-radius: 999px; padding: .15rem .55rem; background: #ede9fe; color: #4c1d95; font-weight: 600; }
.gp-chip.sale { background: #dcfce7; color: #166534; }
.gp-chip.rent { background: #dbeafe; color: #1e40af; }

.gp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.gp-fact { background: #f5f3ff; border-radius: .6rem; padding: .55rem .75rem; }
.gp-fact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6d28d9; font-weight: 700; }
.gp-fact-value { font-weight: 600; }

.gp-section { margin-top: 2rem; }
.gp-section > h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .75rem; }
.gp-history p { font-size: 1.05rem; line-height: 1.65; max-width: 72ch; }
.gp-trivia { list-style: none; padding: 0; display: grid; gap: .5rem; }
.gp-trivia li { background: #fff7ed; border-left: 4px solid #f97316; border-radius: .4rem; padding: .55rem .8rem; }

.gp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.gp-photos button { border: 0; padding: 0; background: none; border-radius: .5rem; overflow: hidden; aspect-ratio: 1 / 1; }
.gp-photos img { width: 100%; height: 100%; object-fit: cover; }
.gp-lightbox { position: fixed; inset: 0; z-index: 1080; background: rgba(10, 6, 25, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.gp-lightbox img { max-width: 100%; max-height: 80vh; border-radius: .5rem; }
.gp-lightbox .gp-lightbox-caption { color: #e5e7eb; margin-top: .5rem; text-align: center; }
.gp-lightbox .btn { min-height: 44px; }

.gp-machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.gp-machine { display: flex; gap: .75rem; align-items: center; border: 1px solid rgba(17, 24, 39, .1); border-radius: .6rem; padding: .5rem; background: #fff; }
.gp-machine img { width: 72px; height: 72px; object-fit: cover; border-radius: .4rem; flex: none; }
.gp-machine .btn { min-height: 38px; }

/* Watermarked preview thumbnails: the PNG is already stamped server-side (large center badge + SAMPLE). No CSS text overlay:
   a second diagonal "ARCADE LORE" on top of the baked-in badge only made the page harder to read. */
.wm-wrap { position: relative; display: block; overflow: hidden; background: #f3f4f6; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.wm-wrap img { display: block; width: 100%; height: auto; pointer-events: none; }
.wm-badge { position: absolute; top: .4rem; left: .4rem; z-index: 1; font-size: .65rem; font-weight: 700; letter-spacing: .05em; background: rgba(46, 16, 101, .85); color: #fff; border-radius: .3rem; padding: .1rem .4rem; }

.doc-card .wm-wrap { aspect-ratio: 3 / 4; }
.doc-card .wm-wrap img { height: 100%; object-fit: cover; object-position: top; }
.doc-card .doc-price { font-size: 1.15rem; font-weight: 800; color: #4c1d95; }
.doc-card .btn { min-height: 44px; }
.doc-noimg { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #ede9fe, #ede9fe 10px, #f5f3ff 10px, #f5f3ff 20px); color: #6d28d9; font-weight: 700; }

.doc-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.doc-previews button { border: 0; padding: 0; background: none; text-align: left; }
.doc-buybox { position: sticky; top: 1rem; border: 2px solid #7c3aed; border-radius: .9rem; padding: 1rem; background: #faf5ff; }
.doc-buybox .doc-price { font-size: 2rem; font-weight: 900; color: #4c1d95; }
.doc-buybox .btn { min-height: 48px; font-weight: 700; }
/* Buyer note: big sample watermark on previews vs small corner mark on the paid copy (doc page buy box + buy modal). */
.doc-wm-note { display: flex; align-items: flex-start; gap: .55rem; margin-top: .75rem; padding: .55rem .7rem; border: 1px dashed #c4b5fd; border-radius: .6rem; background: #fff; color: #4c1d95; font-size: .85rem; line-height: 1.4; }
.doc-wm-note img { flex: none; width: 28px; height: 28px; border-radius: 50%; margin-top: .05rem; }
.doc-wm-note span { min-width: 0; overflow-wrap: anywhere; }

.doc-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .5rem; }
@media (max-width: 767.98px) {
    .doc-filters { grid-template-columns: 1fr; }
    .doc-filters .form-control, .doc-filters .form-select { min-height: 44px; }
    .doc-buybox { position: static; }
    .gp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
    .gp-card-title { font-size: .95rem; }
}

/* Buy modal (same pattern as the admin modals: 44px touch targets, centered, page scroll locked). */
.dd-modal .modal-dialog { max-width: min(560px, calc(100vw - 1rem)); }
.dd-modal .form-control, .dd-modal .btn { min-height: 44px; }
.dd-modal .dd-steps { padding-left: 1.2rem; }
.dd-modal .dd-steps li { margin-bottom: .35rem; }
.dd-modal .dd-ordernum { font-family: 'VT323', ui-monospace, monospace; font-size: 1.6rem; letter-spacing: .05em; background: #1f1147; color: #fde68a; border-radius: .4rem; padding: .1rem .6rem; display: inline-block; }
body:has(.dd-modal) { overflow: hidden; }

/* Admin list: cards on phones, table on desktop. */
.dd-admin-table { min-width: 760px; }
.dd-touch { min-height: 44px; }
.dd-thumb { width: 48px; height: 64px; object-fit: cover; object-position: top; border-radius: .25rem; background: #f3f4f6; }
.dd-wm-check img { display: block; width: 100%; height: auto; border: 1px solid #e5e7eb; border-radius: .35rem; background: #f3f4f6; }
