/*=================================================================================
ГЛАВНАЯ СТРАНИЦА - HERO СЕКЦИЯ (ВЕРХНЯЯ ЧАСТЬ ГЛАВНОЙ СТРАНИЦЫ С ФОНОМ)
=================================================================================*/

.home__hero-section {
    padding: 120px 0 30px 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(108, 92, 231, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(86, 204, 242, 0.1) 0%, transparent 40%),
        var(--bg-primary);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.home__hero-section .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.home__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.home__main-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    z-index: 2;
    overflow: visible;
}

/*=================================================================================
ГЛАВНАЯ СТРАНИЦА - САЙДБАР КАТЕГОРИЙ ИГР (НОВЫЙ ДИЗАЙН)
=================================================================================*/

.games-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    margin: 15px 0 40px 0;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.games-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 32px;
}

.sidebar-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

.sidebar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.categories-list {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
}

.category-item.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.2);
}

.category-icon {
    width: 36px;
    height: 36px;
    background: rgba(20, 20, 30, 0.8);
    border: 2px solid var(--border-light);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-fast);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.servers-count {
    color: var(--text-muted);
    font-size: 12px;
    display: block;
}

.category-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.position-badge {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-fast);
}

.position-badge.top-1 {
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid rgba(108, 92, 231, 0.4);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
}

.position-badge.top-2 {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(192, 192, 192, 0.3);
    color: var(--text-primary);
}

.position-badge.top-3 {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(205, 127, 50, 0.3);
    color: var(--text-primary);
}


/*=================================================================================
ГЛАВНАЯ СТРАНИЦА - КОНТЕЙНЕР ИГР (НОВЫЙ ДИЗАЙН)
=================================================================================*/

.games-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    margin: 15px 0 40px 0;
    isolation: isolate;
}

.games-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 32px;
}

.games-header {
    padding: 32px 32px 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.games-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.games-grid {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/*=================================================================================
ИГРОВЫЕ КАРТОЧКИ (НОВЫЙ ДИЗАЙН С КРУГЛЫМИ КРАЯМИ)
=================================================================================*/

.game-card {
    background: rgba(15, 15, 25, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 28px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.game-card.premium {
    background-image: url('https://avatars.mds.yandex.net/i?id=cea4c18212e82451402139da7f41f928_l-11444350-images-thumbs&n=13');
    background-size: cover;
    background-position: center;
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.2);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(10, 10, 18, 0.6) 100%);
    border-radius: 28px;
    z-index: 1;
    transition: all var(--transition-fast);
}

.game-card.premium .card-background {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(10, 10, 18, 0.7) 100%);
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 24px 64px rgba(108, 92, 231, 0.3);
}

.game-card:hover .card-background {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(10, 10, 18, 0.8) 100%);
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid rgba(108, 92, 231, 0.3);
    transition: all var(--transition-fast);
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.9), rgba(30, 30, 45, 0.8));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    position: relative;
}

.game-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), transparent 50%);
    border-radius: 21px;
    pointer-events: none;
}

.game-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.game-rating {
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    font-size: 14px;
    color: #ffd700;
}

.stars i.far {
    color: rgba(255, 255, 255, 0.3);
}

.rating-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.card-content {
    position: relative;
    z-index: 2;
    margin-bottom: 24px;
}

.game-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.game-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.game-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(8px);
    border: 1px solid transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: all var(--transition-fast);
}

.game-status.status-open {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.game-status.status-obt {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.game-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.game-description {
    color: #f0f0f0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.4);
    padding: 16px 20px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 16px;
    flex-wrap: wrap;
}

.game-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
}

.stat:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat.players {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
}

.stat.players i {
    color: #22c55e;
}

.stat.uptime {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}

.stat.uptime i {
    color: #3b82f6;
}

.stat.online {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.stat.online i {
    color: #f59e0b;
}

.stat span {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.play-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.6);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

/*=================================================================================
ГЛАВНАЯ СТРАНИЦА - АДАПТИВНЫЕ СТИЛИ
=================================================================================*/

@media (max-width: 1200px) {
    .home__main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .games-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .sidebar-header {
        padding: 20px 16px 14px 16px;
    }

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

    .categories-list {
        padding: 16px;
    }

    .category-item {
        padding: 12px 14px;
        border-radius: 16px;
        margin-bottom: 6px;
    }

    .category-icon {
        width: 32px;
        height: 32px;
        border-radius: 16px;
    }
    
    .category-icon img {
        border-radius: 14px;
    }

    .category-name {
        font-size: 13px;
    }

    .servers-count {
        font-size: 11px;
    }

    .position-badge {
        padding: 3px 6px;
        font-size: 9px;
        border-radius: 10px;
    }
    
    .position-badge.top-1 {
        padding: 3px 6px;
        font-size: 9px;
    }


    .games-header {
        padding: 24px 20px 18px 20px;
    }

    .games-grid {
        padding: 24px 20px;
        gap: 20px;
    }

    .game-card {
        padding: 20px;
        border-radius: 24px;
    }

    .card-background {
        border-radius: 24px;
    }

    .card-top {
        gap: 12px;
    }

    .game-avatar {
        width: 64px;
        height: 64px;
        border-radius: 20px;
    }

    .game-name {
        font-size: 16px;
    }

    .tag {
        padding: 4px 8px;
        font-size: 10px;
    }

    .card-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .game-stats {
        justify-content: center;
    }

    .play-btn {
        text-align: center;
        padding: 16px;
    }
}