/* ============================================================
   PlayVirals game sites - Aurora theme stylesheet
   Premium purple & magenta look. Fully responsive:
   PC multi-column grid -> mobile single column list.
   All content stays in English.
   ============================================================ */

:root {
    --bg-primary: #f6f1fb;
    --bg-soft: #fdfaff;
    --ink: #2a1b3d;
    --ink-2: #6f5b85;
    --purple: #8e24aa;
    --purple-deep: #5e1188;
    --violet: #7b2dbe;
    --magenta: #e91e63;
    --pink: #ff4d8d;
    --card: #ffffff;
    --line: rgba(142, 36, 170, 0.10);
    --header-grad: linear-gradient(118deg, #45096e 0%, #8e24aa 48%, #d81b60 100%);
    --nav-grad: linear-gradient(90deg, rgba(38, 6, 66, 0.94), rgba(100, 20, 150, 0.94));
    --footer-grad: linear-gradient(135deg, #360851 0%, #7b1fa2 55%, #c2185b 100%);
    --thumb-grad: linear-gradient(150deg, #f1e2ff 0%, #fde4ef 100%);
    --shadow-xs: 0 2px 6px rgba(74, 20, 120, 0.06);
    --shadow-sm: 0 4px 12px rgba(74, 20, 120, 0.09);
    --shadow-md: 0 10px 26px rgba(74, 20, 120, 0.16);
    --shadow-lg: 0 22px 48px rgba(74, 20, 120, 0.22);
    --radius: 18px;
    --radius-sm: 12px;
    --ease-out: cubic-bezier(0.22, 0.7, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

html, body {
    min-height: 100%;
    font-family: 'Segoe UI', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(1100px 480px at 88% -8%, rgba(142, 36, 170, 0.10), transparent 60%),
        radial-gradient(900px 420px at -8% 12%, rgba(232, 30, 99, 0.07), transparent 55%),
        radial-gradient(700px 380px at 50% 110%, rgba(123, 31, 162, 0.06), transparent 60%),
        var(--bg-primary);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: rgba(232, 30, 99, 0.18); color: var(--purple-deep); }

:focus-visible {
    outline: 3px solid rgba(255, 64, 129, 0.55);
    outline-offset: 2px;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-grad);
    box-shadow: 0 10px 30px rgba(58, 8, 96, 0.38);
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%);
}

.site-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}

.header-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 23px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    flex-shrink: 0;
}

.logo .logo-mark {
    width: 46px;
    height: 46px;
    padding: 7px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.28),
        0 6px 16px rgba(20, 3, 36, 0.35);
    backdrop-filter: blur(4px);
    transition: transform 0.25s var(--ease-out);
}

.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }

.logo .logo-text {
    background: linear-gradient(92deg, #ffffff 18%, #ffd7ec 62%, #ffb3d2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.18);
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 999px;
    padding: 4px;
    box-shadow:
        0 10px 26px rgba(20, 3, 36, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.search-box:focus-within {
    box-shadow:
        0 0 0 3px rgba(255, 64, 129, 0.5),
        0 12px 30px rgba(20, 3, 36, 0.3);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 9px 18px;
    font-size: 15px;
    color: #3a2350;
}

.search-box input::placeholder { color: #b39bbf; }

.search-box button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--magenta), var(--pink));
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(232, 30, 99, 0.45);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.search-box button:hover { filter: brightness(1.1); transform: scale(1.06); }
.search-box button:active { transform: scale(0.94); }

/* ---------------- Main nav ---------------- */
.main-nav {
    position: relative;
    background: var(--nav-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 4px 14px rgba(24, 4, 43, 0.22);
}

.main-nav a {
    display: block;
    padding: 8px 17px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.main-nav a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.main-nav a.active {
    background: #fff;
    color: var(--purple-deep);
    box-shadow: 0 4px 14px rgba(20, 3, 36, 0.3);
}

/* ---------------- Main ---------------- */
.site-main { padding: 30px 0 60px; }

/* ---------------- Section headers ---------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.section-header + .section-header { margin-top: 42px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 22px;
    font-weight: 800;
    color: var(--purple-deep);
    letter-spacing: 0.2px;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 27px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--purple), var(--magenta));
    box-shadow: 0 3px 8px rgba(232, 30, 99, 0.35);
}

.section-title .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--magenta), var(--pink));
    color: #fff;
    font-size: 18px;
    box-shadow:
        0 6px 16px rgba(232, 30, 99, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 19px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid rgba(142, 36, 170, 0.16);
    color: var(--purple);
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: var(--shadow-xs);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.view-all::after { content: '\2192'; transition: transform 0.25s var(--ease-out); }

.view-all:hover {
    background: linear-gradient(135deg, var(--purple), var(--magenta));
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(142, 36, 170, 0.38);
}

.view-all:hover::after { transform: translateX(4px); }

/* ---------------- Game grid & cards ---------------- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.game-card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform 0.28s var(--ease-out), box-shadow 0.28s ease, border-color 0.28s ease;
}

.game-card:hover {
    transform: translateY(-7px);
    border-color: rgba(232, 30, 99, 0.32);
    box-shadow: var(--shadow-lg);
}

.game-card a { display: flex; flex-direction: column; height: 100%; }

.card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: var(--thumb-grad);
    overflow: hidden;
}

.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(130% 90% at 85% 0%, rgba(255, 255, 255, 0.72), transparent 55%);
    pointer-events: none;
}

.card-thumb img {
    position: relative;
    width: 74%;
    height: 74%;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(74, 20, 120, 0.25));
    transition: transform 0.35s var(--ease-out);
}

.game-card:hover .card-thumb img { transform: scale(1.1) rotate(-2deg); }

/* Rotate soft thumb tints for rhythm */
.games-grid .game-card:nth-child(4n+2) .card-thumb { background: linear-gradient(150deg, #e2f4ff, #f0e9ff); }
.games-grid .game-card:nth-child(4n+3) .card-thumb { background: linear-gradient(150deg, #e4faf0, #fff0e8); }
.games-grid .game-card:nth-child(4n+4) .card-thumb { background: linear-gradient(150deg, #fff2e0, #fde6f2); }

.card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 13px 15px 15px;
}

.game-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-meta::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--magenta));
    flex-shrink: 0;
}

/* ---------------- Load more ---------------- */
.load-more {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.load-more button {
    position: relative;
    padding: 14px 46px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple), var(--magenta) 65%, var(--pink));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(168, 46, 146, 0.4);
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease, filter 0.22s ease;
}

.load-more button:hover {
    transform: translateY(-3px);
    filter: brightness(1.06);
    box-shadow: 0 16px 32px rgba(168, 46, 146, 0.5);
}

.load-more button:active { transform: translateY(0) scale(0.97); }
.load-more button:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; filter: none; }

/* ---------------- Ads placeholder ---------------- */
.ads { margin: 26px 0; }

.ads-placeholder {
    position: relative;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(249, 232, 255, 0.85));
    border: 1px solid rgba(142, 36, 170, 0.13);
    color: #a78bbf;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    overflow: hidden;
    box-shadow: inset 0 1px 0 #fff, var(--shadow-xs);
}

.ads-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-45deg, rgba(142, 36, 170, 0.05) 0 10px, transparent 10px 20px);
}

.ads-placeholder::after {
    content: '';
    position: absolute;
    top: -80%;
    left: -45%;
    width: 42%;
    height: 260%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: rotate(22deg);
    animation: ad-shine 5.5s ease-in-out infinite;
}

@keyframes ad-shine {
    0%, 55% { left: -45%; }
    100% { left: 130%; }
}

/* Real ad injected: strip the placeholder look so the ad renders cleanly. */
.ads-placeholder.ads-live {
    min-height: 0;
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    letter-spacing: inherit;
    text-transform: none;
}
.ads-placeholder.ads-live::before,
.ads-placeholder.ads-live::after {
    display: none;
}

/* ---------------- Category page ---------------- */
.category-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--purple-deep);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.category-subtitle {
    font-size: 14.5px;
    color: var(--ink-2);
    margin-bottom: 24px;
}

.no-results {
    text-align: center;
    padding: 70px 20px;
    color: var(--ink-2);
    font-size: 15px;
}

.no-results .view-all { margin-top: 18px; }

/* ---------------- Breadcrumbs ---------------- */
.crumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--ink-2);
    margin-bottom: 20px;
}

.crumbs a {
    color: var(--purple);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(142, 36, 170, 0.07);
    transition: background 0.2s ease, color 0.2s ease;
}

.crumbs a:hover { background: rgba(232, 30, 99, 0.12); color: var(--magenta); }
.crumbs .sep { color: #cbb8d9; }

/* ---------------- Detail page ---------------- */
.game-hero {
    position: relative;
    display: flex;
    gap: 28px;
    background: var(--card);
    border-radius: 22px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    margin-bottom: 28px;
    overflow: hidden;
}

.game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple), var(--magenta), var(--pink));
}

.game-hero-icon {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 22px;
    padding: 16px;
    background: var(--thumb-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 0 0 1px rgba(142, 36, 170, 0.10),
        0 12px 26px rgba(74, 20, 120, 0.16);
}

.game-hero-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(74, 20, 120, 0.28)); }

.game-hero-info { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.game-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--purple-deep);
    line-height: 1.25;
}

.game-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.game-tag {
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fdf0f5, #fbe9ff);
    border: 1px solid rgba(232, 30, 99, 0.18);
    color: var(--magenta);
    font-size: 12.5px;
    font-weight: 700;
}

.game-hero-des {
    font-size: 15px;
    color: var(--ink-2);
    max-width: 740px;
}

.play-game-btn {
    position: relative;
    align-self: flex-start;
    padding: 14px 38px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple), var(--magenta) 60%, var(--pink));
    color: #fff;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(232, 30, 99, 0.45);
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease, filter 0.22s ease;
}

.play-game-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    animation: btn-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

.play-game-btn:hover { transform: translateY(-3px); filter: brightness(1.07); box-shadow: 0 18px 36px rgba(232, 30, 99, 0.55); }
.play-game-btn:active { transform: translateY(0) scale(0.97); }

@keyframes btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.45); }
    70% { box-shadow: 0 0 0 16px rgba(255, 64, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 64, 129, 0); }
}

.player-panel {
    border-radius: 22px;
    padding: 14px;
    background: linear-gradient(160deg, #3d0b63 0%, #7b1fa2 58%, #c2185b 100%);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.player-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #12071f;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.player-frame iframe { width: 100%; height: 100%; border: none; display: block; }

.player-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background:
        radial-gradient(520px 260px at 50% -10%, rgba(142, 36, 170, 0.55), transparent 65%),
        radial-gradient(420px 220px at 85% 110%, rgba(232, 30, 99, 0.35), transparent 60%),
        #14081f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #e3cdf0;
    font-size: 15px;
    text-align: center;
    padding: 20px;
}

.player-placeholder .big-emoji { font-size: 56px; filter: drop-shadow(0 8px 18px rgba(232, 30, 99, 0.5)); }

/* ---------------- Similar games ---------------- */
.similar-games-section { margin-top: 10px; }

.similar-games-scroll {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.similar-game-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: transform 0.26s var(--ease-out), box-shadow 0.26s ease, border-color 0.26s ease;
}

.similar-game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(232, 30, 99, 0.3);
    box-shadow: var(--shadow-md);
}

.similar-game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--thumb-grad);
    padding: 14px;
    transition: transform 0.3s var(--ease-out);
}

.similar-game-card:hover img { transform: scale(1.06); }

.similar-game-card .game-title {
    padding: 11px 12px 14px;
    font-size: 13px;
    -webkit-line-clamp: 1;
}

/* ---------------- Footer ---------------- */
.site-footer {
    position: relative;
    background: var(--footer-grad);
    color: rgba(255, 255, 255, 0.92);
    padding: 44px 0 36px;
    margin-top: 48px;
    box-shadow: 0 -12px 32px rgba(58, 8, 96, 0.22);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
    margin-bottom: 16px;
}

.footer-links a {
    position: relative;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    padding-bottom: 3px;
    transition: color 0.2s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--pink);
    transition: width 0.25s var(--ease-out);
}

.footer-links a:hover { color: #fff; }
.footer-links a:hover::after { width: 100%; }

.site-footer p { text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.72); margin-top: 8px; }

/* ---------------- Back to top ---------------- */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--magenta));
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.28s ease, transform 0.28s var(--ease-out), visibility 0.28s;
    box-shadow:
        0 12px 26px rgba(168, 46, 146, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    z-index: 90;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); filter: brightness(1.08); }
.back-to-top:active { transform: translateY(0) scale(0.94); }

/* ---------------- Loading overlay ---------------- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(700px 340px at 70% -10%, rgba(142, 36, 170, 0.12), transparent 60%),
        var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 999;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.loading-overlay.hidden { opacity: 0; visibility: hidden; }

.loading-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--magenta), var(--pink));
    box-shadow: 0 6px 14px rgba(232, 30, 99, 0.45);
    animation: dot-bounce 1.1s infinite ease-in-out;
}

.loading-dot:nth-child(2) { animation-delay: 0.16s; background: linear-gradient(135deg, var(--purple), var(--violet)); box-shadow: 0 6px 14px rgba(142, 36, 170, 0.45); }
.loading-dot:nth-child(3) { animation-delay: 0.32s; background: linear-gradient(135deg, var(--pink), #ffab40); box-shadow: 0 6px 14px rgba(255, 138, 64, 0.45); }

@keyframes dot-bounce {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-12px) scale(1.12); opacity: 1; }
}

/* ---------------- 404 / error page ---------------- */
.error-page {
    position: relative;
    text-align: center;
    padding: 90px 20px;
}

.error-page::before,
.error-page::after {
    content: '\2728';
    position: absolute;
    font-size: 34px;
    opacity: 0.35;
    animation: float-slow 5s ease-in-out infinite;
}

.error-page::before { top: 40px; left: 18%; }
.error-page::after { top: 70px; right: 16%; animation-delay: 1.6s; }

.error-page .code {
    font-size: 104px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--purple), var(--magenta) 60%, var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 12px 26px rgba(142, 36, 170, 0.25));
}

.error-page p { color: var(--ink-2); font-size: 16px; margin: 12px 0 28px; }

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
    .games-grid { grid-template-columns: repeat(5, 1fr); }
    .similar-games-scroll { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 992px) {
    .games-grid { grid-template-columns: repeat(4, 1fr); }
    .similar-games-scroll { grid-template-columns: repeat(4, 1fr); }
    .section-title { font-size: 20px; }
    .logo { font-size: 21px; }
}

@media (max-width: 768px) {
    .games-grid { grid-template-columns: repeat(3, 1fr); }
    .similar-games-scroll { grid-template-columns: repeat(3, 1fr); }
    .header-top { flex-wrap: wrap; }
    .search-box { order: 3; max-width: none; }
    .main-nav { overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .game-hero { flex-direction: column; align-items: center; text-align: center; }
    .game-hero-icon { width: 128px; height: 128px; }
    .play-game-btn { align-self: center; }
    .game-hero-des { max-width: none; }
}

@media (max-width: 576px) {
    .games-grid { grid-template-columns: 1fr; gap: 12px; }
    .similar-games-scroll { grid-template-columns: 1fr; gap: 12px; }
    /* horizontal cards on phones */
    .game-card a { flex-direction: row; align-items: stretch; }
    .card-thumb { width: 112px; flex-shrink: 0; aspect-ratio: 1; padding: 10px; }
    .card-thumb img { width: 82%; height: 82%; }
    .card-info { padding: 12px 14px; justify-content: center; gap: 5px; }
    .game-title { font-size: 15px; -webkit-line-clamp: 1; }
    .game-meta { font-size: 10.5px; }
    .similar-game-card { display: flex; align-items: center; text-align: left; }
    .similar-game-card img { width: 88px; aspect-ratio: 1; padding: 10px; }
    .similar-game-card .game-title { flex: 1; padding: 12px 14px; font-size: 14px; -webkit-line-clamp: 1; }
    .section-title { font-size: 18px; }
    .section-title .icon { width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }
    .section-title::before { height: 24px; }
    .page-wrapper { padding: 0 14px; }
    .game-hero { padding: 22px 18px; }
    .game-hero-title { font-size: 22px; }
    .category-title { font-size: 23px; }
    .error-page .code { font-size: 76px; }
    .header-top { padding: 12px 14px; }
    .logo { font-size: 19px; gap: 10px; }
    .logo .logo-mark { width: 40px; height: 40px; padding: 6px; border-radius: 12px; }
    .ads-placeholder { min-height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
