
/* --- Общие стили страницы --- */
body {
    background-image: url('{% static "img/47585428.png" %}');
    background-attachment: fixed;
    background-size: cover;
}

.games-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px; /* Отступ под хедер */
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: #4cc2ff;
    border-radius: 2px;
    box-shadow: 0 0 8px #4cc2ff;
}

/* --- Топ-5 (Сетка карточек как на первом скрине) --- */
.top-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.game-card-featured {
    position: relative;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    group: ;
}

.game-card-featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: #4cc2ff;
}

.card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.game-card-featured:hover .card-bg {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95), rgba(10, 10, 15, 0));
    padding: 20px 15px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.card-info {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.game-card-featured:hover .card-info {
    transform: translateY(0);
}

.game-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-developer {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 8px;
}

.game-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    width: fit-content;
}

.rating-score { color: #4cc2ff; }
.rating-max { color: #666; font-size: 0.8em; }

/* --- Список игр (Стиль второго скрина) --- */
.games-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-list-item {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.game-list-item:hover {
    background: rgba(30, 30, 35, 0.8);
    border-color: rgba(76, 194, 255, 0.3);
    transform: translateX(5px);
}

.list-thumb {
    width: 120px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    background: #333;
}

.list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-title {
    color: #eee;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 4px;
    margin-left: 15px;
}

.list-tags {
    font-size: 0.8rem;
    color: #777;
}

.list-tags span {
    margin-right: 5px;
}

.list-tags span::before {
    content: '• ';
    color: #444;
}
.list-tags span:first-child::before { content: ''; }

.list-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.score-badge {
    background: #4cd137; /* Steam Green */
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}

.score-badge.average { background: #e1b12c; }
.score-badge.bad { background: #c23616; }
.score-badge.empty { 
    background: #dcdde1;
    color: #2f3640;
    text-shadow: none; 
}


.release-date {
    color: #666;
    font-size: 0.8rem;
    text-align: right;
    min-width: 70px;
}

@media (max-width: 768px) {
    .top-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .game-card-featured { height: 240px; }
    .list-thumb { width: 80px; height: 35px; }
}
.game-img {
    /* Задайте нужные вам размеры (например, 250px на 150px) */
    width: 50px; 
    height: 50px;
    
    /* КРИТИЧЕСКИ ВАЖНО: сохраняет пропорции и красиво обрезает картинку под размер */
    object-fit: cover; 
    
    /* Центрирует точку обрезки (по центру) */
    object-position: center; 
    
    /* По желанию: скругление углов и плавность при наведении */
    border-radius: 12px; 
    transition: transform 0.2s ease;
}
