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

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

:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #0f0f0f;
    --bg-sidebar: #2a2a2a;
    --bg-card: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-pink: #ff00ff;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #fbbf24;
    --border-color: #3a3a3a;
    --hover-bg: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* SEO Headings */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

/* Header */
.header {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.logo-icon {
    width: 80px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

@media (min-width: 969px) {
    .logo-icon {
        width: 160px;
        
    }
}

.logo-icon[aria-hidden="true"] {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    color: var(--text-primary);
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.logo h1.logo-text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-login,
.btn-register {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
}

.btn-login:hover {
    background-color: var(--hover-bg);
}

.btn-register {
    background-color: var(--accent-pink);
    color: var(--text-primary);
}

.btn-register:hover {
    background-color: #ff00cc;
    transform: translateY(-1px);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.language-selector {
    font-size: 0.9rem;
}

/* Main Layout */
.main-layout {
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    padding: 1.5rem 0;
    min-height: calc(100vh - 80px);
    transition: transform 0.3s ease;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

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

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

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 0.95rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--bg-dark);
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* Promotional Banners Top */
.promo-banners-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    min-width: 0;
}

.promo-banner {
    background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.promo-banner.promo-blue {
    background: linear-gradient(135deg, var(--accent-blue), #1e40af);
}

.banner-image-placeholder {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-content {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
}

.banner-content {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.banner-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.banner-title h2 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 0.25rem 0;
}

.banner-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}

.banner-btn {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.banner-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.banner-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.banner-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filter-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--accent-blue);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.filter-icon-btn:first-of-type {
    background-color: var(--accent-blue);
}

.filter-icon-btn:nth-of-type(2) {
    background-color: var(--accent-yellow);
}

.filter-icon-btn:hover {
    transform: scale(1.1);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-sidebar);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

.filter-icon {
    font-size: 1rem;
}

/* Promotional Banners Middle */
.promo-banners-middle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    min-width: 0;
}

.promo-banner-small {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    width: 100%;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.promo-banner-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.promo-banner-small.promo-purple {
    background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
}

.banner-small-image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.banner-small-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.banner-small-content h3,
.banner-small-content h4 {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
}

/* Popular Games Section */
.popular-games {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.btn-all-popular {
    padding: 0.5rem 1.25rem;
    background-color: var(--bg-sidebar);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-all-popular:hover {
    background-color: var(--hover-bg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

.game-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.game-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 280px;
    background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.game-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.badge {
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.game-image-placeholder .placeholder-content {
    font-size: 0.85rem;
    padding: 0.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.game-info {
    padding: 0.75rem;
}

.game-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-title h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-provider {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .promo-banners-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promo-banners-top .promo-banner:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 968px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 1rem 0;
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 80px;
        height: calc(100vh - 80px);
        z-index: 999;
        overflow-y: auto;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .promo-banners-top {
        grid-template-columns: 1fr;
    }
    
    .promo-banners-top .promo-banner:last-child {
        grid-column: 1;
    }
    
    .promo-banners-top .banner-image {
        display: none;
    }
    
    .promo-banners-top .banner-image-placeholder {
        display: none;
    }
    
    .filters {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .filters::-webkit-scrollbar {
        height: 6px;
    }
    
    .filters::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }
    
    .filters::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .filter-btn,
    .filter-icon-btn {
        flex-shrink: 0;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
    
    .game-image-placeholder {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 0.75rem;
        max-width: 100%;
    }
    
    .logo {
        max-width: calc(100% - 200px);
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo h1.logo-text {
        font-size: 1.2rem;
    }
    
    .btn-login,
    .btn-register {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .header-actions {
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .language-selector span:last-child {
        display: none;
    }
    
    .promo-banners-middle {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
    
    .game-image-placeholder {
        min-height: 220px;
    }
    
    .filters {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 0.5rem;
    }
    
    .filters::-webkit-scrollbar {
        height: 6px;
    }
    
    .filters::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }
    
    .filters::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .filter-btn,
    .filter-icon-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .logo {
        max-width: calc(100% - 180px);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo h1.logo-text {
        font-size: 1rem;
    }
    
    .btn-login,
    .btn-register {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .main-content {
        padding: 0.75rem;
        width: 100%;
    }
    
    .promo-banner {
        min-height: 160px;
        width: 100%;
    }
    
    .banner-title {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .banner-title h2 {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .banner-subtitle {
        font-size: 0.8rem;
        word-wrap: break-word;
    }
    
    .banner-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-image-placeholder {
        min-height: 200px;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        white-space: nowrap;
    }
    
    .banner-small-content h3,
    .banner-small-content h4 {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
}

/* Overlay for mobile menu */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.active {
    display: block;
}

