/* ======================================================= */
/* ========== 1. ОБЩИЕ СТИЛИ И ШРИФТЫ =================== */
/* ======================================================= */

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, .logo, .nav-link, .steam-button {
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
}

h2 {
    color: #111;
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-left: 5px solid #FFD700; /* Золотой акцент */
    padding-left: 15px;
}

/* Общий контейнер для секций */
section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* ======================================================= */
/* ========== 2. ХЕДЕР И НАВИГАЦИЯ ===================== */
/* ======================================================= */

header {
    background-color: #111; /* Черный фон */
    color: #fff;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #007bff; /* Синий акцент */
}

.logo {
    font-size: 1.8rem;
    color: #FFD700; /* Золотой логотип */
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 35px; 
    margin-left: auto; /* Сдвигает навигацию вправо */
    align-items: center; 
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 5px 10px;
    transition: color 0.3s, border-bottom 0.3s;
    white-space: nowrap;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 5px 10px;
    transition: color 0.3s, border-bottom 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #FFD700;
}

.nav-link.active {
    border-bottom: 2px solid #FFD700;
}

/* Кнопка "Пополнить Steam" */
.steam-button-link {
    text-decoration: none;
    margin-left: 20px;
}

.steam-button {
    background: linear-gradient(45deg, #007bff, #0056b3); /* Синий градиент */
    color: #fff;
    padding: 10px 18px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.steam-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.6);
}

.steam-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* ======================================================= */
/* ========== 3. ВЫБОР ИГРЫ (.choose-game) ============= */
/* ======================================================= */

.choose-game {
    background: linear-gradient(135deg, #111, #1a1a2e);
    color: #fff;
    text-align: center;
    padding: 50px 30px;
}

.choose-game h1 {
    color: #FFD700;
    font-size: 2.2rem;
    margin: 0 0 10px 0;
    text-transform: none;
    line-height: 1.3;
}

.choose-game h2 {
    color: #ccc;
    font-size: 1.3rem;
    border-left: none;
    padding-left: 0;
    margin-bottom: 25px;
    text-transform: none;
}

#game-search {
    width: 100%;
    max-width: 600px;
    padding: 14px 18px;
    margin: 0 auto 25px auto;
    border: 2px solid #444;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    display: block;
}

#game-search:focus {
    border-color: #FFD700;
    outline: none;
}

.game-cards {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-card {
    width: 200px;
    height: 220px;
    background-color: #333; /* Темный фон для карточки */
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
    border: 3px solid transparent;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.game-card.selected {
    border: 3px solid #FFD700; /* Золотая рамка при выборе */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.02);
}

.game-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.game-card p {
    text-align: center;
    padding: 5px;
    margin: 0;
    font-size: 0.9rem;
    font-family: sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================================================= */
/* ========== 4. КОНФИГУРАЦИЯ (.your-hardware) ========== */
/* ======================================================= */

.your-hardware {
    background: #fff;
}

.your-hardware h2 {
    text-align: center;
    border-left: none;
    padding-left: 0;
}

.config-hint {
    text-align: center;
    color: #777;
    font-family: sans-serif;
    margin: -10px 0 25px 0;
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.pc-item {
    display: flex;
    flex-direction: column;
}

.pc-item-wrapper {
    position: relative;
}

.pc-item label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
    font-family: sans-serif;
}

/* Поля ввода и выбора комплектующих */
#cpu-search, #gpu-search {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
    width: 100%;
}

#cpu-search:focus, #gpu-search:focus {
    border-color: #007bff;
    outline: none;
}

#cpu, #gpu {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    padding: 8px;
    background: #fcfcfc;
}

/* Иконка подтверждения выбора */
.selection-confirm-icon {
    position: absolute;
    right: 15px;
    top: 45px;
    font-size: 1.5rem;
    color: #008000;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Слайдер RAM */
.ram-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

#ram-value {
    font-family: 'Russo One', sans-serif;
    font-size: 1.2rem;
    color: #007bff;
    white-space: nowrap;
}

/* Стилизация кнопки */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

#check-btn, #reset-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Russo One', sans-serif;
    transition: background-color 0.2s, opacity 0.2s;
}

#check-btn {
    background-color: #007bff;
    color: white;
}

#check-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

#check-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#reset-btn {
    background-color: #dc3545;
    color: white;
}

#reset-btn:hover {
    background-color: #c82333;
}

/* ======================================================= */
/* ========== 5. РЕЗУЛЬТАТЫ (.verdict) ================= */
/* ======================================================= */

.result-container {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.game-preview-container {
    flex: 0 0 250px; /* Фиксированная ширина */
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#game-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-item span:first-child {
    font-family: 'Russo One', sans-serif;
    font-size: 1.1rem;
    width: 50px; /* Фиксированная ширина для CPU/GPU/RAM */
}

/* Прогресс-бар */
.progress-container {
    flex: 1;
    background-color: #eee;
    height: 25px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 12px;
    transition: width 1s ease-out;
    position: absolute;
    left: 0;
}

.progress-bar.red { background-color: #dc3545; }
.progress-bar.yellow { background-color: #ffc107; }
.progress-bar.green { background-color: #28a745; }

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #111;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 5;
}

.status {
    width: 100px; /* Фиксированная ширина для статуса */
    font-family: 'Russo One', sans-serif;
    font-size: 0.9rem;
    text-align: right;
    white-space: nowrap;
}

/* Финальный вердикт */
.final-verdict {
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
    transition: opacity 0.3s;
    background: #ffffff; /* По умолчанию */
}

#final-verdict h3 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
}

#final-verdict p {
    font-size: 1rem;
    margin: 0;
}

.fps-estimate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

#fps-value {
    color: #007bff;
    font-size: 1.8rem;
    font-family: 'Russo One', sans-serif;
}

/* ======================================================= */
/* ========== 6. ИНСТРУКЦИЯ + САЙДБАР РЕКЛАМЫ (index.html) = */
/* ======================================================= */

.instruction-and-ad-container {
    max-width: 1130px;
    margin: 20px auto;
    padding: 10px 5%;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Секция инструкций (ЛЕВАЯ ЧАСТЬ) */
.instruction-content {
    flex: 2;
    padding: 10px;
    font-family: "Russo One", sans-serif;
}

/* Рекламный сайдбар (ПРАВАЯ ЧАСТЬ) */
.AD_SIDEBAR {
    flex: 1;
    max-width: 240px;
    padding: 10px;
    border-radius: 5px;
    background-color: #fff;
    border: 3px solid #fffdf0; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top:40px; 
}

/* ======================================================= */
/* ========== 7. ФУТЕР И КОНТАКТЫ ====================== */
/* ======================================================= */

.about-contact {
    background-color: #222;
    color: #ccc;
    padding: 40px 5%;
    border-top: 5px solid #007bff;
    font-family: "Russo One", sans-serif;
}

.about-contact h2 {
    color: #FFD700;
    border-left-color: #FFD700;
}

/* Колонки футера */
.about-flex-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-us-column {
    flex: 2;
    line-height: 1.6;
}

.about-us-column p {
    font-family: sans-serif;
}

.contact-info-column {
    flex: 1;
    padding-left: 30px;
    border-left: 2px dashed #eee;
}

.contact-info-column h3 {
    color: #fff;
    font-size: 1.2rem;
    border-left: none;
    padding-left: 0;
    margin-bottom: 15px;
    font-family: 'Russo One', sans-serif;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 10px;
}

.contact-list a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
    font-family: sans-serif;
}

.contact-list a:hover {
    color: #FFD700;
}

.donate-button {
    display: inline-flex;
    align-items: center;
    background: #dc3545;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Russo One', sans-serif;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Дисклеймеры */
.disclaimer {
    font-size: 0.9rem;
    color: #999;
    text-align: center;
    margin-top: 15px;
    font-family: 'Russo One', sans-serif;
}

.footer-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    margin-top: 30px;
    padding: 15px;
    border-top: 1px solid #444;
    font-family: 'Russo One', sans-serif;
}

.ad-disclaimer {
    margin-top: 15px;
    padding: 8px 10px;
    background-color: #ffe0b2;
    color: #444;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px dashed #ffb74d;
}

/* ======================================================= */
/* ========== 8. СТИЛИ БЛОГА И СТАТЕЙ ==================== */
/* ======================================================= */

.article-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.main-article-content {
    padding: 0 30px;
}

.article-title {
    font-size: 2.5rem;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-family: sans-serif;
    color: #777;
    font-size: 0.9rem;
}

.article-meta .category-tag {
    position: static;
    transform: none;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.intro-paragraph {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    padding-left: 15px;
    border-left: 3px solid #FFD700;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.6rem;
    color: #007bff;
    margin-top: 35px;
    margin-bottom: 15px;
    border-bottom: 2px dashed #ddd;
    padding-bottom: 5px;
}

/* Горизонтальные карточки статей (BLOG.HTML) */
.article-card {
    
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px hidden #ddd;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-card.article-horizontal {
    display: flex;
    align-items: stretch;
}

.card-content-left {
    padding: 30px;
    flex: 2;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content-left h3 {
    font-size: 1.5rem;
    color: #007bff;
    margin-top: 0;
}

.card-content-left .excerpt {
    font-family: sans-serif;
    color: #555;
    margin: 15px 0;
}

.read-more {
    font-size: 1rem;
    color: #FFD700;
    text-decoration: none;
    font-family: 'Russo One', sans-serif;
    align-self: flex-start;
    transition: color 0.2s;
}

.read-more:hover {
    color: #ff9800;
}

.card-image-right {
    flex: 1;
    min-width: 250px;
}

.card-image-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #007bff;
    color: white;
    font-size: 0.8rem;
    font-family: sans-serif;
    border-radius: 4px;
    margin-bottom: 10px;
}


/* СТИЛИ ДЛЯ ТАБЛИЦ В СТАТЬЯХ */
.pc-parts-table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.pc-parts-table th, .pc-parts-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.pc-parts-table thead th {
    background-color: #007bff;
    color: white;
    font-family: 'Russo One', sans-serif;
}

.pc-parts-table tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

.pc-parts-table tbody tr:hover {
    background-color: #e9f5ff;
}

.total-row td {
    background-color: #FFD700;
    font-weight: bold;
    font-size: 1.1rem;
    color: #111;
}

/* КНОПКИ ПОКУПКИ В ТАБЛИЦЕ */
.pc-parts-table .buy-header {
    text-align: center;
    width: 150px;
}
.pc-parts-table .buy-column {
    text-align: center;
}

.market-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #ffcc00;
    color: #111 !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
}

.market-btn:hover {
    background-color: #ffeb3b;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.market-btn:active {
    background-color: #ff9800;
    transform: translateY(0);
}

/* БЛОК РИСКОВ */
.risk-highlight {
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #dc3545;
    border-left: 8px solid #dc3545;
    background-color: #f8d7da;
    border-radius: 5px;
}

.risk-highlight h3 {
    color: #721c24;
    margin-top: 0;
}

/* Адаптивность рекламных блоков Advcake */
.AD_ARTICLE {
    /* Ключевые изменения: Flexbox для центрирования баннеров */
    display: flex;
    justify-content: center; /* Центрирование дочерних элементов по горизонтали */
    align-items: flex-start; /* Выравнивание элементов по верхнему краю */
    gap: 20px; /* Отступ между баннерами */
    
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 25px 0;
    box-sizing: border-box;
}

.AD_ARTICLE .ad-container {
    max-width: 300px; /* Ограничиваем максимальную ширину контейнера баннера */
    width: 100%; /* Используем 100% от max-width */
    margin-bottom: 0; /* Flexbox управляет отступами через gap */
}

/* Адаптивность iframe */
.AD_ARTICLE iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border: none !important;
    display: block;
}

/* На всякий случай: обрезка контейнера баннера */
.AD_ARTICLE div[id^="adb-"] {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* ======================================================= */
/* ========== 9. ДОПОЛНИТЕЛЬНЫЕ КЛАССЫ ================== */
/* ======================================================= */

/* Вторая навигация (main-nav1) */
.main-nav1 {
    display: flex;
    gap: 35px;
    margin-left: auto;
    align-items: center;
}

/* Блог: hero-секция */
.blog-hero {
    background: linear-gradient(135deg, #111, #007bff);
    color: #fff;
    text-align: center;
    padding: 60px 30px;
}

.hero-content h1 {
    color: #FFD700;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    font-family: sans-serif;
}

/* Блог: лента статей */
.blog-feed {
    background-color: #f4f4f4;
}

.article-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card.no-image {
    border: 1px solid #ddd;
}

.card-content-full {
    padding: 30px;
}

.card-content-full h3 {
    font-size: 1.5rem;
    color: #007bff;
    margin-top: 0;
}

.card-content-full .excerpt {
    font-family: sans-serif;
    color: #555;
    margin: 15px 0;
}

.tag-hardware {
    background-color: #007bff;
}

/* Секция "О нас" */
.about-content {
    font-family: sans-serif;
    line-height: 1.7;
}

.about-content p {
    margin-bottom: 15px;
}

.popular-games-section {
    background: linear-gradient(180deg, #fff, #f8f9fa);
    text-align: center;
    padding: 60px 30px;
}

.popular-games-section h2 {
    text-align: center;
    border-left: none;
    padding-left: 0;
    font-size: 2rem;
    margin-bottom: 10px;
}

.popular-games-section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: #FFD700;
    border-radius: 2px;
    margin: 15px auto 0;
}

.popular-games-hint {
    text-align: center;
    color: #888;
    font-family: sans-serif;
    font-size: 1.05rem;
    margin: 15px 0 40px 0;
}

.popular-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.popular-game-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    color: #007bff;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}

.popular-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.25);
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border-color: #007bff;
}

/* Секция инструкций */
.instruction-container {
    background-color: #fff;
}

.instruction-content {
    font-family: sans-serif;
    line-height: 1.7;
}

.instruction-content ol {
    padding-left: 25px;
}

/* Юридические страницы */
.privacy-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: sans-serif;
    line-height: 1.8;
}

.privacy-content h1 {
    color: #111;
    margin-bottom: 20px;
}

.privacy-content h2 {
    color: #007bff;
    margin-top: 30px;
}

.date-update {
    margin-top: 40px;
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* SEO-блок для страниц игр */
.seo-game-block {
    background-color: #fff;
    border: 1px solid #eee;
    border-left: 5px solid #FFD700;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    font-family: sans-serif;
    line-height: 1.7;
    color: #333;
}

.seo-game-block p {
    color: #333;
}

.seo-game-block li {
    color: #333;
}

.seo-game-block h2 {
    color: #111;
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.seo-game-block h3 {
    color: #007bff;
    margin-top: 20px;
    font-size: 1.2rem;
}

.seo-game-block h4 {
    color: #111;
    margin-top: 15px;
    font-size: 1.05rem;
}

.seo-game-block ul {
    padding-left: 25px;
    margin: 10px 0;
}

.seo-game-block li {
    margin-bottom: 8px;
}

/* Блоки в статьях */
.affiliate-insert {
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #ffc107;
    border-left: 8px solid #ffc107;
    background-color: #fff8e1;
    border-radius: 5px;
}

.benchmark-list {
    padding-left: 25px;
    margin: 20px 0;
}

.benchmark-list li {
    margin-bottom: 10px;
    font-family: sans-serif;
}

.article-image-box {
    text-align: center;
    margin: 30px 0;
}

/* ======================================================= */
/* ========== 10. АДАПТИВНОСТЬ (MOBILE < 768px) ========== */
/* ======================================================= */

@media (max-width: 768px) {
    /* --- ОСНОВНАЯ СТРУКТУРА --- */
    section {
        padding: 20px 5%;
        margin: 20px auto;
        box-shadow: none;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* --- ХЕДЕР И НАВИГАЦИЯ --- */
    header {
        flex-wrap: wrap; 
        justify-content: center;
        padding: 10px 5%;
    }
    
    .logo {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 10px;
        font-size: 1.6rem;
    }
    
    .main-nav {
        flex-grow: 1;
        justify-content: space-around;
        margin-left: 0;
        gap: 0;
        flex-basis: 100%;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 5px 8px;
    }
    
    .mobile-hidden {
        display: none !important;
    }

    /* --- ВЫБОР ИГРЫ --- */
    .game-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        justify-content: space-around;
    }
    .game-card {
        width: 45%;
        height: 180px;
    }

    /* --- КОНФИГУРАЦИЯ --- */
    .pc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ram-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* --- РЕЗУЛЬТАТЫ --- */
    .result-container {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .game-preview-container {
        flex: none;
        width: 100%;
        max-width: 300px;
        height: 150px;
        margin: 0 auto;
    }
    .result-details {
        width: 100%;
    }
    .result-item {
        flex-wrap: wrap;
    }
    .progress-container {
        flex-basis: 100%;
        margin-top: 5px;
    }

    /* --- ИНСТРУКЦИИ И РЕКЛАМА --- */
    .instruction-and-ad-container {
        flex-direction: column;
        gap: 20px;
    }
    .instruction-content, .AD_SIDEBAR {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        /* Восстанавливаем фон и тень для instruction-content */
        background-color: #fff;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        padding: 20px;
    }
    
    .AD_SIDEBAR {
        /* Убираем лишний отступ, который был нужен только на десктопе */
        margin-top: 0; 
    }

    /* --- ФУТЕР И КОНТАКТЫ --- */
    .about-flex-container {
        flex-direction: column;
        gap: 20px;
    }
    .contact-info-column {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #ddd;
        padding-top: 20px;
    }
    
    /* --- СТИЛИ СТАТЕЙ И БЛОГА --- */
    .article-card.article-horizontal {
        flex-direction: column;
    }
    .card-content-left {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 20px;
    }
    .card-image-right {
        order: -1;
        min-width: 100%;
        height: 180px;
    }
    .pc-parts-table {
        font-size: 0.75rem; 
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    /* Адаптивность рекламных блоков Advcake */
    .AD_ARTICLE {
        /* На мобильных располагаем вертикально и центрируем */
        flex-direction: column;
        align-items: center; /* Центрирование при вертикальном расположении */
        gap: 15px; /* Уменьшаем gap */
        margin: 20px 0; /* Уменьшаем вертикальный отступ */
        
        /* Очищаем лишние/дублирующиеся стили */
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding: 0;
        box-sizing: border-box;
    }

    .AD_ARTICLE .ad-container {
        max-width: 300px; /* Ограничение ширины для мобильных */
        width: 90%; /* Почти полная ширина */
        margin-bottom: 0; /* Flexbox управляет отступами */
    }
    

    .AD1{
        width: 100%; /* Исправлено с 10020px */
    }

    /* Мобильная стилизация */
    .AD_ARTICLE .ad-container {
        padding: 12px;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #eee;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

}

    /* ======================================================= */
/* ========== 10. СТИЛИ РЕКЛАМНЫХ БЛОКОВ (Advcake) ======= */
/* ======================================================= */

/* Стили для центрирования горизонтальной рекламы в подвале (AD_FOOTER1) */
.AD_FOOTER1 {
    /* Ограничиваем максимальную ширину для центрирования (типичный горизонтальный баннер) */
    max-width: 728px; 
    
    /* Центрирование блока по горизонтали (25px сверху/снизу, auto слева/справа) */
    margin: 25px auto; 
    
    /* Гарантируем, что содержимое (сам рекламный баннер) тоже по центру */
    text-align: center;
    
    /* Дополнительное оформление */
    padding: 10px;
    background-color: #ffffff; 
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px dashed #FFD700; /* Золотой акцент */
}

/* ======================================================= */
/* ========== 11. COOKIE BANNER ======================== */
/* ======================================================= */

#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: #111; /* В цвет твоего хедера */
    color: #fff;
    padding: 20px;
    display: none; /* Скрыто изначально */
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    border-left: 5px solid #FFD700; /* Твой золотой акцент */
    font-family: sans-serif;
    max-width: 900px;
    margin: 0 auto;
    animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-right: 20px;
}

.cookie-text a {
    color: #FFD700;
    text-decoration: underline;
}

.cookie-btn {
    background-color: #007bff; /* Твой синий цвет */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    background-color: #0056b3;
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    #cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    .cookie-text {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .cookie-btn {
        width: 100%;
    }
    .cookie-btn {
        width: 100%;
    }
}