/* style.css — original stylesheet for the AnkerGames-style mirror UI */

:root {
  --bg: #f8fafc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --primary: #22c55e;
  --primary-ink: #052e16;
  --radius: 10px;
  --shadow: 0 10px 30px rgb(2 6 23 / .08);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070b12;
  --bg-2: #0b111b;
  --surface: #101827;
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --muted: #64748b;
  --line: #1e293b;
  --shadow: 0 12px 40px rgb(0 0 0 / .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 15px/1.55 "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.container { width: min(1440px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-mark { display: grid; place-items: center; }
.logo-word { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-accent { color: var(--primary); }
.main-nav { display: flex; gap: 4px; margin-inline: auto; }
.main-nav a {
  padding: 8px 13px; border-radius: 8px; font-weight: 550; font-size: 14px; color: var(--text-2);
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
[data-theme="light"] .i-sun, [data-theme="light"] .i-moon { display: none; }
[data-theme="light"] .i-sun { display: block; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }
@media (max-width: 900px) { .main-nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: clamp(380px, 58vw, 620px); overflow: hidden; background: #05080d; }
.hero-track { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; overflow: hidden; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); }
.slide.active .slide-bg img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.slide-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgb(7 11 18 / .96) 0%, rgb(9 14 22 / .86) 16%, rgb(11 17 26 / .62) 32%, rgb(13 19 30 / .38) 48%, transparent 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.slide-inner { max-width: 640px; padding-block: 40px; }
.slide-logo { max-height: 120px; width: auto; margin-bottom: 18px; }
.slide-title { color: #fff; font-size: clamp(26px, 4vw, 44px); font-weight: 800; line-height: 1.12; margin-bottom: 14px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.badge {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #fff;
  background: rgb(255 255 255 / .09); border: 1px solid rgb(255 255 255 / .12); backdrop-filter: blur(6px);
}
.badge-version { background: var(--primary); color: var(--primary-ink); border: 0; box-shadow: 0 6px 18px rgb(34 197 94 / .35); }
.badge-plain { color: #cbd5e1; font-size: 13.5px; }
.badge-plain.muted { color: #8fa0b5; }
.slide-desc {
  color: #b9c5d4; font-size: 14.5px; line-height: 1.65; margin: 0 0 22px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.slide-actions { display: flex; gap: 18px; align-items: center; }
.hero-ui { position: absolute; inset-inline: 0; bottom: 22px; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero-arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2);
  background: rgb(10 15 23 / .55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px);
  transition: background .15s;
}
.hero-arrow:hover { background: rgb(34 197 94 / .85); color: #04140a; border-color: transparent; }
.hero-dots { display: flex; gap: 7px; }
.dot-btn { width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgb(255 255 255 / .35); cursor: pointer; transition: width .25s, background .25s; padding: 0; }
.dot-btn.active { width: 24px; background: var(--primary); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  font-weight: 650; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 8px 22px rgb(34 197 94 / .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgb(34 197 94 / .4); }
.btn-ghost { background: transparent; color: #cbd5e1; border-color: rgb(255 255 255 / .18); }
.page .btn-ghost, .pager .btn-ghost { color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- page sections ---------- */
.page { padding: 34px 0 60px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 16px; }
.section-head:first-child { margin-top: 8px; }
.section-head h2 { font-size: 21px; font-weight: 750; }
.view-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.view-all:hover { color: var(--primary); }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.page-intro { color: var(--text-2); margin: 8px 0 0; max-width: 70ch; }

/* ---------- cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 900px) { .grid-cards { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 1536px) { .grid-cards { grid-template-columns: repeat(8, 1fr); } }
.card { position: relative; border-radius: var(--radius); overflow: hidden; display: block; background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); }
.card-frame { position: relative; display: block; aspect-ratio: 2/3; background: var(--bg-2); }
.card-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-frame img { transform: scale(1.06); }
.card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(2 6 12 / .85)); opacity: .6; transition: opacity .25s; }
.card:hover .card-shade { opacity: 1; }
.card-reveal {
  position: absolute; inset-inline: 0; bottom: 0; padding: 12px; display: grid; gap: 4px;
  transform: translateY(8px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.card:hover .card-reveal, .card:focus-within .card-reveal { transform: none; opacity: 1; }
@media (hover: none) { .card-reveal { opacity: 1; transform: none; } }
.card-genre { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .65); font-weight: 600; }
.card-title { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 8px; color: rgb(255 255 255 / .7); font-size: 12px; font-weight: 550; }
.card-meta .dot { width: 1px; height: 11px; background: rgb(255 255 255 / .3); }

/* ---------- upcoming tiles ---------- */
.grid-upcoming { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 900px) { .grid-upcoming { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid-upcoming { grid-template-columns: repeat(4, 1fr); } }
.up-tile { position: relative; display: block; height: 140px; border-radius: 12px; overflow: hidden; background: var(--surface); }
.up-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.up-tile:hover img { transform: scale(1.08); }
.up-veil { position: absolute; inset: 0; background: linear-gradient(135deg, rgb(2 6 12 / .62), rgb(2 6 12 / .55)); }
.up-body { position: absolute; inset: 0; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.up-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.up-title { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-tile:hover .up-title { color: #a5f3c9; }
.up-date { align-self: flex-start; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: #bfdbfe; background: rgb(59 130 246 / .14); border: 1px solid rgb(59 130 246 / .25); }
.chip { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #dbeafe; background: rgb(59 130 246 / .12); border: 1px solid rgb(59 130 246 / .2); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-lg { padding: 9px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); transition: all .15s; }
.chip-lg:hover { color: var(--primary-ink); background: var(--primary); border-color: transparent; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- collections scroller ---------- */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.scroller::-webkit-scrollbar { height: 8px; }
.scroller::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.cl-tile { position: relative; aspect-ratio: 16/8.5; border-radius: 14px; overflow: hidden; scroll-snap-align: start; background: var(--surface); }
.cl-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cl-tile:hover img { transform: scale(1.06); }
.cl-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgb(2 6 12 / .78)); }
.cl-name { position: absolute; left: 16px; bottom: 12px; color: #fff; font-weight: 750; font-size: 17px; }

/* ---------- detail page ---------- */
.detail-hero { display: grid; gap: 26px; margin-top: 10px; }
@media (min-width: 860px) { .detail-hero { grid-template-columns: 300px 1fr; } }
.detail-poster { align-self: start; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.detail-hero.poster-wide { grid-template-columns: 1fr !important; }
.detail-hero.poster-wide .detail-poster img { width: 100%; max-height: 440px; object-fit: cover; }
.detail-info h1 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; margin-bottom: 14px; }
.detail-desc { color: var(--text-2); margin: 16px 0 22px; max-width: 74ch; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.detail-section { margin-top: 40px; }
.detail-section h2 { font-size: 20px; font-weight: 750; margin-bottom: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.detail-section p { color: var(--text-2); max-width: 80ch; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; }
@media (min-width: 860px) { .shots { grid-template-columns: repeat(4, 1fr); } }
.shots img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.shot-more.hidden { display: none; }
.shots .btn { grid-column: 1 / -1; justify-self: start; }
.trailer { margin-top: 26px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; max-width: 900px; }
.trailer iframe { width: 100%; height: 100%; border: 0; }
.install { color: var(--text-2); padding-left: 22px; display: grid; gap: 7px; }
.sysreq-tier { margin-top: 22px; }
.sysreq-tier h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin-bottom: 10px; }
.sysreq-tier dl { margin: 0; display: grid; gap: 6px; }
.sysreq-tier dl > div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.sysreq-tier dt { color: var(--muted); font-size: 13.5px; }
.sysreq-tier dd { margin: 0; font-size: 13.5px; font-weight: 550; }
@media (max-width: 640px) { .sysreq-tier dl > div { grid-template-columns: 1fr; gap: 2px; } }
.muted-note { color: var(--text-2); }
.muted-note a { color: var(--primary); font-weight: 600; }

/* ---------- ad slots ---------- */
.ad-slot { display: block; margin: 0 auto; text-align: center; }
body > .ad-slot { margin-top: 14px; }
.ad-slot:empty { display: none; }

/* ---------- pager ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; }
.pager-info { color: var(--text-2); font-size: 13.5px; }

/* ---------- modal + search ---------- */
.modal-overlay, .search-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgb(2 6 12 / .6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.search-overlay { align-items: flex-start; padding-top: 90px; }
[hidden] { display: none !important; }
.modal {
  width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-sub { color: var(--text-2); font-size: 13px; margin: 2px 0 0; }
.modal-body { padding: 20px; display: grid; gap: 14px; }
.modal-note { color: var(--text-2); font-size: 14px; margin: 0; }
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.dl-host { font-weight: 600; font-size: 14px; }
.dl-host em { font-style: normal; color: var(--muted); font-size: 12px; }
.dl-go { padding: 8px 16px; font-size: 13px; }
.dl-go:disabled { opacity: .55; cursor: wait; }
.search-panel {
  width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.search-row { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-row input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; padding: 14px 0; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.sr-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.sr-item:hover, .sr-item:focus-visible { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.sr-item img { width: 42px; height: 60px; object-fit: cover; border-radius: 6px; background: var(--bg-2); }
.sr-name { font-weight: 600; font-size: 14px; }
.sr-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 30px; }
.footer-grid { display: grid; gap: 26px; padding: 38px 0 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.footer-grid a { display: block; padding: 3px 0; color: var(--text-2); font-size: 14px; }
.footer-grid a:hover { color: var(--primary); }
.footer-note { color: var(--text-2); font-size: 13.5px; max-width: 42ch; }
.footer-note a { display: inline; color: var(--primary); }
.footer-bottom { padding: 14px 0 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
