/* Cyberpunk Theme - High End Interface */
:root {
    --bg-dark: #050505;
    --bg-panel: #0a0a12;
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    
    /* Neon Accents */
    --neon-blue: #00f3ff;
    --neon-pink: #bc13fe;
    --neon-purple: #7000ff;
    --neon-green: #0aff60;
    
    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 30, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(16px);
    
    /* Gradients */
    --accent-gradient: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    --card-gradient: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    
    /* Layout */
    --sidebar-width: 80px;
    --header-height: 70px;
    --container-width: 1400px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow: hidden; /* App-like layout */
    height: 100vh;
}

h1, h2, h3, h4, .nav-item {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Animated Grid Background */
.cyber-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px); }
}

/* App Layout */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    z-index: 1000;
    box-shadow: 5px 0 30px rgba(0,0,0,0.5);
}

.logo-icon {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--neon-blue);
    margin-bottom: 3rem;
    text-shadow: 0 0 10px var(--neon-blue);
    letter-spacing: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.nav-icon {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-icon svg {
    opacity: 0.7;
    transition: all 0.3s;
}

.nav-icon:hover, .nav-icon.active {
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.nav-icon:hover svg, .nav-icon.active svg {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--neon-blue));
}

.nav-icon.active::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--neon-blue);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Main Content Area */
.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Glass Header */
.site-header {
    height: var(--header-height);
    background: rgba(5, 5, 10, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo h1 span {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-pink);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--neon-pink);
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 6px auto;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Scroll Container */
.scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-blue) transparent;
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 3px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 2rem;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: linear-gradient(90deg, var(--neon-blue), #fff, var(--neon-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Category Blocks */
.category-block {
    margin-bottom: 4rem;
}

.block-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.block-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
}

/* Grid Layout */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Featured Section - Asymmetric Grid */
.featured-block .games-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
}

.featured-block .games-grid .game-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.featured-block .games-grid .game-card:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
}

/* Fallback for smaller screens handled in media queries */

/* Game Card - Floating & Glowing */
.game-card {
    background: var(--card-gradient);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(5px);
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 243, 255, 0.2),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.3);
    z-index: 10;
}

/* Mouse Hover Light Trails (Glow effect on hover) */
.game-card:hover::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    background: linear-gradient(45deg, var(--neon-blue), transparent, var(--neon-pink));
    opacity: 0.3;
    z-index: -1;
    filter: blur(10px);
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
    0% { filter: hue-rotate(0deg) blur(10px); }
    100% { filter: hue-rotate(360deg) blur(10px); }
}

.card-image {
    width: 100%;
    height: 180px; /* Base height */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-block .games-grid .game-card:nth-child(1) .card-image {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.featured-block .games-grid .game-card:nth-child(1) .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
    padding-top: 4rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.8) contrast(1.1);
}

.game-card:hover .card-image img {
    transform: scale(1.1);
    filter: brightness(1);
}

.card-content {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
    background: rgba(10, 10, 15, 0.4);
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Play Indicator */
.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 243, 255, 0.2);
    border: 1px solid var(--neon-blue);
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px var(--neon-blue);
    z-index: 10;
}

.game-card:hover .play-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Footer */
.footer {
    background: rgba(10, 10, 15, 0.5);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-brand h2 {
    color: #fff;
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Ad Container */
.ad-container {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    margin: 2rem auto;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-block .games-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    
    .featured-block .games-grid .game-card:nth-child(1) {
        grid-column: span 2;
        grid-row: auto;
        height: 400px;
    }
    
    .featured-block .games-grid .game-card:nth-child(1) .card-image {
        position: relative;
        height: 100%;
    }
    
    .featured-block .games-grid .game-card:nth-child(1) .card-content {
        position: absolute;
        bottom: 0;
    }
    
    .featured-block .games-grid .game-card:nth-child(2) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }
    
    body {
        overflow: auto;
    }
    
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0 1rem;
        position: fixed;
        bottom: 0;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--glass-border);
    }
    
    .logo-icon {
        display: none;
    }
    
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }
    
    .main-content-wrapper {
        padding-bottom: 60px; /* Space for bottom nav */
    }
    
    .site-header .nav-links {
        display: none; /* Hide top nav links on mobile, rely on bottom bar or hamburger */
    }
    
    .hamburger {
        display: block;
    }
    
    .games-grid, .featured-block .games-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-block .games-grid .game-card:nth-child(1) {
        grid-column: span 1;
        height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}
