/* Страница игры Old-Games v6 — на токенах из css/style.css */

.game-page { display: flex; flex-direction: column; gap: 0; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; margin-top: 4px; }
.game-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.game-aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Шапка игры ---------- */
.head { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.head__backdrop {
	position: absolute; inset: 0 0 auto; height: 220px; background-size: cover; background-position: center;
	filter: blur(28px) saturate(1.3); opacity: .55; transform: scale(1.2);
	mask-image: linear-gradient(#000, transparent);
}
.head__inner { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr) 230px; gap: 28px; padding: 28px; }
.head__cover { display: block; width: 220px; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-lg); }
.head__cover img { width: 100%; height: 100%; object-fit: cover; }
.head__main { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 8px; }
.head__title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; line-height: 1.1; letter-spacing: -.8px; }
.head__edition { font-size: 16px; font-weight: 600; color: var(--text-2); }
.head__lead { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 14px; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 12px; }
.facts__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border-strong); font-size: 14px; }
.facts__row:last-child { grid-column: auto; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.facts dd > a:not(.cat-link) { color: var(--link); }
.facts__platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.facts__platforms .cat-link-1 { display: none; }

.score {
	align-self: start; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px;
	background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.score__label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.score__value { display: flex; align-items: baseline; gap: 4px; }
.score__value b { font-family: var(--font-pixel); font-size: 56px; line-height: .95; color: var(--accent-text); }
.score__value span { font-size: 18px; font-weight: 700; color: var(--muted); }
.score .pixels { align-self: flex-start; }
.score__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.score__stats dt { font-size: 12px; color: var(--muted); }
.score__stats dd { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Вкладки ---------- */
.tabs {
	position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
	padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
	display: inline-flex; align-items: center; gap: 7px; flex: none; height: 40px; padding: 0 14px; border-radius: 10px;
	font-weight: 600; font-size: 14px; color: var(--text-2); transition: background .15s, color .15s;
}
.tabs a .icon { width: 17px; height: 17px; color: var(--muted); }
.tabs a:hover { background: var(--surface-3); color: var(--text); }
.tabs a.is-active { background: var(--accent-soft); color: var(--accent-text); }
.tabs a.is-active .icon { color: currentColor; }
.tabs__count { padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: 12px; color: var(--muted); }

.block { scroll-margin-top: 72px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.block__title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.block__title .icon { width: 22px; height: 22px; color: var(--accent-text); }
.block__count { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- Описание ---------- */
.prose { display: flex; flex-direction: column; gap: 12px; color: var(--text-2); font-size: 15px; line-height: 1.75; }
.prose p { margin: 0; }
.props { display: flex; flex-direction: column; margin-top: 18px; border-top: 1px solid var(--border); }
.props__row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.props dt { font-size: 14px; color: var(--muted); padding-top: 3px; }
.props dd { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; padding: 3px 10px; border-radius: 7px; background: var(--surface-3); font-size: 13px; font-weight: 500; color: var(--text-2); }
a.tag { background: var(--link-soft); color: var(--link); }
a.tag:hover { background: color-mix(in srgb, var(--link) 20%, transparent); }

/* ---------- Файлы ---------- */
.files { display: flex; flex-direction: column; gap: 10px; }
.file {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon info btn" "icon meta meta";
	align-items: center; gap: 10px 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
}
.file__icon { grid-area: icon; align-self: start; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; color: var(--accent-text); background: var(--accent-soft); }
.file__info { grid-area: info; min-width: 0; }
.file__name { font-weight: 700; overflow-wrap: anywhere; }
.file__note { font-size: 13px; color: var(--muted); }
.file__btn { grid-area: btn; }
.file__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.file__meta dt { font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.file__meta dd { font-size: 14px; font-weight: 600; }
.note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.note .icon { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Скриншоты и просмотр ---------- */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shot { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface-3); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s, opacity .2s; }
.shot:hover img { transform: scale(1.05); opacity: .85; }
.shot__zoom {
	position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
	background: rgba(10, 12, 16, .65); color: #fff; opacity: 0; transition: opacity .2s;
}
.shot:hover .shot__zoom, .shot:focus-visible .shot__zoom { opacity: 1; }

.lightbox {
	position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
	padding: 24px; background: rgba(8, 10, 14, .9);
}
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; }
.lightbox__figure figcaption { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.lightbox__btn {
	display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px;
	background: rgba(255, 255, 255, .08); color: #fff;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .18); }
.lightbox__close { position: absolute; top: 16px; right: 16px; }

/* ---------- Обновления ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline__item { position: relative; }
.timeline__item::before {
	content: ""; position: absolute; left: -26px; top: 5px; width: 16px; height: 16px; border-radius: 4px;
	background: var(--surface); border: 2px solid var(--border-strong);
}
.timeline__item.is-latest::before { background: var(--accent); border-color: var(--accent); }
.timeline__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 4px; }
.timeline__ver { font-family: var(--font-pixel); font-size: 17px; font-weight: 700; }
.timeline__head time { font-size: 13px; color: var(--muted); }
.timeline__item p { font-size: 14px; color: var(--text-2); }

/* ---------- Рекомендуемые ---------- */
.similar { display: flex; flex-direction: column; gap: 12px; }
.similar__list { display: flex; flex-direction: column; margin: 0 -8px; }
.similar__item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; transition: background .15s; }
.similar__item:hover { background: var(--surface-3); }
.similar__item img { width: 42px; height: 56px; object-fit: cover; border-radius: 7px; background: var(--surface-3); }
.similar__body { display: flex; flex-direction: column; min-width: 0; }
.similar__title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar__item:hover .similar__title { color: var(--link); }
.similar__meta { font-size: 12px; color: var(--muted); }
.similar__rating { font-family: var(--font-pixel); font-size: 16px; color: var(--accent-text); }

/* ---------- Адаптивность ---------- */
@media (max-width: 1200px) {
	.head__inner { grid-template-columns: 200px minmax(0, 1fr); }
	.head__cover { width: 200px; }
	.score { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
	.score__stats { margin: 0 0 0 auto; padding: 0; border: 0; gap: 8px 24px; }
}
@media (max-width: 960px) {
	.game-layout { grid-template-columns: 1fr; }
	.game-aside { position: static; }
}
@media (max-width: 720px) {
	.head { border-radius: 16px; }
	.head__inner { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px; }
	.head__cover { width: 110px; border-radius: 10px; }
	.head__main { display: contents; }
	.head__main > .eyebrow, .head__title, .head__edition, .head__lead { grid-column: 2; }
	.head__main > .eyebrow { align-self: end; }
	.facts, .head__actions { grid-column: 1 / -1; }
	.head__cover { grid-row: 1 / span 4; }
	.facts { grid-template-columns: 1fr; margin-top: 0; }
	.facts__row { grid-template-columns: 110px minmax(0, 1fr); }
	.head__actions { padding-top: 4px; }
	.head__actions .btn { flex: 1 1 auto; }
	.score { padding: 14px 16px; }
	.score__value b { font-size: 44px; }
	.score__stats { margin: 0; }
	.block { padding: 18px 16px; }
	.props__row { grid-template-columns: 1fr; gap: 6px; }
	.shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.file { grid-template-areas: "icon info" "meta meta" "btn btn"; grid-template-columns: auto minmax(0, 1fr); }
	.file__btn { width: 100%; }
	.lightbox { grid-template-columns: 1fr 1fr; padding: 60px 12px 16px; }
	.lightbox__figure { grid-column: 1 / -1; grid-row: 1; }
	.lightbox__prev { justify-self: end; }
}
@media (max-width: 480px) {
	.head__inner { grid-template-columns: 1fr; gap: 14px; }
	.head__cover { width: 150px; margin: 0 auto; grid-row: auto; }
	.head__main { display: flex; flex-direction: column; gap: 8px; grid-column: auto; }
	.head__main > .eyebrow { align-self: flex-start; }
	.head__main > .eyebrow, .head__title, .head__edition, .head__lead { grid-column: auto; }
	.facts, .head__actions, .score { grid-column: auto; }
	.facts__row { grid-template-columns: 100px minmax(0, 1fr); }
	.score { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
}
