:root {
    --bg-dark: #0b0f19;
    --bg-card: #1e2942;
    --primary: #a855f7;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --glass: rgba(255, 255, 255, 0.05);
    --radius: 16px;
    --glow-primary: rgba(168, 85, 247, 0.35);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Glassmorphism */
header {
    background: rgba(30, 41, 59, 0.45); /* Frosted slate-glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-primary);
    border-color: var(--primary);
}

.game-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumb {
    transform: scale(1.08);
}

.game-info {
    padding: 14px;
    background: linear-gradient(to top, rgba(30, 41, 66, 0.95), rgba(30, 41, 66, 0.8));
}

.game-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.game-category {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Player Styles */
.player-container {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-frame {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* Game Description & Article Styling */
.game-description-card p {
    margin-bottom: 1.25rem;
    color: #cbd5e1;
}

.game-description-card h2, 
.game-description-card h3, 
.game-description-card h4 {
    color: #ffffff;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.game-description-card > h2:first-child,
.game-description-card > h3:first-child,
.game-description-card > h4:first-child {
    margin-top: 0;
}

.game-description-card ul, 
.game-description-card ol {
    margin-bottom: 1.25rem;
    padding-left: 20px;
    color: #cbd5e1;
}

.game-description-card li {
    margin-bottom: 8px;
}

.game-description-card strong {
    color: #ffffff;
}

/* Mobile Actions & Header Toggles */
.mobile-actions {
    display: none;
    gap: 12px;
    align-items: center;
}

.mobile-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 1.3rem;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-action-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-panel {
    display: none;
    margin-top: 15px;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu-panel {
    display: none;
    margin-top: 15px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    margin-bottom: 8px;
}

.mobile-menu-list li:last-child {
    margin-bottom: 0;
}

.mobile-menu-list li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.2s ease;
}

.mobile-menu-list li a:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
    border-color: rgba(168, 85, 247, 0.2);
    padding-left: 20px;
}

.mobile-cat-header {
    padding: 15px 5px 8px 5px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.mobile-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 5px;
}

.mobile-cat-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-cat-item:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-search, .desktop-nav {
        display: none !important;
    }
    
    .mobile-actions {
        display: flex;
    }
    
    .mobile-search-panel.active,
    .mobile-menu-panel.active {
        display: block !important;
    }

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

