/* ================================================================
   NEXUS GAMES — Ultra-Modern Cyberpunk Design v4
   Palette: Neon Purple + Electric Pink + Deep Space
   Font: Outfit
   ================================================================ */

/* ═══════════════════ TOKENS ═══════════════════ */
:root {
    /* Brand Colors */
    --g: #9d4edd;
    /* Neon Purple */
    --g2: #7b2cbf;
    /* Darker Purple */
    --g3: #c77dff;
    /* Lighter Purple */
    --o: #ff006e;
    /* Electric Pink */
    --o2: #c90058;
    /* Darker Pink */
    --o3: #ff4d94;
    /* Lighter Pink */
    --v: #3a86ff;
    /* Electric Blue */

    /* Backgrounds */
    --bg: #050505;
    --bg1: #0d0d0d;
    --bg2: #161616;
    --bg3: #1f1f1f;
    --bg4: #2a2a2a;

    /* Text */
    --t1: #f8f9fa;
    --t2: #adb5bd;
    --t3: #6c757d;

    /* Borders */
    --b: rgba(157, 78, 221, 0.15);
    --bh: rgba(157, 78, 221, 0.4);
    --bo: rgba(255, 0, 110, 0.25);

    /* Gradients */
    --grd1: linear-gradient(135deg, #9d4edd 0%, #3a86ff 100%);
    --grd2: linear-gradient(135deg, #ff006e 0%, #ff8500 100%);
    --grd3: linear-gradient(135deg, #3a86ff 0%, #00f5d4 100%);
    --grd-premium: linear-gradient(45deg, #9d4edd, #ff006e, #3a86ff, #9d4edd);
    --grd-body: radial-gradient(circle at 0% 0%, rgba(157, 78, 221, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(58, 134, 255, 0.08) 0%, transparent 50%);

    /* Shadows */
    --sh1: 0 4px 15px rgba(0, 0, 0, 0.6);
    --sh2: 0 12px 40px rgba(0, 0, 0, 0.8);
    --sh3: 0 25px 80px rgba(0, 0, 0, 0.9);
    --glow-g: 0 0 30px rgba(157, 78, 221, 0.3);
    --glow-o: 0 0 30px rgba(255, 0, 110, 0.3);

    /* Radius */
    --r1: 8px;
    --r2: 14px;
    --r3: 20px;
    --r4: 28px;
    --rx: 9999px;

    --ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Legacy compat */
    --primary: #9d4edd;
    --primary-dark: #7b2cbf;
    --primary-light: #c77dff;
    --accent: #ff006e;
    --danger: #ff4d6d;
    --success: #06d6a0;
    --bg-base: #050505;
    --bg-surface: #0d0d0d;
    --bg-card: #161616;
    --bg-elevated: #1f1f1f;
    --border: rgba(157, 78, 221, 0.15);
    --border-hover: rgba(157, 78, 221, 0.4);
    --text-1: #f8f9fa;
    --text-2: #adb5bd;
    --text-3: #6c757d;
    --grd-primary: linear-gradient(135deg, #9d4edd, #3a86ff);
    --shadow-glow: 0 0 30px rgba(157, 78, 221, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* pill/cat override */
    --pill-color: #9d4edd;
    --cat-color: #9d4edd;
}

/* ═══════════════════ RESET ═══════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ══ OVERFLOW GLOBAL FIX — prevents ALL horizontal scroll ══ */
html {
    overflow-x: hidden !important;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    background-image: var(--grd-body);
    color: var(--t1);
    min-height: 100vh;
    overflow-x: hidden !important;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    line-height: 1.65;
    position: relative;
}

/* Every element gets max-width protection */
*:not(script):not(style):not(head):not(meta):not(link) {
    max-width: 100%;
}

/* Media elements */
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Embeds, iframes, tables */
iframe,
embed,
object {
    max-width: 100%;
}

table {
    max-width: 100%;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    word-break: break-word;
}

/* Pre/code blocks */
pre,
code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Flex & Grid containers — prevent overflow */
.container,
.header-content,
.hero-content,
.hero-buttons,
.hero-stats,
.games-grid,
.categories-grid,
.footer-content,
.footer-bottom-content,
.game-wrapper,
.game-meta-bar,
.action-buttons-modern,
.share-buttons-modern,
.footer-social,
.footer-links,
.nav,
.trending-scroll-container,
.categories-grid-modern {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ad safety — most common overflow source */
.ad-container,
.ad-container *,
ins.adsbygoogle,
ins.adsbygoogle * {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Input/form controls */
input,
textarea,
select,
button {
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ═══════════════════ ADS ═══════════════════ */
.ad-container {
    width: 100%;
    margin: 28px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    padding: 12px 10px;
}

.ad-container ins,
.ad-container iframe,
.ad-container div,
.ad-container * {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.ad-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--t3);
    margin-bottom: 12px;
    opacity: 0.8;
}

.ad-container {
    background: rgba(13, 13, 13, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    padding: 20px;
    transition: all var(--ease);
}

.ad-container:hover {
    border-color: var(--bh);
    background: rgba(13, 13, 13, 0.6);
}
.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 22px;
    box-sizing: border-box;
}

.breadcrumb-container {
    margin-bottom: 25px;
}

.breadcrumb-modern ol {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}

.breadcrumb-modern li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--t3);
}

.breadcrumb-modern li:not(:last-child)::after {
    content: '/';
    opacity: 0.3;
    font-weight: 400;
}

.breadcrumb-modern a {
    color: var(--t2);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

.breadcrumb-modern a:hover {
    color: var(--g);
}

.breadcrumb-modern li.active {
    color: var(--g3);
    font-weight: 700;
}

/* ═══════════════════ HEADER ═══════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--b);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Neon bottom-border accent */
.header::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--grd1);
    box-shadow: 0 0 15px var(--g);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 0 8px var(--g));
    animation: ico-bounce 2.5s ease-in-out infinite;
}

@keyframes ico-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(-8deg); }
}

.logo-text {
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -1px;
    background: var(--grd1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(157, 78, 221, 0.3));
}

.site-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(157, 78, 221, 0.2));
}

/* Search */
.header-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 450px;
    position: relative;
    margin: 0 20px;
}

.header-search-input {
    flex: 1;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--rx);
    color: var(--t1);
    font-size: 14px;
    outline: none;
    transition: all var(--ease);
}

.header-search-input::placeholder {
    color: var(--t3);
}

.header-search-input:focus {
    border-color: var(--g);
    background: rgba(255, 255, 255, 0.1);
}

.header-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--grd1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ease);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

.header-search-btn::before {
    content: '🔍';
    font-size: 14px;
}

.header-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px var(--g);
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--r2);
    color: var(--t2);
    font-size: 14px;
    font-weight: 700;
    transition: all var(--ease);
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--grd1);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--t1);
    background: rgba(157, 78, 221, 0.1);
}

.nav-link:hover::before {
    width: 70%;
}

.nav-link.active {
    color: var(--g3);
    background: rgba(157, 78, 221, 0.15);
    border-color: rgba(157, 78, 221, 0.2);
}

.nav-link.active::before {
    width: 80%;
}

.nav-icon {
    font-size: 16px;
}

/* Hamburger */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid var(--b);
    border-radius: var(--r1);
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    width: 26px;
    height: 2px;
    background: var(--g3);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: rgba(157, 78, 221, 0.2);
    box-shadow: 0 0 10px var(--b);
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 998;
}

.mobile-menu-overlay.active {
    display: block;
}

/* ═══════════════════ HERO ═══════════════════ */
.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    background: #000;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(157, 78, 221, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(58, 134, 255, 0.08) 0%, transparent 50%);
}

/* Cyberpunk grid pattern */
.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(157, 78, 221, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 78, 221, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Floating neon particles */
.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 50% 50%, var(--g) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.1;
    animation: float-bg 20s linear infinite;
}

@keyframes float-bg {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: var(--rx);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--g3);
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.1);
    animation: fadeUp 0.8s ease both;
}

.hero-title {
    font-size: clamp(40px, 8vw, 76px);
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -2.5px;
    margin-bottom: 25px;
    color: #fff;
    filter: drop-shadow(0 0 10px rgba(157, 78, 221, 0.2));
    animation: fadeUp 0.8s ease 0.1s both;
}

.gradient-text {
    background: linear-gradient(to right, #9d4edd, #ff006e, #3a86ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: text-flow 5s linear infinite;
}

@keyframes text-flow {
    to { background-position: 200% center; }
}

.hero-subtitle {
    font-size: 19px;
    color: var(--t2);
    margin-bottom: 45px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    animation: fadeUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 70px;
    padding-top: 45px;
    border-top: 1px solid rgba(157, 78, 221, 0.1);
    animation: fadeUp 0.8s ease 0.4s both;
}

@media (max-width: 768px) {
    .hero-stats {
        gap: 30px;
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

.hero-stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 950;
    color: var(--g3);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
    filter: drop-shadow(0 0 10px rgba(157, 78, 221, 0.4));
}

.stat-label {
    font-size: 12px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-6px)
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: .6
    }

    50% {
        opacity: 1
    }
}

/* ═══════════════════ BUTTONS ═══════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: var(--r2);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--ease);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-large {
    padding: 15px 34px;
    font-size: 17px;
    border-radius: var(--r3);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
}

.btn-primary {
    background: var(--g);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 200, 150, 0.3);
    font-weight: 800;
}

.btn-primary:hover {
    background: var(--g3);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 200, 150, 0.45);
}

.btn-secondary {
    background: var(--bg3);
    color: var(--t1);
    border: 1px solid var(--b);
}

.btn-secondary:hover {
    background: var(--bg4);
    border-color: var(--bh);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--o);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 20px rgba(255, 107, 43, 0.3);
}

.btn-accent:hover {
    background: var(--o2);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 43, 0.4);
}

/* ═══════════════════ SECTIONS ═══════════════════ */
.section {
    padding: 70px 0;
}

.section-header-modern {
    margin-bottom: 38px;
}

.section-header-modern.centered {
    text-align: center;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--g);
    background: rgba(0, 200, 150, 0.08);
    border: 1px solid rgba(0, 200, 150, 0.18);
    padding: 4px 12px;
    border-radius: var(--rx);
    margin-bottom: 12px;
}

/* ═══════════════════ GLOBAL REFINEMENTS ═══════════════════ */
::selection {
    background: var(--g);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg3);
    border-radius: var(--rx);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--g);
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    color: var(--t1);
    background: linear-gradient(to right, #fff, var(--t2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--g3);
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid rgba(157, 78, 221, 0.2);
    padding: 6px 16px;
    border-radius: var(--rx);
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.1);
}

/* ═══════════════════ GAME CARDS ═══════════════════ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.game-card {
    background: #0d0d15;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--g);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(157, 78, 221, 0.2);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1; /* Square thumbnails like in the image */
    overflow: hidden;
    background: #000;
}

.game-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1);
}

/* Glowing Play Icon Overlay Fix */
.game-thumbnail::before {
    content: 'PLAY NOW';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    z-index: 5;
    transition: all 0.4s var(--ease);
    pointer-events: none;
    transform: translateY(10px);
}

.game-card:hover .game-thumbnail::before {
    opacity: 1;
    transform: translateY(0);
}

/* Play button for mobile */
.game-thumbnail::after {
    content: '▶';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--grd1);
    color: #fff;
    border-radius: 50%;
    display: none; /* Mobile only */
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .game-thumbnail::after {
        display: flex;
    }
}

.game-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0d0d15;
}

.game-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.game-category-pill {
    display: inline-block;
    background: rgba(157, 78, 221, 0.2);
    color: var(--g3);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 15px;
    border-radius: 50px;
    width: fit-content;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.game-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--rx);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(157, 78, 221, 0.1);
    color: var(--g3);
    border: 1px solid rgba(157, 78, 221, 0.2);
    transition: all 0.3s ease;
}

.game-card:hover .game-category {
    background: var(--g);
    color: #fff;
}

.game-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--t3);
    font-weight: 700;
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-stats .views-icon::before { content: '👁'; }
.game-stats .likes-icon::before { content: '❤️'; }

/* ═══════════════════ TRENDING ═══════════════════ */
.trending-section {
    padding: 50px 0 40px;
}

.trending-scroll-container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 24px;
    scrollbar-width: none;
}

.trending-scroll-container::-webkit-scrollbar {
    display: none;
}

@media(max-width:768px) {
    .trending-scroll-container {
        grid-auto-columns: 245px;
    }
}

.trending-card {
    position: relative;
    height: 180px;
    border-radius: var(--r3);
    overflow: hidden;
    display: block;
    border: 1px solid var(--b);
    transition: all var(--ease);
    text-decoration: none;
}

@media (max-width: 768px) {
    .trending-card {
        height: 140px;
    }
}

.trending-card:hover {
    transform: scale(1.03);
    border-color: var(--g);
    box-shadow: var(--sh2), var(--glow-g);
}

.trending-card::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 54px;
    height: 54px;
    background: var(--grd1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    opacity: 0;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trending-card:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.trending-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
    transition: filter 0.3s;
}

.trending-card:hover img {
    filter: brightness(0.7);
}

.trending-info {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    z-index: 2;
}

.trending-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.trending-info span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* Trending number badge */
.trending-card::before {
    content: attr(data-rank);
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--g);
    color: var(--bg);
    font-size: 10px;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: var(--rx);
    z-index: 3;
    letter-spacing: 0.5px;
}

/* ═══════════════════ CATEGORY PILLS ═══════════════════ */
.categories-grid-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 480px) {
    .categories-grid-modern {
        gap: 8px;
    }
    
    .category-pill {
        padding: 7px 14px;
        font-size: 12px;
    }
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    color: var(--t2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--ease);
}

.category-pill:hover {
    background: rgba(157, 78, 221, 0.15);
    border-color: var(--g);
    color: var(--g3);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(157, 78, 221, 0.25);
}

.pill-icon {
    font-size: 18px;
}

.pill-name {
    font-size: 13px;
    font-weight: 700;
}

/* ═══════════════════ CATEGORIES PAGE ═══════════════════ */
.categories-section-modern {
    padding: 70px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 18px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r4);
    text-decoration: none;
    transition: all var(--ease);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grd1);
    opacity: 0;
    transition: opacity var(--ease);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--g);
    box-shadow: var(--sh2), var(--glow-g);
    background: var(--bg3);
}

.category-card:hover::before {
    opacity: 1;
}

.category-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.category-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 6px;
}

.cat-card-desc {
    font-size: 12px;
    color: var(--t2);
    line-height: 1.6;
}

.cat-card-stats {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--g);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legacy category card variants */
.category-card-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 18px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r4);
    text-decoration: none;
    transition: all var(--ease);
}

.category-card-premium:hover {
    transform: translateY(-5px);
    border-color: var(--g);
    box-shadow: var(--sh2), var(--glow-g);
}

.cat-card-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.cat-card-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 6px;
}

/* ═══════════════════ GAME PLAY PAGE ═══════════════════ */
.game-container {
    padding-top: 20px;
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .game-container {
        padding-top: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

.game-wrapper {
    background: #000;
    border: 1px solid var(--b);
    border-radius: var(--r3);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(157, 78, 221, 0.15);
}

@media (max-width: 768px) {
    .game-wrapper {
        border-radius: var(--r2);
    }
}

.game-play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.game-main-area {
    min-width: 0;
}

.game-wrapper-modern {
    width: 100%;
    min-width: 0;
}

.game-frame-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .game-frame-wrapper {
        padding-bottom: 120%; /* Taller for mobile */
    }
}

@media (max-width: 480px) {
    .game-frame-wrapper {
        padding-bottom: 150%;
    }
}

#gameContent {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.game-frame {
    width: 100%;
    height: 100%;
    background: #000;
}

.game-frame iframe,
.game-frame embed,
.game-frame object {
    width: 100%;
    height: 100%;
    border: none;
}

#iframeLoading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 5;
    color: var(--g3);
    font-weight: 800;
    letter-spacing: 2px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg3);
    border-top-color: var(--g);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.game-meta-bar-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    gap: 20px;
}

.game-main-info h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
    color: #fff;
}

.game-meta-tags {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-pill-modern {
    background: rgba(157, 78, 221, 0.15);
    color: var(--g3);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(157, 78, 221, 0.2);
}

.game-stats-modern {
    color: var(--t3);
    font-size: 13px;
    font-weight: 700;
}

.action-btn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0d0d15;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.action-btn-circle:hover {
    transform: scale(1.1);
    border-color: var(--g);
    box-shadow: 0 0 15px var(--g);
}

@media (max-width: 1100px) {
    .game-play-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .game-meta-bar-modern {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-main-info h1 {
        font-size: 22px;
    }
}

/* ═══════════════════ GAME LOADER & PLAY BUTTON ═══════════════════ */
.game-loader {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: loader-bg-pulse 10s ease-in-out infinite;
}

@keyframes loader-bg-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loader-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Premium Cyberpunk Play Button */
.btn-play-premium {
    position: relative;
    z-index: 2;
    background: #6a11cb; /* Image purple */
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    border: none;
    padding: 15px 45px;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px; /* Fully rounded */
    cursor: pointer;
    transition: all 0.4s var(--ease);
    box-shadow: 0 10px 30px rgba(106, 17, 203, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.btn-play-premium:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(106, 17, 203, 0.6);
    background: linear-gradient(135deg, #7b2cbf 0%, #3a86ff 100%);
}

.btn-play-premium .play-icon {
    font-size: 24px;
    line-height: 1;
}

/* Pulse animation for the button */
.btn-play-premium {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.4); }
    50% { box-shadow: 0 0 40px rgba(157, 78, 221, 0.7), 0 0 20px rgba(255, 0, 110, 0.3); }
    100% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.4); }
}

@media (max-width: 768px) {
    .btn-play-premium {
        padding: 15px 35px;
        font-size: 18px;
        letter-spacing: 2px;
    }
}

/* Clean up AI artifacts in text if any remain */
.details-content {
    color: var(--t2);
    line-height: 1.5; /* Compact but readable */
    font-size: 15px;
    word-break: break-word;
}

/* Fullscreen */
.game-frame-wrapper:fullscreen {
    border-radius: 0;
    border: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.game-frame-wrapper:fullscreen .game-frame {
    padding-bottom: 0;
    height: 100vh;
    width: 100vw;
}

.game-frame-wrapper:fullscreen .fullscreen-btn {
    bottom: 20px;
    right: 20px;
}

.fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(10, 13, 15, 0.9);
    border: 1px solid var(--b);
    color: var(--t1);
    padding: 6px 12px;
    border-radius: var(--r1);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.fullscreen-btn:hover {
    background: var(--g);
    border-color: var(--g);
    color: var(--bg);
}

/* Game Details */
.game-details-modern {
    padding: 20px 0 0;
}

.game-header-modern {
    margin-bottom: 14px;
}

.game-title-main {
    font-size: 24px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

/* Control Bar */
.game-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(to bottom, #111, #050505);
    border-top: 1px solid var(--b);
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 768px) {
    .game-meta-bar {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.game-main-info h1 {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.game-main-info .category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(157, 78, 221, 0.1);
    color: var(--g3);
    border: 1px solid rgba(157, 78, 221, 0.2);
    border-radius: var(--rx);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--rx);
    font-size: 12px;
    font-weight: 600;
    color: var(--t2);
}

.glass-meta {
    background: var(--bg2);
    border: 1px solid var(--b);
}

.game-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--rx);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stars */
.rating-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 18px;
    cursor: pointer;
    transition: transform var(--ease);
}

.star:hover {
    transform: scale(1.2);
}

.star.filled {
    color: var(--o);
}

.star.empty {
    color: var(--t3);
}

/* Action Buttons */
.action-buttons-modern {
    display: flex;
    gap: 12px;
}

.action-btn {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    color: var(--t1);
    cursor: pointer;
    transition: all var(--ease);
    position: relative;
}

.action-btn:hover {
    background: var(--g);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

.action-btn.active {
    background: var(--o);
    border-color: var(--o);
    color: #fff;
}

.game-details-modern-area {
    margin-top: 40px;
    width: 100%;
}

.details-card-modern {
    background: #0d0d15;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 35px;
}

.details-title-modern {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px; /* Reduced spacing */
    letter-spacing: -0.5px;
}

.instructions-box-modern {
    margin-top: 25px; /* Reduced spacing */
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.instructions-title {
    font-size: 18px;
    font-weight: 850;
    color: var(--g3);
    margin-bottom: 10px; /* Reduced spacing */
}

@media (max-width: 768px) {
    .details-card-modern {
        padding: 25px;
    }
    
    .details-title-modern {
        font-size: 20px;
    }
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1200px) {
    .container { padding: 0 20px; }
    .game-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 52px; }
    .game-details-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header-search { display: none; }
    .nav { 
        display: none; 
        position: fixed;
        top: 0;
        right: 0;
        width: 270px;
        height: 100vh;
        background: #080808;
        border-left: 1px solid var(--b);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 40px;
        z-index: 1000;
        gap: 5px;
        box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    }
    .nav.active { display: flex; }
    .mobile-menu-toggle { display: flex; }
    .hero-title { font-size: 42px; }
    .hero-stats { gap: 30px; }
    .footer-content { grid-template-columns: 1fr; }
    
    /* Game Play Mobile Fixes */
    .game-meta-bar {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .action-buttons-modern {
        width: 100%;
        justify-content: flex-start;
    }
    .game-main-info h1 { font-size: 22px; }
    
    /* Responsive padding-bottom handled in base styles */
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 32px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .stat-number { font-size: 28px; }
    .hero-stats { gap: 20px; }
}

.action-btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--r2);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--b);
    background: var(--bg2);
    color: var(--t1);
    cursor: pointer;
    transition: all var(--ease);
}

.action-btn-premium:hover {
    background: var(--bg3);
    border-color: var(--bh);
    transform: translateY(-1px);
}

.btn-favorite.active {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.like-btn-premium:hover {
    background: rgba(0, 200, 150, 0.1);
    border-color: var(--g);
    color: var(--g);
}

/* Share Glass */
.share-glass {
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    padding: 14px 18px;
    margin-bottom: 16px;
}

.share-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.share-buttons-modern {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn-round {
    width: 38px;
    height: 38px;
    border-radius: var(--r1);
    border: 1px solid var(--b);
    background: var(--bg3);
    color: var(--t1);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ease);
}

.share-btn-round:hover {
    transform: translateY(-2px);
}

.share-btn-round.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.share-btn-round.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.share-btn-round.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
}

.share-btn-round.copy:hover {
    background: var(--g);
    border-color: var(--g);
    color: var(--bg);
}

/* Game Info */
.game-info-glass {
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-group {
    display: block;
}

.info-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--g);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-text {
    font-size: 16px;
    color: var(--t2);
    line-height: 1.8;
}

/* Sidebar */
.sidebar-card {
    background: #0d0d15;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--r3);
    padding: 25px;
    height: 100%;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--g3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.sidebar-title::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: var(--g);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--g);
}

.sidebar-games-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-game-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--r2);
    text-decoration: none;
    transition: all var(--ease);
    border: 1px solid transparent;
}

.sidebar-game-item:hover {
    background: rgba(157, 78, 221, 0.08);
    border-color: rgba(157, 78, 221, 0.2);
    transform: translateX(5px);
}

.sidebar-game-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--r1);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-game-info {
    flex: 1;
    min-width: 0;
}

.sidebar-game-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-game-cat {
    font-size: 11px;
    font-weight: 800;
    color: var(--v);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-sidebar-container {
    padding: 10px;
}

/* ═══════════════════ FOOTER ═══════════════════ */
.footer-ad-wrapper {
    text-align: center;
    margin: 28px auto;
}

.footer {
    background: #000;
    padding: 80px 0 30px;
    position: relative;
    border-top: 1px solid var(--b);
    margin-top: 60px;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--grd1);
    box-shadow: 0 0 20px var(--g);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.footer-logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 8px var(--g));
}

.footer-logo h3 {
    font-size: 24px;
    font-weight: 900;
    background: var(--grd1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-description {
    color: var(--t2);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;height: 40px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2);
    transition: all var(--ease);
}

.social-link:hover {
    color: #fff;
    background: var(--g);
    border-color: var(--g);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

.footer-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--grd1);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: var(--t2);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ease);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a::before {
    content: '→';
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--g);
}

.footer-links a:hover {
    color: var(--g3);
    padding-left: 8px;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: var(--t3);
    font-size: 13px;
}

.footer-tagline {
    color: var(--t3);
    font-size: 13px;
}

.developer-link {
    color: var(--g3);
    font-weight: 700;
    text-decoration: none;
}

.developer-link:hover {
    text-decoration: underline;
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════ ARTICLE ═══════════════════ */
.article-section {
    padding: 36px 0 56px;
}

.article-glass {
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--r4);
    padding: 36px;
    color: var(--t2);
    line-height: 1.8;
}

.article-glass h1,
.article-glass h2,
.article-glass h3 {
    color: var(--t1);
    margin-bottom: 10px;
    margin-top: 22px;
}

.article-glass p {
    margin-bottom: 14px;
}

.article-glass a {
    color: var(--g3);
}

/* ═══════════════════ SEARCH ═══════════════════ */
.search-header-premium {
    background: var(--bg1);
    padding: 56px 0 38px;
    border-bottom: 1px solid var(--b);
    margin-bottom: 38px;
}

.search-box {
    max-width: 580px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 13px 18px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-right: none;
    border-radius: var(--r2) 0 0 var(--r2);
    color: var(--t1);
    font-size: 15px;
    outline: none;
    transition: all var(--ease);
}

.search-input:focus {
    border-color: var(--g);
    background: var(--bg3);
}

.search-input::placeholder {
    color: var(--t3);
}

.search-button {
    padding: 13px 18px;
    background: var(--g);
    border: none;
    border-radius: 0 var(--r2) var(--r2) 0;
    color: var(--bg);
    font-size: 17px;
    cursor: pointer;
    transition: background var(--ease);
    font-weight: 800;
}

.search-button:hover {
    background: var(--g2);
}

.filter-select {
    padding: 9px 16px;
    background: var(--bg2);
    border: 1px solid var(--b);
    border-radius: var(--rx);
    color: var(--t1);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color var(--ease);
    margin-top: 12px;
}

.filter-select:focus {
    border-color: var(--g);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.search-results-info {
    text-align: center;
    margin-bottom: 28px;
    color: var(--t2);
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 70px 20px;
}

.no-results-icon {
    font-size: 60px;
    margin-bottom: 18px;
}

/* ═══════════════════ PAGE HERO (non-home) ═══════════════════ */
.page-hero {
    background: var(--bg1);
    border-bottom: 1px solid var(--b);
    padding: 48px 0 38px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grd1);
}

/* ═══════════════════ SCROLLBAR ═══════════════════ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--g);
}

::selection {
    background: rgba(0, 200, 150, 0.25);
    color: var(--t1);
}
/* Redundant responsive section removed */

@media(max-width:400px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 26px;
    }

    .game-wrapper {
        padding: 0 10px;
    }
}

/* ═══════════════════ FINAL OVERFLOW SAFETY ═══════════════════ */
/* This block overwrites ANY conflicting rule that causes horizontal scroll */
html,
body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Grid children MUST have min-width:0 to prevent overflow */
.games-grid>*,
.categories-grid>*,
.footer-content>*,
.game-wrapper>* {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Flex children overflow prevention */
.hero-buttons>*,
.action-buttons-modern>*,
.share-buttons-modern>*,
.footer-social>*,
.nav>* {
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ads — double safety */
ins.adsbygoogle {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Long words / URLs in content */
.info-text,
.article-glass p,
.footer-description,
.game-title,
.sidebar-game-title,
.cat-card-desc {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Section split (used on homepage) */
.section-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
    max-width: 100%;
    box-sizing: border-box;
}