/* psportal.games – dark, PlayStation-inspired design. Fonts are self-hosted (no requests to Google). */

@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('/fonts/sora-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url('/fonts/sora-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('/fonts/sora-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-weight: 700; font-display: swap; src: url('/fonts/sora-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #070b16;
  --bg-raised: #0a0f1d;
  --surface: #111a2e;
  --surface-2: #121a2c;
  --line: #1a2338;
  --line-2: #2a3652;
  --text: #e9eefb;
  --text-2: #c5d0e6;
  --muted: #8fa0c2;
  --soft: #a9b6d1;
  --accent: #0a5bd8;
  --accent-text: #7fb4ff;
  --ok: #3ddc97;
  --radius: 14px;
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
a { color: var(--accent-text); }
a:hover { color: #b3d3ff; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #4d8dff; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header { background: var(--bg-raised); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo:hover { color: var(--text); }
.logo span { color: #4d8dff; }
.main-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav a { color: var(--text-2); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.header-search { flex: 1 1 280px; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.search-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 48px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; }
.search-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 16px; }
.search-field:focus-within { border-color: #4d8dff; }
.search-field svg { flex: none; }

/* Country menu (a <details> dropdown, works without JavaScript) */
.country { position: relative; }
.country > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--surface-2); border: 1px solid #26314a; border-radius: 999px; cursor: pointer; font-weight: 500; }
.country > summary::-webkit-details-marker { display: none; }
.country-code { display: none; }
.country-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(560px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 16px; background: var(--bg-raised); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 20px 50px #000a; }
.country-menu h3 { font-size: 13px; color: var(--muted); font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 4px 0 8px; }
.country-menu ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px; }
.country-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.country-menu a:hover, .country-menu a[aria-current="true"] { background: var(--surface); color: var(--text); }

/* ---------- Buttons, chips, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0b4fbd; color: #fff; }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { background: #18223a; color: var(--text); }
.btn-lg { min-height: 56px; font-size: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); text-decoration: none; font-weight: 500; }
.chip:hover { color: var(--text); border-color: #3a4a6e; }
.chip-plus { background: #2b2410; color: #f6d365; border-color: #4a3d14; }
.chip-free { background: #0f2e2a; color: #6ee7d2; border-color: #1d4a43; }
.chip-classics { background: #221c3d; color: #c7b8ff; border-color: #3a2f63; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge-plus { background: #f6d365; color: #2a2003; }
.badge-monthly { background: #f6b84a; color: #2a1a03; }
.badge-free { background: #6ee7d2; color: #052420; }
.badge-classics { background: #c7b8ff; color: #1b1240; }
.badge-ubisoft { background: #a5c8ff; color: #0a1a3a; }
.badge-buy { background: #26314a; color: #dbe3f3; }
.badge-new { background: var(--ok); color: #062014; }
.badge-removed { background: #5a2424; color: #ffd2cb; }

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; }
.game-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); min-width: 0; }
.game-card:hover { color: var(--text); }
.game-card .cover { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.game-card:hover .cover img { transform: scale(1.04); }
.game-card .cover .badge { position: absolute; top: 8px; left: 8px; }
.game-card .title { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.game-card .meta { color: var(--muted); font-size: 13px; }
.game-card.is-removed .cover img { filter: grayscale(1) brightness(.6); }
.game-card.is-removed .title { color: var(--muted); }

/* ---------- Home ---------- */
.hero { padding: 56px 0 40px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #0f1e3d; color: #9cc3ff; font-size: 14px; font-weight: 500; margin: 0 0 16px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.03em; max-width: 820px; }
.hero .lead { margin: 18px 0 28px; max-width: 640px; color: var(--soft); font-size: clamp(17px, 2.2vw, 19px); }
.hero-search { display: flex; flex-wrap: wrap; gap: 12px; max-width: 760px; margin-bottom: 20px; }
.hero-search .search-field { flex: 1 1 320px; min-height: 60px; border-radius: 16px; }
.hero-search .search-field input { font-size: 17px; }
.hero-search .btn { min-height: 60px; border-radius: 16px; padding: 0 28px; font-size: 17px; }

.section { padding: 28px 0 44px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(22px, 3vw, 28px); }

.ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.way { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid #222d46; text-decoration: none; color: var(--text); }
.way:hover { color: var(--text); border-color: #34446a; }
.way .badge { align-self: flex-start; font-size: 13px; padding: 4px 10px; }
.way strong { font-family: var(--font-display); font-size: 20px; }
.way span:last-child { color: var(--soft); font-size: 15px; }

.genre-links { display: flex; flex-wrap: wrap; gap: 10px; }
.genre-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--surface); border: 1px solid #222d46; color: #dbe3f3; text-decoration: none; font-weight: 500; }
.genre-links a:hover { border-color: #34446a; }

.newsletter { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: #0e1a36; border: 1px solid #1f3566; }
.newsletter > div { flex: 1 1 360px; }
.newsletter h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 8px; }
.newsletter p { margin: 0; color: var(--soft); }
.newsletter form { flex: 1 1 340px; display: flex; flex-wrap: wrap; gap: 12px; }
.newsletter input[type=email] { flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 16px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; }
.newsletter .form-message { flex-basis: 100%; margin: 0; font-size: 15px; }
.newsletter .form-message.ok { color: #7ff0bd; }
.newsletter .form-message.error { color: #ffb4a8; }

/* ---------- Games list ---------- */
.list-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding: 28px 0 64px; }
.filters { flex: 1 1 240px; max-width: 300px; }
.filters-toggle { display: none; }
.filters fieldset { margin: 0 0 24px; padding: 0; border: 0; }
.filters legend { margin-bottom: 10px; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; margin-bottom: 4px; border-radius: 10px; background: #0f1628; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.genre-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-chip input { position: absolute; opacity: 0; pointer-events: none; }
.genre-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: #0f1628; color: var(--text-2); border: 1px solid #222d46; font-size: 14px; font-weight: 500; cursor: pointer; }
.genre-chip input:checked + span { background: #0f2a5c; color: #cfe0ff; border-color: #2f5fb5; }
.genre-chip input:focus-visible + span { outline: 3px solid #4d8dff; outline-offset: 2px; }
.filters .apply { width: 100%; }
.results { flex: 999 1 560px; min-width: 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.results-head h1 { font-size: clamp(24px, 3.4vw, 30px); }
.results-head p { margin: 4px 0 0; color: var(--muted); }
.select { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.select select { min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; }
.load-more { display: flex; justify-content: center; margin-top: 40px; }
.empty { padding: 40px; border-radius: 18px; background: var(--surface); text-align: center; color: var(--soft); }

/* ---------- Game page ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0; padding: 0; color: var(--muted); font-size: 15px; }
.breadcrumb li + li::before { content: '/'; margin-right: 8px; color: #4a5878; }
.game-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 40px; align-items: start; }
.game-cover { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: var(--surface); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-info { display: flex; flex-direction: column; gap: 20px; }
.game-info h1 { font-size: clamp(28px, 4vw, 42px); }
.status { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: 14px; }
.status svg { flex: none; margin-top: 2px; }
.status-ok { background: #0f2e22; border: 1px solid #1f5a40; color: #c9f5e1; }
.status-ok strong { color: #7ff0bd; }
.status-removed { background: #2a1414; border: 1px solid #5a2424; color: #f3d3ce; }
.status-removed strong { color: #ffb4a8; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.facts div { padding: 14px; border-radius: 14px; background: var(--surface); }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.ways-list { display: flex; flex-direction: column; gap: 8px; }
.ways-list div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); color: #dbe3f3; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info-box { padding: 20px; border-radius: 16px; background: #0e1a36; border: 1px solid #1f3566; }
.info-box h2 { font-size: 18px; margin-bottom: 10px; }
.info-box ol { margin: 0; padding-left: 20px; color: var(--text-2); }
.region-links { display: flex; flex-wrap: wrap; gap: 8px; }
.region-links a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid #222d46; color: var(--text-2); text-decoration: none; font-size: 14px; }
.region-links a:hover { color: var(--text); border-color: #34446a; }
.small { font-size: 14px; }

/* ---------- Content pages ---------- */
.page { padding: 40px 0 64px; max-width: 860px; }
.page h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.page h2 { font-size: 22px; margin: 32px 0 12px; }
.page h3 { font-size: 17px; margin: 24px 0 8px; }
.page ul.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.page ul.list li { padding: 14px 16px; border-radius: 12px; background: var(--surface); color: var(--text-2); }
.stat-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.stat-table th, .stat-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.stat-table td:last-child, .stat-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.stat-table th { color: var(--muted); font-weight: 500; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-raised); color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- psplus.games: same design, PS Plus yellow instead of blue ---------- */
.site-plus { --accent: #f2b705; --accent-text: #f6d365; }
.site-plus .logo span { color: #f2b705; }
.site-plus .btn-primary { background: #f2b705; color: #1d1600; }
.site-plus .btn-primary:hover { background: #ffc928; color: #1d1600; }
/* Plain text links only; cards, chips and buttons keep their own colors */
.site-plus a:not([class]) { color: var(--accent-text); }
.site-plus a:not([class]):hover { color: #ffe08a; }
.site-plus .main-nav a { color: var(--text-2); }
.site-plus .main-nav a:hover, .site-plus .main-nav a[aria-current="page"] { color: var(--text); }
.site-plus .pill { background: #2b2410; color: #f6d365; }
.site-plus :focus-visible { outline-color: #f2b705; }
.site-plus .search-field:focus-within { border-color: #f2b705; }
.site-plus .genre-chip input:checked + span { background: #3a2f0a; color: #ffe08a; border-color: #8a6d12; }
.tier-card .tier-count { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; }
.portal-yes { color: #7ff0bd; }
.portal-no { color: #ffb4a8; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .country-name { display: none; }
  .country-code { display: inline; }
  .country > summary { padding: 0 12px; }
  .main-nav a { white-space: nowrap; }
  .header-search { order: 4; flex-basis: 100%; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .filters { max-width: none; flex-basis: 100%; }
  .filters-toggle { display: inline-flex; }
  .filters-body { display: none; margin-top: 16px; }
  .filters.open .filters-body { display: block; }
  .list-layout { gap: 16px; padding-top: 16px; }
  .game-layout { grid-template-columns: 1fr; gap: 24px; }
  .actions .btn { flex: 1 1 100%; }
  .hero { padding: 36px 0 28px; }
}
