/*
 * AI Built Games - v2 design
 * Loaded after styles.min.css only when DESIGN_VERSION === 'v2' (see index.php).
 * Every rule is scoped to html.v2 so it wins over the v1 rules without !important,
 * and only visual properties are changed: the page structure and layout logic stay v1.
 */

/* ---------- Design tokens ---------- */

html.v2 {
    --v2-bg: #f3f4fa;
    --v2-bg-glow-1: rgba(124, 92, 255, 0.16);
    --v2-bg-glow-2: rgba(34, 211, 238, 0.14);
    --v2-surface: rgba(255, 255, 255, 0.78);
    --v2-surface-solid: #ffffff;
    --v2-surface-2: rgba(15, 18, 41, 0.04);
    --v2-border: rgba(15, 18, 41, 0.08);
    --v2-border-strong: rgba(15, 18, 41, 0.16);
    --v2-text: #0f1229;
    --v2-muted: #5b6080;
    --v2-accent: #6d4aff;
    --v2-accent-2: #0891b2;
    --v2-accent-soft: rgba(109, 74, 255, 0.1);
    --v2-grad: linear-gradient(135deg, #7c5cff 0%, #22b8d6 100%);
    --v2-grad-text: linear-gradient(135deg, #6d4aff 0%, #0891b2 100%);
    --v2-shadow: 0 1px 2px rgba(15, 18, 41, 0.04), 0 8px 24px rgba(15, 18, 41, 0.06);
    --v2-shadow-hover: 0 2px 4px rgba(15, 18, 41, 0.06), 0 18px 40px rgba(76, 52, 200, 0.14);
    --v2-header-bg: rgba(255, 255, 255, 0.72);
    --v2-radius: 18px;
    --v2-radius-sm: 12px;
    --v2-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --v2-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

    /* Remap the v1 variables so every v1 rule that uses them picks up the new palette */
    --bg-primary: var(--v2-bg);
    --bg-header: var(--v2-header-bg);
    --text-primary: var(--v2-text);
    --text-secondary: var(--v2-muted);
    --card-bg: var(--v2-surface);
    --card-shadow: rgba(15, 18, 41, 0.08);
    --nav-text: var(--v2-text);
    --border-color: var(--v2-border);
    --badge-border-color: var(--v2-border-strong);
    --banner-bg: var(--v2-surface);
    --banner-text: var(--v2-text);
    --banner-border: var(--v2-border);
    --banner-hover: var(--v2-surface-solid);
    --sidebar-bg: var(--v2-surface);
    --sidebar-text: var(--v2-text);
    --sidebar-border: var(--v2-border);
    --sidebar-shadow: rgba(15, 18, 41, 0.06);
    --total-games-bg: var(--v2-surface);
    --total-games-text: var(--v2-text);
    --select-bg: var(--v2-surface-solid);
    --select-text: var(--v2-text);
    --select-border: var(--v2-border-strong);
    --select-focus: var(--v2-accent);
    --select-focus-shadow: var(--v2-accent-soft);
    --scrollbar-bg: transparent;
    --scrollbar-thumb: rgba(109, 74, 255, 0.35);
    --scrollbar-thumb-hover: rgba(109, 74, 255, 0.6);
    --skeleton-bg: rgba(15, 18, 41, 0.06);
    --accent-color: var(--v2-accent);
    --button-bg: var(--v2-surface-2);
    --button-hover: var(--v2-accent-soft);
    --shadow-color: rgba(15, 18, 41, 0.12);
}

html.v2[data-theme="dark"] {
    --v2-bg: #07080f;
    --v2-bg-glow-1: rgba(124, 92, 255, 0.22);
    --v2-bg-glow-2: rgba(34, 211, 238, 0.12);
    --v2-surface: rgba(17, 19, 35, 0.82);
    --v2-surface-solid: #12142a;
    --v2-surface-2: rgba(255, 255, 255, 0.05);
    --v2-border: rgba(255, 255, 255, 0.08);
    --v2-border-strong: rgba(255, 255, 255, 0.16);
    --v2-text: #eef0ff;
    --v2-muted: #9ca1c4;
    --v2-accent: #9b7bff;
    --v2-accent-2: #22d3ee;
    --v2-accent-soft: rgba(155, 123, 255, 0.16);
    --v2-grad-text: linear-gradient(135deg, #b9a3ff 0%, #5ee7f8 100%);
    --v2-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --v2-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.4), 0 20px 50px rgba(124, 92, 255, 0.25);
    --v2-header-bg: rgba(10, 11, 22, 0.7);
    --card-shadow: rgba(0, 0, 0, 0.35);
    --sidebar-shadow: rgba(0, 0, 0, 0.35);
    --skeleton-bg: rgba(255, 255, 255, 0.06);
    --scrollbar-thumb: rgba(155, 123, 255, 0.35);
    --scrollbar-thumb-hover: rgba(155, 123, 255, 0.6);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */

html.v2 body {
    font-family: var(--v2-font);
    color: var(--v2-text);
    background:
        radial-gradient(1200px 600px at 10% -10%, var(--v2-bg-glow-1), transparent 60%),
        radial-gradient(1000px 600px at 100% 0%, var(--v2-bg-glow-2), transparent 55%),
        var(--v2-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

html.v2 h1,
html.v2 h2,
html.v2 h3,
html.v2 h4 {
    font-family: var(--v2-font-display);
    letter-spacing: -0.02em;
    color: var(--v2-text);
}

html.v2 a {
    color: var(--v2-accent);
    text-underline-offset: 3px;
}

html.v2 ::selection {
    background: var(--v2-accent);
    color: #fff;
}

html.v2 :focus-visible {
    outline: 2px solid var(--v2-accent);
    outline-offset: 2px;
}

html.v2 #bg-canvas {
    opacity: 1;
    pointer-events: none;
}

/* ---------- Header ---------- */

html.v2 .fancy-header {
    background: var(--v2-header-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--v2-border);
    box-shadow: none;
    color: var(--v2-text);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

html.v2 .site-logo {
    height: 38px;
    border-radius: 10px;
}

html.v2 .fancy-header h1,
html.v2 .fancy-header .site-title {
    font-family: var(--v2-font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--v2-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html.v2 nav a {
    color: var(--v2-text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 999px;
}

html.v2 nav a:hover {
    color: var(--v2-accent);
    transform: none;
}

html.v2 nav a.active {
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
    border-radius: 999px;
}

html.v2 nav a[href="/submit"],
html.v2 nav a[href="/submit"].active {
    background: var(--v2-grad);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(109, 74, 255, 0.35);
}

html.v2 nav a[href="/submit"]:hover {
    background: var(--v2-grad);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(109, 74, 255, 0.45);
}

html.v2 .nav-toggle {
    color: var(--v2-text);
}

html.v2 .dropdown-menu {
    background: var(--v2-surface-solid);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    box-shadow: var(--v2-shadow-hover);
    padding: 6px;
}

html.v2 .dropdown-menu a {
    color: var(--v2-text);
    border-radius: 8px;
}

html.v2 .dropdown-menu a:hover,
html.v2 .dropdown-menu a.active {
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
}

html.v2 .theme-toggle {
    width: 40px;
    height: 40px;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--v2-border);
    background: var(--v2-surface-2);
    transition: background 0.2s ease, transform 0.2s ease;
}

html.v2 .theme-toggle:hover {
    background: var(--v2-accent-soft);
    transform: rotate(-12deg);
}

@media (max-width: 768px) {
    /* Mobile menu panel: same mechanics as v1, new surface */
    html.v2 nav ul,
    html.v2 .main-nav {
        background: var(--v2-surface-solid);
        border-top: 1px solid var(--v2-border);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    }

    html.v2 nav ul li,
    html.v2 .main-nav > li {
        border-bottom: 1px solid var(--v2-border);
    }

    html.v2 nav a,
    html.v2 nav a.active {
        border-radius: 0;
        color: var(--v2-text);
    }

    html.v2 nav a:hover {
        background: var(--v2-accent-soft);
        color: var(--v2-accent);
    }

    html.v2 nav a.active {
        border-left: 3px solid var(--v2-accent);
    }

    html.v2 nav a[href="/submit"] {
        margin: 0.75rem 1rem;
        width: auto;
        border-radius: 999px;
    }

    html.v2 .dropdown-menu,
    html.v2 .dropdown.active .dropdown-menu {
        background: var(--v2-surface-2);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    html.v2 .dropdown-menu a {
        color: var(--v2-text);
        border-radius: 0;
    }
}

/* ---------- Hero ---------- */

html.v2 .hero {
    background: transparent;
    color: var(--v2-text);
    padding: 5rem 1.5rem 3rem;
}

html.v2 .hero::before {
    background:
        radial-gradient(600px 220px at 50% 40%, var(--v2-bg-glow-1), transparent 70%);
}

html.v2 .hero h1,
html.v2 .hero h2 {
    font-family: var(--v2-font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 1.1rem;
    text-shadow: none;
    background: var(--v2-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

html.v2 .hero p {
    color: var(--v2-muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto;
    opacity: 1;
}

/* ---------- Sponsored banners ---------- */

html.v2 .banner-wrapper {
    gap: 0.75rem;
}

html.v2 .banner-item {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    box-shadow: none;
    padding: 0.95rem 1.25rem;
    font-size: 0.92rem;
}

html.v2 .banner-item:hover {
    background: var(--v2-surface-solid);
    border-color: var(--v2-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--v2-shadow);
}

html.v2 .banner-item a,
html.v2 .banner-item:not(:last-child) a {
    color: var(--v2-text);
    text-decoration-color: var(--v2-border-strong);
}

html.v2 .banner-item:not(:last-child)::after {
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.6rem;
    color: var(--v2-muted);
}

html.v2 .pulse {
    background: #22c55e;
}

/* ---------- Layout surfaces ---------- */

html.v2 .container {
    gap: 1.75rem;
}

html.v2 .fancy-card {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow);
    padding: 0.6rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

html.v2 .fancy-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 92, 255, 0.35);
    box-shadow: var(--v2-shadow-hover);
}

html.v2 .fancy-sidebar {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow);
    color: var(--v2-text);
}

html.v2 .game-sidebar {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow);
    padding: 1.5rem;
}

html.v2 .game-sidebar h3 {
    font-size: 1.05rem;
}

html.v2 .fancy-sidebar h3 {
    font-size: 1.05rem;
    color: var(--v2-text);
}

html.v2 .fancy-sidebar h3::after {
    height: 3px;
    width: 36px;
    border-radius: 3px;
    background: var(--v2-grad);
}

html.v2 .category-header {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: var(--v2-shadow);
}

html.v2 .category-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 0.5rem;
}

html.v2 .category-description {
    color: var(--v2-muted);
}

/* ---------- Toolbar: search, total, sort ---------- */

html.v2 .game-search {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    box-shadow: none;
    padding: 0.8rem 1.3rem;
    color: var(--v2-text);
    font-family: var(--v2-font);
}

html.v2 .game-search::placeholder {
    color: var(--v2-muted);
}

html.v2 .game-search:focus {
    border-color: var(--v2-accent);
    box-shadow: 0 0 0 4px var(--v2-accent-soft);
}

html.v2 .total-games,
html.v2 .fancy-select {
    background-color: var(--v2-surface);
    border: 1px solid var(--v2-border);
    border-radius: 999px;
    box-shadow: none;
    color: var(--v2-text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--v2-font);
}

html.v2 .fancy-select option {
    background: var(--v2-surface-solid);
    color: var(--v2-text);
}

html.v2 .sort-wrapper label {
    color: var(--v2-muted);
    font-size: 0.9rem;
}

/* ---------- Game cards ---------- */

html.v2 .game-grid {
    gap: 1.25rem;
}

html.v2 .screenshot-wrapper,
html.v2 .game-card .screenshot-wrapper {
    border-radius: calc(var(--v2-radius) - 6px);
    background: var(--v2-surface-2);
}

html.v2 .game-screenshot {
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.v2 .fancy-card:hover .game-screenshot {
    transform: scale(1.04);
}

html.v2 .game-info {
    padding: 0.9rem 0.6rem 0.5rem;
}

html.v2 .game-card h2,
html.v2 .game-card h2 a,
html.v2 .featured-game h4,
html.v2 .featured-game h4 a {
    color: var(--v2-text);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
}

html.v2 .fancy-card:hover h2,
html.v2 .fancy-card:hover h4,
html.v2 .fancy-card:hover h2 a,
html.v2 .fancy-card:hover h4 a {
    color: var(--v2-accent);
}

html.v2 .game-category {
    background: var(--v2-accent-soft);
    border: 1px solid transparent;
    color: var(--v2-accent);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}

html.v2 .game-category:hover {
    background: var(--v2-accent);
    border-color: var(--v2-accent);
    color: #fff;
}

html.v2 .author {
    font-style: normal;
    color: var(--v2-muted);
    font-size: 0.85rem;
}

html.v2 .author a {
    color: var(--v2-muted);
    font-weight: 500;
}

html.v2 .author a:hover {
    color: var(--v2-accent);
}

html.v2 .game-info > p:not(.author) {
    color: var(--v2-muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* Upvote */
html.v2 .vote-button {
    background: var(--v2-surface-2);
    border: 1px solid var(--v2-border);
    color: var(--v2-text);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--v2-font);
}

html.v2 .vote-button:hover:not(.voted) {
    background: var(--v2-accent-soft);
    border-color: var(--v2-accent);
    color: var(--v2-accent);
    transform: translateY(-1px);
}

html.v2 .vote-button.voted {
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
    border-color: transparent;
}

html.v2 .vote-count {
    color: var(--v2-text);
    font-variant-numeric: tabular-nums;
}

/* Buttons */
html.v2 .fancy-button {
    background: var(--v2-grad);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    font-family: var(--v2-font);
    box-shadow: 0 6px 18px rgba(109, 74, 255, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

html.v2 .fancy-button:hover {
    background: var(--v2-grad);
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(109, 74, 255, 0.4);
}

html.v2 .load-game-btn,
html.v2 .game-actions .fancy-button {
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    font-family: var(--v2-font);
}

html.v2 .load-game-btn {
    background: var(--v2-surface-2);
    border: 1px solid var(--v2-border-strong);
    color: var(--v2-text);
}

html.v2 .load-game-btn:hover {
    background: var(--v2-text);
    border-color: var(--v2-text);
    color: var(--v2-bg);
    box-shadow: none;
}

/* Bookmark + share */
html.v2 .bookmark-button,
html.v2:root[data-theme="light"] .bookmark-button,
html.v2:root[data-theme="dark"] .bookmark-button {
    background: rgba(10, 11, 22, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    top: 0.85rem;
    right: 0.85rem;
    box-shadow: none;
}

html.v2 .bookmark-button:hover {
    background: rgba(10, 11, 22, 0.75);
}

html.v2 .bookmark-button.bookmarked {
    background: var(--v2-grad);
    border-color: transparent;
}

html.v2 .share-button {
    background: transparent;
    border: 1px solid var(--v2-border);
    color: var(--v2-muted);
}

html.v2 .share-button:hover {
    background: var(--v2-accent-soft);
    border-color: var(--v2-accent);
    color: var(--v2-accent);
}

/* Play count badge (most played) */
html.v2 .play-count-badge {
    background: rgba(10, 11, 22, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

/* ---------- Featured sidebar ---------- */

html.v2 .featured-game-card {
    background: var(--v2-surface-2);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    box-shadow: none;
    padding: 0.5rem;
}

html.v2 .featured-game-card .screenshot-wrapper {
    border-radius: 8px;
}

html.v2 .featured-game-info h4 {
    font-size: 1rem;
    color: var(--v2-text);
}

html.v2 .fancy-button.small {
    width: 100%;
    text-align: center;
}

html.v2 .featured-link a {
    display: block;
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px dashed var(--v2-border-strong);
    color: var(--v2-text);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

html.v2 .featured-link a:hover {
    border-color: var(--v2-accent);
    color: var(--v2-accent);
    background: var(--v2-accent-soft);
    opacity: 1;
}

html.v2 .category-list a {
    color: var(--v2-text);
    border-radius: 10px;
}

html.v2 .category-list a:hover {
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
}

html.v2 .category-list a.active {
    background: var(--v2-grad);
    color: #fff;
}

html.v2 .category-list a.active .count {
    color: rgba(255, 255, 255, 0.85);
}

html.v2 .category-list .count {
    color: var(--v2-muted);
    font-variant-numeric: tabular-nums;
}

/* ---------- Page headers (recent, best) ---------- */

html.v2 .games-header.fancy-card {
    padding: 1.5rem;
}

html.v2 .games-header.fancy-card:hover {
    transform: none;
}

html.v2 .total-recent-games {
    font-family: var(--v2-font-display);
    color: var(--v2-text);
}

html.v2 .latest-date,
html.v2 .games-header-description,
html.v2 .games-header-main .games-header-description {
    color: var(--v2-muted);
}

html.v2 .rank-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    padding: 0.25rem 0.7rem;
    background: var(--v2-grad);
    color: #fff;
    border-radius: 999px;
    font-family: var(--v2-font-display);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(109, 74, 255, 0.4);
}

/* ---------- Categories grid ---------- */

html.v2 .categories-section h2,
html.v2 .faqs h2,
html.v2 .related-games h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
}

html.v2 .category-card {
    text-decoration: none;
}

html.v2 .category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    background: var(--v2-accent-soft);
    border: 1px solid var(--v2-border);
}

html.v2 .category-emoji {
    font-size: 2rem;
}

html.v2 .category-card h3 {
    color: var(--v2-text);
    font-weight: 600;
}

html.v2 .category-card p,
html.v2 .category-card .count {
    color: var(--v2-muted);
}

html.v2 .category-card .count b {
    color: var(--v2-accent);
    font-weight: 600;
}

/* ---------- FAQ ---------- */

html.v2 .faqs {
    padding: 2rem 2.25rem;
}

html.v2 .faqs.fancy-card:hover {
    transform: none;
}

html.v2 .faq-item,
html.v2:root[data-theme="light"] .faq-item,
html.v2:root[data-theme="dark"] .faq-item {
    border-color: var(--v2-border);
}

html.v2 .faq-toggle {
    color: var(--v2-text);
    font-family: var(--v2-font);
    font-weight: 600;
    font-size: 1.02rem;
}

html.v2 .faq-toggle .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
    font-size: 1.2rem;
}

html.v2 .answer p {
    color: var(--v2-muted);
}

/* ---------- Game detail page ---------- */

html.v2 .game-detail {
    padding: 2rem;
}

html.v2 .game-detail.fancy-card:hover {
    transform: none;
}

html.v2 .game-header {
    border-bottom-color: var(--v2-border);
}

html.v2 .game-header h1 {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 700;
}

html.v2 .game-header .bookmark-button,
html.v2:root[data-theme] .game-header .bookmark-button {
    background: var(--v2-surface-solid);
    border: 1px solid var(--v2-border);
}

html.v2 .game-meta {
    color: var(--v2-muted);
    border-top-color: var(--v2-border);
}

html.v2 .game-content .screenshot-wrapper {
    border-radius: var(--v2-radius-sm);
    border: 1px solid var(--v2-border);
}

html.v2 .game-description {
    color: var(--v2-muted);
}

/* "View Game" buttons in the related games strip */
html.v2 .view-game-btn {
    margin-top: 0.75rem;
}

/* ---------- Guide page ---------- */

html.v2 .guide h2 {
    font-size: 1.45rem;
}

html.v2 .guide h3 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
}

html.v2 .guide strong {
    color: var(--v2-text);
}

/* ---------- Modal ---------- */

html.v2 .modal {
    background: rgba(5, 6, 14, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.v2 .modal-content {
    background: var(--v2-surface-solid);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

html.v2 .modal-header {
    border-bottom: 1px solid var(--v2-border);
}

html.v2 .modal-header h2 {
    font-size: 1.25rem;
}

html.v2 .close-modal,
html.v2 .fullscreen-button {
    color: var(--v2-text);
    border-radius: 999px;
}

html.v2 .fullscreen-button:hover,
html.v2 .close-modal:hover {
    background: var(--v2-accent-soft);
    color: var(--v2-accent);
}

html.v2 .modal-footer {
    border-top: 1px solid var(--v2-border);
}

html.v2 .spinner {
    border-color: var(--v2-accent-soft);
    border-top-color: var(--v2-accent);
}

html.v2 .retry-button {
    background: var(--v2-grad);
    border-radius: 999px;
}

/* ---------- Misc ---------- */

html.v2 .no-content {
    background: var(--v2-surface);
    border: 1px dashed var(--v2-border-strong);
    border-radius: var(--v2-radius);
}

html.v2 #scroll-to-top {
    background: var(--v2-surface-solid);
    color: var(--v2-text);
    border: 1px solid var(--v2-border);
    box-shadow: var(--v2-shadow);
}

html.v2 #scroll-to-top:hover {
    background: var(--v2-grad);
    color: #fff;
}

html.v2 a.rrmdp {
    background: var(--v2-surface-solid);
    color: var(--v2-muted);
    border-color: var(--v2-border);
    font-weight: 600;
}

html.v2 a.rrmdp:hover {
    color: var(--v2-accent);
}

html.v2 .airtable-embed {
    border-radius: var(--v2-radius);
    border-color: var(--v2-border) !important;
}

html.v2 .skeleton::after {
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
}

/* ---------- Footer ---------- */

html.v2 .fancy-footer {
    background: var(--v2-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--v2-border);
    box-shadow: none;
    color: var(--v2-muted);
    margin-top: 3rem;
    padding: 2.5rem 1.5rem;
    font-size: 0.9rem;
}

html.v2 .social-links a {
    color: var(--v2-text);
}

html.v2 .social-links a:hover {
    color: var(--v2-accent);
}

html.v2 .footer-nav {
    color: var(--v2-muted);
}

html.v2 .footer-nav a,
html.v2 .other-projects a {
    color: var(--v2-text);
}

html.v2 .footer-nav a:hover,
html.v2 .other-projects a:hover {
    color: var(--v2-accent);
}

html.v2 .other-projects {
    color: var(--v2-muted);
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    html.v2 *,
    html.v2 *::before,
    html.v2 *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
