/* --- Ограничения для рекламы в сайдбаре и нижнем контейнере --- */
.ad-container-main, .ad-container-play {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* Main page ad container - fixed width 250px, height 500px for 2x 250x250 ads */
.ad-container-main {
    width: 250px;
    height: 500px;
    margin: 10px auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Individual ad blocks inside main container */
.ad-block-main {
    width: 250px;
    height: 250px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-partner-main, .ad-partner-play {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    margin: 0 auto;
    word-break: break-word;
    box-sizing: border-box;
    background: transparent;
}

.ad-partner-main {
    border-radius: 0;
    padding: 0;
}
.ad-partner-main iframe,
.ad-partner-main ins,
.ad-partner-main > *,
.ad-partner-play iframe,
.ad-partner-play ins,
.ad-partner-play > * {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.ad-partner-main img,
.ad-partner-play img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}
@media (max-width: 1023px) {
    /* Hide main page ad on mobile */
    .ad-container-main {
        display: none;
    }
    
    .bottom-container .ad-container-main,
    .bottom-container .ad-container-play {
        display: flex;
        flex-direction: row;
        height: 100%;
        width: 100%;
        overflow: hidden;
    }
    .bottom-container .ad-partner-main,
    .bottom-container .ad-partner-play {
        display: flex;
        flex-direction: row;
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        overflow: hidden;
        margin: 0;
        box-sizing: border-box;
        border-radius: 2vh 2vh 0 0;
        padding: 0.5vh 1vw;
        background: transparent;
    }
    .bottom-container .ad-partner-main iframe,
    .bottom-container .ad-partner-main ins,
    .bottom-container .ad-partner-main > *,
    .bottom-container .ad-partner-play iframe,
    .bottom-container .ad-partner-play ins,
    .bottom-container .ad-partner-play > * {
        max-width: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        height: 100% !important;
        display: block;
        margin: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    .bottom-container .ad-partner-main img,
    .bottom-container .ad-partner-play img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
        display: block;
        margin: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
}
/* --- End Ad Center Styles --- */

.game-info-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    left: auto;
    width: 22px;
    height: 22px;
    background: rgba(80,80,80,0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.18s;
    z-index: 3;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    text-decoration: none;
    backdrop-filter: blur(2px);
}

.game-info-btn:hover {
    background: rgba(120,120,120,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.game-info-btn span {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.92;
    user-select: none;
    font-family: 'Orbitron', 'Inter', sans-serif;
    letter-spacing: 0.01em;
}

.game-card:hover .game-info-btn,
.game-card.active .game-info-btn {
    opacity: 1;
}

/* --- Game Card Hover Animation --- */
.game-card {
    position: relative;
    overflow: visible;
}

.game-thumbnail {
    position: relative;
}

.animated-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1), transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 2;
}

.animated-play-btn::after {
    content: '\25B6'; /* Play icon */
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 8px #0006;
}

.animated-game-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 0 8px 0;
    background: rgba(30,34,54,0.6);
    backdrop-filter: blur(12px);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    color: #fff;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1), transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 1;
}

.game-card.active .animated-play-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.game-card.active .animated-game-info {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.game-card .game-title {
    font-family: 'Orbitron', 'Inter', Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
    padding: 0 2px;
}
/* --- End Game Card Hover Animation --- */

/* Lvl.Land Gaming Platform - Premium AAA Gaming Design */
:root {
    --primary-bg: linear-gradient(135deg, #0a0a0f 0%, #1a0a1f 25%, #0f1a2a 50%, #1a0f2a 75%, #0a0a1f 100%);
    --secondary-bg: #0f1419;
    --sidebar-bg: #0f1419;
    --card-bg: rgba(20, 25, 35, 0.8);
    --card-bg-hover: rgba(25, 35, 50, 0.9);
    --accent-primary: #00d4ff;
    --accent-secondary: #ff6b35;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #22c55e;
    --accent-gold: #fbbf24;
    --accent-red: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: rgba(45, 55, 75, 0.6);
    --border-accent: rgba(0, 212, 255, 0.3);
    --glow-primary: 0 0 20px rgba(0, 212, 255, 0.4);
    --glow-secondary: 0 0 15px rgba(255, 107, 53, 0.3);
    --shadow-primary: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --sidebar-width: 280px;
    --glass-bg: rgba(15, 20, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

/* Исправленный body для iOS */
body {
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: var(--primary-bg);
    -webkit-background-size: cover;
    background-size: cover;
}

/* Альтернатива для фиксированного фона на iOS */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    z-index: -1;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
}

/* Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
    animation: cosmicPulse 8s ease-in-out infinite alternate;
}

@keyframes cosmicPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: all 0.3s ease;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(0, 212, 255, 0.05) 0%, 
        rgba(255, 107, 53, 0.02) 50%, 
        rgba(168, 85, 247, 0.05) 100%);
    z-index: -1;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
    width: 100%;
    position: relative;
}

.logo {
    min-width: 240px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    z-index: 10;
}

.logo span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.search-container {
    position: absolute;
    left: calc(var(--sidebar-width) + 2rem);
    right: calc(var(--sidebar-width) + 2rem);
    top: 50%;
    transform: translateY(-50%);
}

.search-container form {
    position: relative;
    display: flex;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary), var(--shadow-card);
    background: var(--card-bg-hover);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--glow-primary), var(--shadow-card);
}

.page-title-main {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    z-index: 10;
}

@media (max-width: 768px) {
    .page-title-main {
        position: static;
    margin: 0 0 0 20vw;
        align-self: center;
        display: block;
        text-align: center;
        width: 100%;
        right: auto;
        top: auto;
        transform: none;
        order: 2;
    }

    .header-container .logo {
        order: 1;
    }
    .header-container .search-container {
        order: 3;
    }
}

/* Main Layout */
.main-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 80px; /* Moved down to start below header */
    width: var(--sidebar-width);
    height: calc(100vh - 80px); /* Adjusted height to account for header */
    background: linear-gradient(180deg, 
        rgba(15, 20, 25, 0.95) 0%, 
        rgba(15, 20, 25, 0.90) 50%, 
        rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--shadow-primary);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Current Category Display - Make it clickable on mobile */
.current-category {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    margin-top: 1rem;
    box-shadow: var(--glow-primary), var(--shadow-card);
    position: relative;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.current-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), 0 8px 25px rgba(0, 212, 255, 0.3);
    border-color: var(--accent-primary);
}

/* Add mobile click indicator */
@media (max-width: 1024px) {
    .current-category {
        cursor: pointer;
        position: relative;
    }
    .animated-play-btn {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }
}

.current-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.1) 50%, 
        transparent 100%);
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.current-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    position: relative;
    z-index: 2;
}



/* User Profile Display */
.user-profile {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.user-info {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.user-info:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary), var(--shadow-card);
    transform: translateY(-2px);
}



.username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

/* Sidebar Admin Section */
.sidebar-admin {
    padding-top: 1rem;
}

.admin-btn {
    background: linear-gradient(135deg, var(--secondary-bg), #1a1f2e);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.admin-btn:hover::before {
    left: 100%;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 31, 46, 0.4), var(--shadow-card);
    border-color: var(--border-accent);
}

/* Sidebar Logout Section */
.sidebar-logout {
    margin-top: auto;
    padding-top: 1rem;
    flex-shrink: 0;
}

.logout-btn {
    background: linear-gradient(135deg, var(--secondary-bg), #1a1f2e);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color);
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.logout-btn:hover::before {
    left: 100%;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 31, 46, 0.4), var(--shadow-card);
    border-color: var(--border-accent);
}

/* Profile Modal User Profile */
.profile-user-profile {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.profile-user-info {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.profile-user-info:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary), var(--shadow-card);
    transform: translateY(-2px);
}



.profile-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

/* Profile Modal Admin Section */
.profile-admin-section {
    padding-top: 1rem;
}

.profile-admin-btn {
    background: linear-gradient(135deg, var(--secondary-bg), #1a1f2e);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.profile-admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.profile-admin-btn:hover::before {
    left: 100%;
}

.profile-admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 31, 46, 0.4), var(--shadow-card);
    border-color: var(--border-accent);
}

/* Profile Modal Logout Section */
.profile-logout-section {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.profile-logout-btn {
    background: linear-gradient(135deg, var(--secondary-bg), #1a1f2e);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color);
}

.profile-logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.profile-logout-btn:hover::before {
    left: 100%;
}

.profile-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 31, 46, 0.4), var(--shadow-card);
    border-color: var(--border-accent);
}

/* User Section */
.user-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.login-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4), var(--shadow-card);
}

.user-stats {
    display: flex;
    gap: 0.5rem;
}

.stat-item {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), var(--shadow-card);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.gift-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.gift-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.gift-btn:hover::before {
    left: 100%;
}

.gift-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4), var(--shadow-card);
}

/* Currency Display */
.currency-display {
    display: flex;
    gap: 0.5rem;
}

.currency-item {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.currency-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3), var(--shadow-card);
}

/* Sidebar Divider */
.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-accent) 20%, 
        var(--accent-primary) 50%, 
        var(--border-accent) 80%, 
        transparent 100%);
    margin: 0.5rem 0;
    position: relative;
}

/* Только для десктопа: второй разделитель */
.sidebar-divider--desktop {
    display: block;
    margin-top: 18px;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .sidebar-divider--desktop {
        display: none;
    }
}

.sidebar-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.3) 50%, 
        transparent 100%);
    animation: dividerGlow 3s ease-in-out infinite alternate;
}

@keyframes dividerGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

/* Categories Navigation */
.categories-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 2px;
    transition: all 0.3s ease;
}

.category-item:hover::before {
    height: 60%;
}

.category-item:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-accent);
    transform: translateX(5px);
    box-shadow: var(--shadow-card);
}

.category-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    box-shadow: var(--glow-primary), var(--shadow-card);
    border-color: var(--accent-primary);
}

.category-item.active::before {
    height: 60%;
    background: white;
}

.category-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.category-name {
    flex: 1;
    font-weight: 500;
}

.category-badge {
    background: linear-gradient(135deg, var(--accent-green), #16a34a);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer-link:hover::after {
    transform: scaleX(1);
}

.footer-link:hover {
    color: var(--text-primary);
    background: var(--card-bg);
    transform: translateX(5px);
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 80px;
    width: var(--sidebar-width);
    height: calc(100vh - 80px);
    background: linear-gradient(180deg, 
        rgba(15, 20, 25, 0.95) 0%, 
        rgba(15, 20, 25, 0.90) 50%, 
        rgba(15, 20, 25, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-primary);
    padding: 2rem 1.5rem;
    overflow-y: visible;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--sidebar-width);
    padding: 3rem 2rem 2rem 2rem;
}

/* Page Footer */
.page-footer {
    display: none; /* Hidden by default on desktop */
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    margin-left: var(--sidebar-width);
    margin-right: var(--sidebar-width);
    z-index: 3; /* Ensure footer is above ad container */
    position: relative;
}

.page-footer-content {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-footer-link {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    position: relative;
}

.page-footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.page-footer-link:hover::after {
    transform: scaleX(1);
}

.page-footer-link:hover {
    color: var(--text-primary);
    background: var(--card-bg-hover);
    transform: translateY(-2px);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

/* Ad Card Styles */
.ad-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: cardLoad 0.5s ease-out forwards;
}

.ad-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--glow-primary), 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

.ad-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ad content styling for actual ads */
.ad-content iframe,
.ad-content ins,
.ad-content > * {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.ad-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.game-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: visible;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

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

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.05) 0%, 
        rgba(255, 107, 53, 0.03) 50%, 
        rgba(168, 85, 247, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--glow-primary), 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-primary);
}

.game-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--accent-green), #16a34a);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    animation: newBadgePulse 2s ease-in-out infinite;
}

.game-badge.new {
    left: 0.75rem;
    right: auto;
}

@keyframes newBadgePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
    }
}

.game-thumbnail {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 16px;
    background: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: 16px;
}

.game-card.active .game-thumbnail::before {
    opacity: 1;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(0.9) contrast(1.1);
    border-radius: 16px;
    background: #18181b;
    display: block;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
    backdrop-filter: blur(10px);
    z-index: 4;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    border-radius: 0 0 16px 16px;
}

.game-card.active .game-info {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    animation: gameInfoAppear 0.4s ease-out 0.1s both;
}

@keyframes gameInfoAppear {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-title {
    font-family: 'Orbitron', 'Inter', Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
    padding: 0 2px;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.game-category {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.8);
}

.play-count,
.rating {
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.play-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    text-decoration: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(0, 212, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.game-card.active .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    animation: playBtnAppear 0.3s ease-out, playBtnPulse 2s ease-in-out 0.5s infinite;
}

@keyframes playBtnPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(0, 212, 255, 0);
    }
}

@keyframes playBtnAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(-5deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    border-radius: 50%;
    transform: translateX(-100%);
    transition: all 0.6s ease;
}

.play-btn:hover::before {
    transform: translateX(100%);
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), var(--glow-primary);
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), var(--shadow-card);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    max-width: 600px;
    max-height: 70vh;
    width: 90%;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--border-accent);
    box-shadow: var(--glow-primary), 0 25px 80px rgba(0, 0, 0, 0.6);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 1.5rem;
    z-index: 10;
    cursor: pointer;
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid transparent;
}

.modal-close:hover {
    color: var(--accent-secondary);
    background: var(--card-bg-hover);
    border-color: var(--accent-secondary);
    transform: rotate(90deg);
}

.modal-title {
    margin: 2.5rem 0 1.5rem 0; /* увеличенный отступ сверху, чтобы не пересекаться с кнопкой закрытия */
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.modal-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Mobile Buttons Container */
.mobile-buttons-container {
    display: none;
}

/* Mobile Profile Button - Fixed Floating Button */
.mobile-profile-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 1px solid var(--border-accent);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease, bottom 0.3s ease;
    box-shadow: var(--shadow-card);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.mobile-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), 0 8px 25px rgba(0, 212, 255, 0.3);
    border-color: var(--accent-primary);
}

.mobile-profile-btn:active {
    transform: scale(0.95);
}

/* Add pulse animation to profile button */
.mobile-profile-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--card-bg);
    border-radius: 50%;
    z-index: -1;
    animation: profilePulse 2s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes profilePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.1;
    }
}

/* Mobile Categories Modal */
.categories-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.categories-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.categories-modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-accent);
    box-shadow: var(--glow-primary), 0 25px 80px rgba(0, 0, 0, 0.6);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
}

.categories-modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.categories-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

.categories-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categories-modal-close:hover {
    background: var(--card-bg-hover);
    color: var(--accent-secondary);
    transform: rotate(90deg);
}

.categories-modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.categories-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.categories-modal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.categories-modal-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    transition: all 0.3s ease;
}

.categories-modal-item:hover::before {
    height: 100%;
}

.categories-modal-item:hover {
    background: var(--card-bg-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
    transform: translateX(5px);
    box-shadow: var(--shadow-card);
}

.categories-modal-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    box-shadow: var(--glow-primary), var(--shadow-card);
    border-color: var(--accent-primary);
}

.categories-modal-item.active::before {
    height: 100%;
    background: white;
}

.categories-modal-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.categories-modal-name {
    flex: 1;
    font-weight: 500;
    font-size: 1rem;
}

.categories-modal-badge {
    background: linear-gradient(135deg, var(--accent-green), #16a34a);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

/* Custom scrollbar for modal */
.categories-modal-body::-webkit-scrollbar {
    width: 6px;
}

.categories-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.categories-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 3px;
}

.categories-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

/* Custom scrollbar for modal-content (Agreement/Privacy) */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(0,0,0,0.1);
}

/* Improved mobile interactions */
.categories-modal-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.categories-modal-item:active {
    transform: translateX(5px) scale(0.98);
}

.current-category:active {
    transform: translateY(-1px) scale(0.98);
}

.mobile-profile-btn:active {
    transform: scale(0.9);
}

/* Mobile Profile Modal */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10002;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 1;
}

.profile-modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-accent);
    box-shadow: var(--glow-primary), 0 25px 80px rgba(0, 0, 0, 0.6);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-modal.show .profile-modal-content {
    transform: translateY(50px) scale(1);
    opacity: 1;
}

.profile-modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

.profile-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-modal-close:hover {
    background: var(--card-bg-hover);
    color: var(--accent-secondary);
    transform: rotate(90deg);
}

.profile-modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Profile User Section */
.profile-user-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-login-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.profile-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.profile-login-btn:hover::before {
    left: 100%;
}

.profile-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4), var(--shadow-card);
}

.profile-currency-display {
    display: flex;
    gap: 0.5rem;
}

.profile-currency-item {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.profile-currency-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3), var(--shadow-card);
}

.profile-buy-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.profile-buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.profile-buy-btn:hover::before {
    left: 100%;
}

.profile-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4), var(--shadow-card);
}

/* Better touch targets for mobile */
@media (max-width: 480px) {
    .categories-modal-item {
        padding: 1rem 1.2rem;
        min-height: 48px; /* Minimum touch target size */
    }
    
    .categories-modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }
    
    .mobile-profile-btn {
        width: 56px;
        height: 56px;
        bottom: 16px;
        right: 16px;
        font-size: 1.3rem;
    }
}

/* Large screens - show both sidebars */
@media (min-width: 1025px) {
    .right-sidebar {
        display: flex;
    }
    
    .page-footer {
        display: none; /* Hide page footer on desktop */
    }
    
    .sidebar-footer {
        display: flex; /* Show sidebar footer on desktop */
    }
}

/* All tablet and mobile screens - common styles */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        top: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        background: linear-gradient(180deg, 
            rgba(15, 20, 25, 0.95) 0%, 
            rgba(15, 20, 25, 0.90) 50%, 
            rgba(15, 20, 25, 0.95) 100%);
        backdrop-filter: blur(20px);
    }
    
    .right-sidebar {
        display: none; /* Hide right sidebar on all tablet and mobile */
    }
    
    .content {
        margin-left: 0;
        margin-right: 0;
        padding-bottom: 90px; /* Add space for bottom ad container */
    }
    
    .search-container {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
    }
    
    .page-footer {
        display: block; /* Show page footer on all tablet and mobile */
        margin-left: 0;
        margin-right: 0;
        background: rgba(20, 23, 35, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        padding: 1.5rem 1rem;
        margin-top: 2rem;
        margin-bottom: 0; /* Remove space for bottom ad container */
        z-index: 1; /* Footer should not be above ad container */
        position: relative;
    }
    
    .page-footer-content {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .page-footer-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        flex: 1;
        max-width: 120px;
        text-align: center;
    }
    
    .page-footer-link:hover {
        border-color: var(--border-accent);
        background: var(--card-bg-hover);
    }
    
    .categories-nav {
        display: none; /* Hide default categories nav */
    }
    
    .mobile-profile-btn {
        display: flex; /* Show mobile profile button */
    }
    
    .sidebar-footer {
        display: none; /* Hide sidebar footer */
    }
}

/* Tablet specific adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .content {
        padding: 2rem;
    }
    
    .page-footer {
        padding: 1.5rem 2rem;
    }
    
    .page-footer-content {
        gap: 1rem;
    }
    
    .page-footer-link {
        padding: 0.6rem 1rem;
        max-width: 140px;
    }
    
    .user-section {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .currency-display {
        flex-direction: row;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        position: relative;
    }
    
    .search-container {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
    }
    
    .content {
        padding: 1rem;
    }
    
    .page-footer-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        max-width: 100px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.875rem;
    }
    
    .ad-card {
        min-height: 150px;
    }
    
    .ad-placeholder {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .game-info {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .user-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .current-category-title {
        font-size: 1rem;
    }
    

    
    .current-category {
        padding: 1.2rem 0.8rem;
        min-height: 70px;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    /* Adjust modal size for mobile */
    .categories-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 1rem;
    }
    
    .categories-modal-header {
        padding: 1rem 1.5rem 0.5rem 1.5rem;
    }
    
    .categories-modal-title {
        font-size: 1.3rem;
    }
    
    .categories-modal-item {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .ad-card {
        min-height: 120px;
    }
    
    .ad-placeholder {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .game-info {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .game-title {
        font-size: 0.8rem;
        line-height: 1.2;
        margin: 0;
    }
    
    .play-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        top: 45%;
    }
    
    .play-btn::after {
        border-left: 10px solid white;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        margin-left: 2px;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 16px;
    }

    .logo span {
        font-size: 1.5rem;
    }
    
    .game-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

/* Loading Animation for game cards */
@keyframes cardLoad {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card {
    animation: cardLoad 0.5s ease-out forwards;
}

/* Hover effects for interactive elements */
.header-container,
.sidebar,
.content {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.search-input:focus,
.category-item:focus,
.footer-link:focus,
.login-btn:focus,
.gift-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Glass morphism effect enhancement */
.header,
.sidebar,
.current-category,
.game-card,
.modal-content {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Additional glow effects */
.login-btn:hover,
.gift-btn:hover,
.play-btn:hover {
    filter: brightness(1.1);
}

/* Enhanced text shadows for better readability */
.logo span,
.current-category-title,
.game-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Load More Games Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    padding: 0 1rem;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border: none;
    border-radius: 25px;
    padding: 1rem 2.5rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transition: all 0.6s ease;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary), 0 8px 25px rgba(0, 212, 255, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

.load-more-text {
    transition: all 0.3s ease;
}

.load-more-spinner {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile adjustments for load more button */
@media (max-width: 768px) {
    .load-more-container {
        margin: 2rem 0;
        padding: 0 0.5rem;
    }
    
    .load-more-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
        min-width: 140px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .load-more-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
        min-width: 120px;
        height: 40px;
    }
}

/* Modal positioning responsive adjustments */
@media (max-width: 768px) {
    .modal,
    .profile-modal.show,
    .categories-modal.show {
        padding-top: 12vh;
    }
}

@media (max-width: 480px) {
    .modal,
    .profile-modal.show,
    .categories-modal.show {
        padding-top: 10vh;
    }
}