* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0b0b0b;
    color: #e5e5e5;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #fff;
}

header {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(4px);
    background: rgba(11, 11, 11, 0.85);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo-icon {
    font-size: 1.8rem;
}
.logo-text {
    color: #e8e8e8;
}

/* ===== ЛОГОТИП КАРТИНКОЙ ===== */
.logo-img {
    height: 50px;
    width: auto;
    display: block;
}
/* ===== КОНЕЦ ЛОГОТИПА ===== */

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #999;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    cursor: pointer;
}
nav a:hover {
    color: #eee;
    border-bottom-color: #555;
}
nav a.active {
    color: #fff;
    border-bottom-color: #b0a090;
}

.login-btn {
    background: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.login-btn:hover {
    background: #2a2a2a;
    border-color: #555;
}

/* ===== УВЕДОМЛЕНИЕ ПОД ШАПКОЙ (опционально) ===== */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #1a0a0a;
    color: #e77;
    border: 1px solid #b33;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 999;
    text-align: center;
    white-space: nowrap;
}
.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.games-section {
    padding: 50px 0 60px;
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #eee;
}
.badge {
    background: #1e1e1e;
    color: #aaa;
    font-size: 0.8rem;
    padding: 4px 14px;
    border-radius: 30px;
    border: 1px solid #2a2a2a;
    font-weight: 400;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.game-card {
    background: #131313;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #1e1e1e;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
    border-color: #2e2e2e;
}

.game-img {
    width: 100%;
    padding-top: 56.25%;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    flex-shrink: 0;
}

.game-info {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}
.game-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 4px;
}
.game-info p {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 12px;
    line-height: 1.4;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.tag {
    background: #1e1e1e;
    color: #bbb;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #2a2a2a;
}
.tag.hot {
    background: #2a1a1a;
    color: #f88;
    border-color: #3a2a2a;
}

/* ===== НАДПИСЬ "ПРИОБРЕСТИ" ===== */
.game-purchase-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-top: 10px;
    border-top: 1px solid #2a2a2a;
    padding-top: 10px;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
    user-select: none;
    position: relative;
    z-index: 2;
}
.game-purchase-label:hover {
    color: #aaa;
    border-color: #4a4a4a;
}

/* ===== КНОПКИ STEAM И PLATI.MARKET ===== */
.game-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    bottom: 20px;
    left: 18px;
    right: 18px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 3;
    background: #131313;
    padding: 8px 0 4px;
    border-top: 1px solid #2a2a2a;
}

.game-purchase-label:hover + .game-buttons,
.game-buttons:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.steam-btn,
.platimarket-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    text-align: center;
    cursor: pointer;
}

.steam-btn {
    background: #1b2838;
    color: #fff;
    border: 1px solid #2a3d54;
}
.steam-btn:hover {
    background: #2a3d54;
}

.platimarket-btn {
    background: #f5a623;
    color: #1a1a1a;
    border: 1px solid #e09515;
}
.platimarket-btn:hover {
    background: #e09515;
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.game-img-link {
    display: block;
    cursor: pointer;
}
/* ===== КОНЕЦ КНОПОК ===== */

/* ===== МОДАЛКИ ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #161616;
    padding: 34px 28px 28px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    position: relative;
}

.modal-box.access-box {
    max-width: 340px;
    text-align: center;
}
.modal-box.access-box p {
    color: #bbb;
    margin: 12px 0 20px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.6rem;
    cursor: pointer;
    transition: 0.2s;
}
.modal-close:hover {
    color: #eee;
}

.modal-box h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #eee;
}

.modal-box label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #aaa;
    margin: 14px 0 4px;
}

.modal-box input {
    width: 100%;
    padding: 10px 14px;
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #eee;
    font-size: 0.95rem;
    transition: 0.2s;
}
.modal-box input:focus {
    border-color: #444;
    outline: none;
    background: #111;
}

.modal-submit {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 30px;
    color: #e8e8e8;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.modal-submit:hover {
    background: #2a2a2a;
    border-color: #555;
}

.error-message {
    margin-top: 16px;
    padding: 10px 14px;
    background: #1a0a0a;
    border-left: 4px solid #b33;
    color: #e77;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}
.error-message.show {
    display: block;
}

/* ===== КНОПКИ В МОДАЛКЕ ИГРЫ ===== */
.game-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.game-modal-buttons .modal-submit {
    width: auto;
    min-width: 120px;
    margin-top: 0;
}
#gameModalLoginBtn {
    background: #2a3d54;
    border-color: #3a5a7a;
}
#gameModalLoginBtn:hover {
    background: #3a5a7a;
}
#gameModalCloseBtn {
    background: #2a2a2a;
    border-color: #3a3a3a;
}
#gameModalCloseBtn:hover {
    background: #3a3a3a;
}
/* ===== КОНЕЦ МОДАЛКИ ИГРЫ ===== */

footer {
    background: #0d0d0d;
    border-top: 1px solid #1a1a1a;
    padding: 24px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: #666;
}
.footer-content a {
    color: #777;
}
.footer-content a:hover {
    color: #aaa;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 720px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    nav {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px;
    }
    nav a {
        font-size: 0.85rem;
    }
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .game-info {
        padding: 12px 14px 16px;
    }
    .game-info h3 {
        font-size: 1rem;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .notification {
        font-size: 0.8rem;
        padding: 10px 16px;
        white-space: normal;
        top: 110px;
        max-width: 90%;
    }
}

/* ===== ЕДИНЫЙ СТИЛЬ КНОПОК ===== */
.btn {
    display: inline-block;
    padding: 10px 30px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 30px;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
    background: #2a2a2a;
    border-color: #555;
}

.btn-primary {
    background: #2a3d54;
    border-color: #3a5a7a;
}
.btn-primary:hover {
    background: #3a5a7a;
}

/* Стиль ссылок в футере */
.footer-link {
    color: #b0a090;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #fff;
}
/* ===== КНОПКА "ВЕРНУТЬСЯ НА ГЛАВНУЮ" ===== */
.back-home-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 30px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 30px;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.back-home-btn:hover {
    background: #2a2a2a;
    border-color: #555;
}