/* ===================================
   RESET & GLOBAL STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width: 220px;
    --header-height: 70px;
    --primary-purple: #7B4FFF;
    --dark-bg: #1A1D2E;
    --darker-bg: #13151F;
    --card-bg: #232838;
    --text-white: #FFFFFF;
    --text-gray: #B8B9C1;
    --accent-blue: #5B98FF;
    --accent-pink: #FF4FD8;
    --border-color: #2A2D3E;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--darker-bg);
    color: var(--text-white);
    overflow-x: hidden;
}

/* ===================================
   SIDEBAR NAVIGATION
   =================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--dark-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 100;
    padding: 20px 0;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 30px 20px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-white);
}

.logo i {
    font-size: 28px;
    color: var(--primary-purple);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background-color: var(--card-bg);
    color: var(--text-white);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-blue) 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(123, 79, 255, 0.4);
}

/* ===================================
   MAIN CONTENT
   =================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding-bottom: 50px;
}

/* ===================================
   TOP HEADER
   =================================== */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 50;
}

.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 16px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    background-color: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background-color: var(--darker-bg);
}

.search-container input::placeholder {
    color: var(--text-gray);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    background-color: var(--card-bg);
    border: none;
    border-radius: 50%;
    color: var(--text-gray);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background-color: var(--primary-purple);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-login {
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-blue) 100%);
    border: none;
    border-radius: 50px;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 79, 255, 0.5);
}

/* ===================================
   FEATURED BANNER
   =================================== */
.featured-banner {
    margin: 30px 40px;
    background: linear-gradient(135deg, #6B46C1 0%, #7B4FFF 50%, #5B98FF 100%);
    border-radius: 20px;
    padding: 50px 60px;
    position: relative;
    overflow: hidden;
}

.featured-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 35px;
}

.banner-icons i {
    animation: float 3s ease-in-out infinite;
}

.banner-icons i:nth-child(2) {
    animation-delay: 0.5s;
}

.banner-icons i:nth-child(3) {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.featured-banner h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 25px;
    max-width: 600px;
}

.btn-explore {
    padding: 14px 35px;
    background-color: var(--text-white);
    color: var(--primary-purple);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-explore:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* ===================================
   GAME SECTIONS
   =================================== */
.game-section {
    margin: 40px 40px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-white);
}

.game-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 15px;
    scroll-behavior: smooth;
}

.game-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.game-scroll-container::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.game-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 10px;
}

.game-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* ===================================
   GAME CARDS
   =================================== */
.game-card {
    flex: 0 0 280px;
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-purple);
    box-shadow: 0 10px 30px rgba(123, 79, 255, 0.3);
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.game-info {
    padding: 15px;
}

.game-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-gray);
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-meta i {
    color: var(--accent-blue);
    font-size: 12px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
    }

    .sidebar .logo span,
    .nav-item span {
        display: none;
    }

    .logo {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
    }

    .featured-banner {
        padding: 40px 30px;
    }

    .featured-banner h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-header {
        padding: 0 20px;
    }

    .search-container {
        max-width: 400px;
    }

    .header-actions {
        gap: 10px;
    }

    .featured-banner {
        margin: 20px 20px;
        padding: 30px 25px;
    }

    .featured-banner h1 {
        font-size: 28px;
    }

    .game-section {
        margin: 30px 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .game-card {
        flex: 0 0 240px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0 15px;
    }

    .search-container {
        max-width: 250px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .btn-login {
        padding: 8px 20px;
        font-size: 13px;
    }

    .featured-banner {
        padding: 25px 20px;
    }

    .featured-banner h1 {
        font-size: 24px;
    }

    .game-card {
        flex: 0 0 200px;
    }

    .game-card img {
        height: 140px;
    }
}

/* ===================================
   SMOOTH ANIMATIONS
   =================================== */
.game-card,
.nav-item,
.icon-btn,
.btn-login,
.btn-explore {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for game cards */
.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }
