/* Game detail page (/pages/games/<id>). Mockup: design/redesign/project.html. Nav, cards and buttons come from base.css. */
/* main's section gap (base.css) is replaced by the margins below, as in the mockup. */
main.detail-page { gap: 0; }

.detail-head { padding-top: 160px; display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 640px) { .detail-head { padding-top: 200px; } }
.back { align-self: flex-start; font-size: 14px; color: var(--fg-60); border-radius: 6px; transition: color 150ms; }
.back:hover { color: var(--foreground); }

.detail-title { display: flex; flex-direction: column; gap: 16px; }
.detail-title .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-title .genre { font-size: 12px; letter-spacing: -0.01em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--fg-10); color: var(--fg-65); white-space: nowrap; }
.detail-title h1 { font-size: 2.75rem; overflow-wrap: break-word; }
@media (min-width: 768px) { .detail-title h1 { font-size: 3.5rem; } }
@media (min-width: 1024px) { .detail-title h1 { font-size: 4.25rem; } }
.detail-title p { max-width: 40ch; font-size: 20px; line-height: 1.4; letter-spacing: -0.025em; color: var(--fg-65); }
@media (min-width: 640px) { .detail-title p { font-size: 22px; } }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; max-width: 640px; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts dt { font-size: 12px; color: var(--fg-50); }
.facts dd { margin-top: 2px; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cta-solid { width: auto; gap: 8px; }
.cta-solid .icon { transition: transform 300ms; }
.cta-solid:hover .icon { transform: translateX(2px); }

/* Cover and screenshots keep their own ratio (width/height set by the generator). */
.detail-cover { margin-top: 56px; border-radius: 2rem; border: 1px solid var(--fg-8); background: var(--background); padding: 6px; box-shadow: var(--shadow-sm); }
.detail-cover-inner { border-radius: 1.6rem; overflow: hidden; }
.detail-cover img, .detail-cover video, .shot img { display: block; width: 100%; height: auto; }
/* Clip without a poster after a failure (lib/clips.js); not expected, since the cover is the poster. */
.detail-cover .video-box { width: 100%; background: var(--muted); }

/* Trailer: stored poster and play link until pressed, then the YouTube player (assets/js/game.source.js). */
.trailer { position: relative; aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px var(--fg-5); }
.trailer-play { position: absolute; inset: 0; display: block; border-radius: inherit; }
.trailer-play img, .trailer iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.trailer-icon { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: grid; place-items: center; border-radius: 999px; background: rgb(0 0 0 / 0.62); color: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18); transition: transform 300ms var(--ease), background 150ms; }
.trailer-icon svg { width: 30px; height: 30px; margin-left: 4px; fill: currentColor; }
.trailer-play:hover .trailer-icon, .trailer-play:focus-visible .trailer-icon { transform: scale(1.08); background: rgb(0 0 0 / 0.78); }
.trailer-play:focus-visible { outline-offset: -4px; }

.detail-block { margin-top: 96px; display: grid; gap: 24px; }
@media (min-width: 768px) { .detail-block { grid-template-columns: 1fr 2.2fr; gap: 40px; align-items: start; } }
.detail-block h2 { font-size: 2rem; }
.prose { display: grid; gap: 16px; font-size: 18px; line-height: 1.6; letter-spacing: -0.015em; color: var(--fg-70); max-width: 62ch; }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .shots { grid-template-columns: 1fr; } }
.shot { border-radius: 1rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--fg-5); }

.devlogs { list-style: none; display: grid; }
.devlogs a { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--fg-8); transition: padding 300ms var(--ease); }
.devlogs li:first-child a { border-top: 1px solid var(--fg-8); }
.devlogs a:hover { padding-left: 10px; }
.devlogs .t { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.devlogs .m { font-size: 13px; color: var(--fg-50); font-variant-numeric: tabular-nums; white-space: nowrap; }
.devlogs .icon { color: var(--fg-45); }
@media (max-width: 640px) { .devlogs a { grid-template-columns: 1fr 16px; } .devlogs .m { grid-column: 1; grid-row: 2; } }

.detail-page .contact-section { margin-top: 120px; }
