/* Base Styles & Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: white; color: #333; line-height: 1.6; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header with Logo - уменьшенный размер */
header { 
    background: #000000;
    color: white; 
    padding: 0.5rem 0; /* Уменьшено */
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Уменьшено */
}
.logo { 
    height: 60px; /* Уменьшено */
    width: auto;
}
.site-title {
    font-size: 1.5rem; /* Уменьшено */
    font-weight: bold;
    color: #ecf0f1;
    text-transform: lowercase;
    letter-spacing: 0.5px; /* Уменьшено */
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('header-bg.jpg') center/cover no-repeat;
    color: white;
    padding: 3rem 2rem; /* Немного уменьшено */
    text-align: center;
}
.hero-banner h2 { 
    font-size: 2.3rem; /* Немного уменьшено */
    margin-bottom: 1rem; 
}
.hero-banner p { 
    font-size: 1.1rem; /* Немного уменьшено */
    max-width: 800px; 
    margin: 0 auto; 
}

/* Games Container */
.games-container {
    width: 85%;
    margin: 0 auto;
}

/* Game Cards */
.game-card {
    border: 3px solid;
    margin: 2.5rem 0;
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.game-content {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 20px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
.game-info {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.game-image {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.game-image img {
    width: 280px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}
.ribbon-text {
    position: absolute;
    top: -15px;
    right: -15px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Контейнер для кнопки CTA - ИЗМЕНЕНО (поднят выше) */
.cta-button-container {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: -15px; /* Поднятие кнопки выше */
}

/* Game Tags */
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0;
}
.game-tag {
    background: rgba(0,0,0,0.08);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.game-card h3 { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 1.2rem; 
    font-size: 1.8rem; 
}
.game-card h3 i { font-size: 1.6rem; }
.game-card p { 
    margin-bottom: 1.5rem; 
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

/* Цвета для карточек - красная рамка для первой позиции, зеленые для остальных */
.pos1 { 
    border-color: #ff4757; /* Красный для позиции 1 */
    background: linear-gradient(135deg, #fff9f9 0%, #ffecec 100%);
}
.pos2 { 
    border-color: #2ed573; /* Зеленый для позиции 2 */
    background: linear-gradient(135deg, #f4fdfd 0%, #e8fafa 100%);
}
.pos3 { 
    border-color: #2ed573; /* Зеленый для позиции 3 */
    background: linear-gradient(135deg, #fffcf2 0%, #fff4e0 100%);
}
.pos4 { 
    border-color: #2ed573; /* Зеленый для позиции 4 */
    background: linear-gradient(135deg, #faf5fb 0%, #f3e8f7 100%);
}
.pos5 { 
    border-color: #2ed573; /* Зеленый для позиции 5 */
    background: linear-gradient(135deg, #f5f9fd 0%, #e6f1fa 100%);
}

/* CTA Buttons - красная кнопка для первой позиции, зеленые для остальных */
.cta-button {
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
}
.pos1 .cta-button { 
    background: linear-gradient(to right, #ff4757, #ff6b6b); /* Красный градиент */
    color: white; 
}
.pos2 .cta-button, 
.pos3 .cta-button, 
.pos4 .cta-button, 
.pos5 .cta-button { 
    background: linear-gradient(to right, #2ed573, #32ff7e); /* Зеленый градиент */
    color: white; 
}
.cta-button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Footer - новый цвет */
footer {
    background: #000000; /* Темно-синий вместо серого */
    color: #ecf0f1;
    padding: 3rem 0;
    text-align: center;
}
.footer-heading {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: #ecf0f1;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}
.footer-links a:hover { color: #3498db; }
.footer-copyright { 
    margin-top: 2rem; 
    color: #95a5a6; 
    font-size: 0.9rem; 
}

/* Стили для новой секции контента */
.content-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-heading {
    font-size: 2.2rem;
    color: #1e3a5f;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.section-subheading {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 3rem 0 1.5rem 0;
    font-weight: 600;
}

.text-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #34495e;
}

.text-content p {
    margin-bottom: 1.5rem;
}

.text-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.text-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.image-upper_2{
    margin-top: 10px;
}

.image-lower_3{
    margin-top: 20px; 
}


/* ==================== */
/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ - ИСПРАВЛЕННАЯ ВЕРСИЯ */
/* ==================== */

@media (max-width: 768px) {
    /* Адаптивность шапки */
    header { 
        padding: 0.5rem 0;
    }
    .logo-container {
        flex-direction: row;
        text-align: left;
        gap: 10px;
        align-items: center;
    }
    .logo { 
        height: 40px;
    }
    .site-title { 
        font-size: 1.2rem;
        display: block;
    }
    
    /* Адаптивность баннера */
    .hero-banner { 
        padding: 2rem 1rem; 
    }
    .hero-banner h2 { 
        font-size: 1.8rem; 
    }
    .hero-banner p { 
        font-size: 0.95rem; 
    }
    
    /* Адаптивность карточек игр */
    .games-container {
        width: 95%;
        padding: 0 1rem;
    }
    
    .game-card {
        margin: 1.5rem 0;
        padding: 1.5rem 1rem;
        text-align: center;
        min-height: 600px; /* УВЕЛИЧЕНА минимальная высота карточки */
    }
    
    /* Полностью меняем структуру для мобильной версии */
    .game-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        height: 100%;
        position: relative;
    }
    
    /* Логотип игры - первым элементом */
    .game-image {
        order: 1;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        margin-bottom: 5px;
    }
    
    .game-image img {
        width: 200px; /* ЗНАЧИТЕЛЬНО УВЕЛИЧЕНО */
        height: 200px; /* ЗНАЧИТЕЛЬНО УВЕЛИЧЕНО */
        object-fit: contain;
        margin-bottom: 0;
    }
    
    /* Скрываем оригинальный ribbon-text в game-image */
    .game-image .ribbon-text {
        display: none;
    }
    
    /* Кнопка Play Now - вторым элементом */
    .cta-button-container {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 8px 0;
    }
    
    .cta-button {
        padding: 14px 30px;
        font-size: 1.1rem;
        width: 100%;
        max-width: 220px;
    }
    
    /* Иконка и название игры - третьим элементом */
    .game-info {
        order: 3;
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }
    
    .game-info h3 {
        font-size: 1.5rem;
        margin: 12px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .game-info h3 i {
        font-size: 2rem;
    }
    
    /* Описание игры - четвертым элементом */
    .game-info p {
        font-size: 1rem;
        line-height: 1.6;
        color: #555;
        margin: 12px 0;
    }
    
    /* Особенности игры - пятым элементом */
    .game-tags {
        order: 4;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin: 18px 0;
    }
    
    .game-tag {
        background: rgba(0,0,0,0.08);
        padding: 8px 15px;
        border-radius: 18px;
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    /* ЛЕНТА (ribbon-text) - ПОСЛЕДНИМ элементом через псевдоэлемент */
    .game-content::after {
        content: var(--ribbon-text);
        order: 5;
        background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
        color: white;
        padding: 10px 20px;
        border-radius: 22px;
        font-weight: bold;
        font-size: 1rem;
        margin-top: 15px;
        width: auto;
        text-align: center;
        display: block !important;
        box-shadow: 0 4px 15px rgba(255,107,107,0.3);
        border: 2px solid #ff8e8e;
        align-self: center;
    }
    
    /* Устанавливаем разные тексты для каждой карточки через CSS переменные */
    .pos1 .game-content { --ribbon-text: "Fan Favorite"; }
    .pos2 .game-content { --ribbon-text: "Top Rated"; }
    .pos3 .game-content { --ribbon-text: "Editor's Choice"; }
    .pos4 .game-content { --ribbon-text: "New Release"; }
    .pos5 .game-content { --ribbon-text: "Popular"; }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    .game-card {
        padding: 1.2rem 0.8rem;
        min-height: 580px;
    }
    
    .game-image img {
        width: 180px;
        height: 180px;
    }
    
    .game-info h3 {
        font-size: 1.3rem;
    }
    
    .game-info p {
        font-size: 0.95rem;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
        max-width: 200px;
    }
    
    .game-tag {
        font-size: 0.85rem;
        padding: 7px 12px;
    }
    
    .game-content::after {
        font-size: 0.9rem;
        padding: 8px 16px;
        margin-top: 12px;
    }
}

/* Дополнительные стили для лучшей видимости */
@media (max-width: 768px) {
    .game-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-radius: 20px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        border: 1px solid #e9ecef;
    }
}

/* Адаптивность для новой секции */
@media (max-width: 768px) {
    .content-section {
        padding: 2rem 0;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }
    
    .section-subheading {
        font-size: 1.3rem;
    }
    
    .text-content {
        font-size: 0.95rem;
        padding: 0 0.8rem;
    }
    
    .text-content ul {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-heading {
        font-size: 1.4rem;
    }
    
    .section-subheading {
        font-size: 1.1rem;
    }
    
    .text-content ul {
        padding-left: 1.2rem;
    }
    
    .text-content {
        font-size: 0.9rem;
    }
}

/* Адаптивность футера */
@media (max-width: 768px) {
    .footer-links { 
        flex-direction: column; 
        gap: 0.8rem; 
        text-align: center;
    }
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
}