:root {
    
    --bg-body: #0a0a0f;
    --bg-surface: rgba(20, 15, 35, 0.85);
    --bg-elevated: rgba(30, 20, 50, 0.92);
    --bg-subtle: rgba(40, 25, 60, 0.75);
    --text-heading: #f0f0ff;
    --text-body: #d0d0e8;
    --text-meta: #a0a0c8;
    --text-disabled: #7070a0;
    --brand-primary: #ff00ff;      
    --brand-secondary: #00ffff;    
    --brand-accent: #ff00aa;       
    --border-default: rgba(255, 0, 255, 0.35);
    --border-light: rgba(0, 255, 255, 0.25);
    --elevation-1: 0 4px 12px rgba(255, 0, 255, 0.20), 0 0 0 1px rgba(255, 0, 255, 0.10);
    --elevation-2: 0 8px 24px rgba(255, 0, 255, 0.30), 0 0 0 1px rgba(0, 255, 255, 0.15);
    --elevation-3: 0 16px 40px rgba(255, 0, 255, 0.40), 0 0 0 1px rgba(255, 0, 170, 0.20);
}

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

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Orbitron', 'Rajdhani', 'Helvetica Neue', Arial, sans-serif;
    background:
        radial-gradient(1200px 800px at 15% 0%, rgba(255, 0, 255, 0.12), transparent 60%),
        radial-gradient(1000px 700px at 85% 20%, rgba(0, 255, 255, 0.10), transparent 55%),
        repeating-linear-gradient(0deg, rgba(255, 0, 255, 0.03) 0px, rgba(255, 0, 255, 0.03) 1px, transparent 2px, transparent 8px),
        var(--bg-body);
    color: var(--text-body);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

a {
    text-decoration: none !important;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.navbar {
    background: rgba(10, 10, 15, 0.88);
    border-bottom: 2px solid var(--border-default);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(255, 0, 255, 0.25), 0 0 0 1px rgba(0, 255, 255, 0.15);
    backdrop-filter: blur(12px);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    text-decoration: none !important;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.50), inset 0 0 10px rgba(0, 255, 255, 0.30);
    flex-shrink: 0;
    overflow: hidden;
}

.brand-icon img,
.brand-icon .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--text-meta);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.nav-link:hover {
    background: var(--bg-subtle);
    color: var(--text-heading);
}

.nav-link.current {
    background: var(--bg-subtle);
    color: var(--brand-primary);
    font-weight: 600;
}

.search-wrapper {
    position: relative;
    width: 280px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-subtle);
    color: var(--text-body);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(255, 0, 255, 0.20), 0 0 20px rgba(255, 0, 255, 0.30);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-disabled);
    font-size: 0.85rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title-area {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-meta);
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.section-title:first-of-type {
    margin-top: 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
    margin-bottom: 3rem;
}


@media (min-width: 1200px) {
    .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "title title"
            "featured new"
            "top top";
        gap: 2.5rem;
        align-items: start;
    }

    .page-title-area {
        grid-area: title;
        margin-bottom: 0;
    }

    #featuredSection {
        grid-area: featured;
    }

    #newSection {
        grid-area: new;
    }

    #topSection {
        grid-area: top;
    }

    .game-grid {
        margin-bottom: 0;
    }
}

@media (max-width: 1400px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.game-tile {
    background: var(--bg-surface);
    border: 2px solid var(--border-default);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--elevation-1);
    text-decoration: none !important;
    position: relative;
}

.game-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--elevation-3), 0 0 30px rgba(255, 0, 255, 0.40);
    border-color: var(--brand-primary);
}

.game-tile:hover::before {
    opacity: 1;
}

.game-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg-subtle);
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-tile:hover .game-image img {
    transform: scale(1.06);
}

.favorite-btn {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-disabled);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.favorite-btn:hover {
    background: white;
    color: var(--brand-primary);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--brand-primary);
    color: white;
}

.game-info {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-decoration: none !important;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: auto;
    font-size: 0.8rem;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    color: #fbbf24;
    font-size: 0.75rem;
    letter-spacing: 0;
}

.star-rating i {
    color: #fbbf24;
    opacity: 1;
    font-size: 0.75rem;
}

.rating-num {
    color: var(--text-heading);
    font-weight: 600;
    font-size: 0.8rem;
}

.game-reviews {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-meta);
    font-size: 0.75rem;
}

.player-count {
    color: var(--text-meta);
    font-size: 0.75rem;
}

.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-default);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-meta);
    margin-bottom: 0.625rem;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    text-decoration: none !important;
}

.footer-col a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-disabled);
    font-size: 0.85rem;
}

.to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--elevation-3);
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.to-top.show {
    opacity: 1;
    visibility: visible;
}

.to-top:hover {
    background: var(--brand-secondary);
    transform: translateY(-3px);
    box-shadow: var(--elevation-3);
}

.empty-state-inline {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--elevation-1);
    min-height: 200px;
    justify-content: center;
}

.empty-icon-small {
    font-size: 2.5rem;
    color: var(--text-disabled);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.empty-title-small {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.empty-text-small {
    font-size: 0.875rem;
    color: var(--text-meta);
    margin: 0;
}

.empty-action-small {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--brand-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
    margin-top: 0.5rem;
}

.empty-action-small:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
}

@media (max-width: 1024px) {
    .navbar-content {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .search-wrapper {
        width: 200px;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
}



    
    .section,
    .games-section {
        margin-bottom: 2rem !important;
    }
    
    .games-grid,
    .featured-grid {
        gap: 0.75rem !important;
    }
    
    .item-info,
    .game-card-content {
        padding: 0.875rem 0.75rem !important;
    }
    
    .section-title {
        margin-bottom: 0.75rem !important;
    }
}



@media (max-width: 480px) {
    
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.5rem 0.75rem !important;
        min-height: 56px;
    }
    
    
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 0.875rem !important;
        font-weight: 600;
        flex: 0 1 auto !important;
        min-width: 0;
        max-width: calc(100% - 50px);
        overflow: hidden;
    }
    
    .brand span,
    .site-logo span,
    .logo-wrapper span,
    .brand-logo span,
    .logo span {
        font-size: 0.875rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0;
    }
    
    
    .search-wrapper,
    .search-container,
    .search-box {
        display: none !important;
    }
    
    
    .nav-menu,
    .nav-links,
    .site-nav,
    .nav-actions,
    nav > ul {
        display: none !important;
    }
    
    
    .mobile-menu-btn,
    .mobile-menu-toggle,
    .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 1001;
        order: 999;
    }
    
    .mobile-menu-btn span,
    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: currentColor;
        margin: 3px 0;
        transition: all 0.3s;
    }
    
    
    .mobile-nav .search-wrapper,
    .mobile-nav .search-container,
    .mobile-menu .search-wrapper {
        display: flex !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        margin: 0 !important;
        border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
        gap: 0.5rem !important;
        box-sizing: border-box !important;
    }
    
    .mobile-nav .search-input,
    .mobile-menu .search-input {
        flex: 1 !important;
        padding: 0.625rem 0.75rem !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        border: 1px solid var(--border, rgba(255, 255, 255, 0.2)) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: var(--text-main, #ffffff) !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }
    
    .mobile-nav .search-btn,
    .mobile-menu .search-btn {
        padding: 0.625rem 1rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        flex-shrink: 0 !important;
    }
}


@media (max-width: 768px) {
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        padding: 0;
        gap: 1rem;
    }
    
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        font-size: 1rem !important;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 32px !important;
    }
    
    .search-wrapper,
    .search-container {
        max-width: 200px;
        flex: 0 1 auto;
    }
    
    .nav-menu,
    .nav-links,
    .site-nav {
        display: none;
    }
    
    .mobile-menu-btn,
    .menu-toggle {
        display: flex !important;
    }
}
