:root {
    --bg-color: #050508;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #7c4dff;
    --accent-secondary: #00e5ff;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --header-height: 80px;
    --transition-fast: 0.2s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Animated Background --- */
.bg-glow-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.sphere-1 {
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
}

.sphere-2 {
    background: var(--accent-secondary);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 150px) scale(1.2);
    }
}

/* --- Header --- */
.main-header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.logo i {
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 8px var(--accent-secondary));
}

.accent-text {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.desktop-nav {
    display: flex;
    gap: 32px;
}

.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--text-main);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.user-avatar {
    width: 24px;
    height: 24px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    color: #ff4d4d;
}

.mobile-toggle {
    display: none;
}

/* --- Content Layout --- */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 40px) 40px 100px;
}

/* --- Hero --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    min-height: 60vh;
    margin-bottom: 80px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-tag {
    background: rgba(124, 77, 255, 0.1);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #6200ea);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
    box-shadow: 0 10px 20px rgba(124, 77, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(124, 77, 255, 0.5);
}

.btn-secondary {
    background: var(--card-bg);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.floating-card {
    width: 440px;
    height: 540px;
    background: #1e293b;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: floating 6s infinite ease-in-out;
    transform: perspective(1000px) rotateY(-10deg);
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0) rotateY(-10deg);
    }

    50% {
        transform: translateY(-20px) rotateY(-5deg);
    }
}

.floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.card-overlay h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.card-overlay span {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 14px;
}

/* --- Filters --- */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 30px;
}

.filter-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 14px 14px 48px;
    color: white;
    font-family: inherit;
    font-size: 16px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Games Grid --- */
.section-title {
    font-size: 32px;
    margin-bottom: 30px;
}

.section-title .accent {
    color: var(--accent-secondary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 77, 255, 0.2);
}

.card-img-wrap {
    height: 140px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    /* Fallback gradient */
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .card-img-wrap img {
    transform: scale(1.1);
}

.game-genre {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(5, 5, 8, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffb300;
    font-weight: 700;
}

.plays {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Stats Section --- */
.stats-section {
    margin-top: 100px;
}

.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.stats-card {
    padding: 60px;
    border-radius: 30px;
    text-align: center;
}

.stats-card h2 {
    font-size: 28px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stats-card h2 i {
    color: var(--accent-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
}

.stat-value.accent {
    color: var(--accent-secondary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- Footer --- */
.main-footer {
    background: #020205;
    padding: 80px 40px 40px;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 20px;
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
}

/* --- Responsiveness --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .desktop-nav,
    .user-controls .user-info span {
        display: none;
    }

    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: none;
    }

    .stats-card {
        padding: 40px 20px;
    }
}