/* ============================================================
   game.css — Игровая страница
   Команда InIProject | Code & Games
   ============================================================ */

.game {
    background: var(--bg-primary);
}

.game__intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game__intro-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.game__back-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.game__back-link:hover {
    color: var(--accent-hover);
}

.game__section {
    margin-bottom: 3rem;
}

.game__section-title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-left: 0;
    border-left: none;
}

.game__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.game__card {
    background: var(--bg-card);
    border: 1px solid rgba(230, 57, 70, 0.15);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
}

.game__card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.game__card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.game__card--soon {
    opacity: 0.5;
}

.game__card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game__card-name {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.game__card-info {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.game__card-tags {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.game__tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent);
    background: rgba(230, 57, 70, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Серверы */
.game__servers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game__server {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-card);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.game__server-icon {
    font-size: 1.2rem;
}

.game__server-name {
    color: var(--text-primary);
    flex: 1;
}

.game__server-status {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.game__server-status--online {
    background: rgba(39, 201, 63, 0.15);
    color: #27C93F;
}

.game__server-status--offline {
    background: rgba(230, 57, 70, 0.15);
    color: #FF4D5A;
}

.game__server-status--soon {
    background: rgba(255, 189, 46, 0.15);
    color: #FFBD2E;
}

.game__server-ip {
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
}

.game__server-ip:hover {
    color: var(--accent);
}

/* Скидки */
.game__deals {
    background: var(--bg-card);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.game__deals-loading {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

.game__deal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid rgba(230, 57, 70, 0.06);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.game__deal:hover {
    background: rgba(230, 57, 70, 0.05);
    color: var(--text-primary);
}

.game__deal:last-child {
    border-bottom: none;
}

.game__deal--locked {
    opacity: 0.6;
}

.game__deal-discount {
    background: var(--accent);
    color: #FFF;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.game__deal-discount--free {
    background: #27C93F;
}

.game__deal-name {
    flex: 1;
}

.game__deal-name--locked {
    color: var(--text-muted);
}

.game__deal-lock {
    margin-right: 4px;
    font-size: 0.65rem;
}

.game__deal-source {
    font-size: 0.6rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.game__deal-price {
    flex-shrink: 0;
    text-align: right;
}

.game__deal-price-main {
    display: block;
}

.game__deal-price-main s {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.game__deal-price-other {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.game__deals-note {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem;
    border-top: 1px solid rgba(230, 57, 70, 0.06);
    opacity: 0.7;
}

/* Модальное окно игры */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.game-modal--open {
    display: flex;
}

.game-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.game-modal__window {
    position: relative;
    width: 95%;
    max-width: 550px;
    max-height: 85vh;
    background: var(--bg-terminal);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 10px var(--accent-glow);
    display: flex;
    flex-direction: column;
}

.game-modal__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(230, 57, 70, 0.15);
}

.game-modal__dots {
    display: flex;
    gap: 6px;
}

.game-modal__dot {
    width: 10px; height: 10px; border-radius: 50%;
}
.game-modal__dot--red    { background: #FF5F56; }
.game-modal__dot--yellow { background: #FFBD2E; }
.game-modal__dot--green  { background: #27C93F; }

.game-modal__title {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.game-modal__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color var(--transition-fast);
}

.game-modal__close:hover {
    color: var(--accent);
}

.game-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-modal__image {
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.game-modal__game-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.game-modal__discount {
    display: inline-block;
    background: var(--accent);
    color: #FFF;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
}

.game-modal__prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-modal__price-row {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.game-modal__price-row s {
    color: var(--text-muted);
    margin-right: 6px;
}

.game-modal__price-current {
    color: #27C93F;
    font-weight: 700;
}

.game-modal__note {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
}

.game-modal__footer {
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(230, 57, 70, 0.15);
    text-align: center;
}

.game-modal__btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.6rem 2rem;
    background: var(--accent);
    color: #FFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.game-modal__btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 768px) {
    .game__grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.8rem;
    }

    .game__card {
        padding: 1.2rem;
    }

    .game__card-icon {
        font-size: 1.5rem;
    }

    .game__card-name {
        font-size: 0.9rem;
    }

    .game__deal {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .game__deal-name {
        width: 100%;
        order: 1;
        font-size: 0.75rem;
    }

    .game__deal-discount {
        order: 0;
    }

    .game__deal-price {
        width: 100%;
        order: 2;
        text-align: left;
    }

    .game__deal-price-other {
        font-size: 0.55rem;
    }

    .game__deal-source {
        width: 100%;
        order: 3;
    }

    .game__server {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .game__server-ip {
        width: 100%;
        margin-left: 2rem;
    }

    .game-modal__window {
        height: 90vh;
    }
}

@media (max-width: 480px) {
    .game__intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .game__section {
        margin-bottom: 2rem;
    }

    .game__section-title {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .game__grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .game__card {
        padding: 1rem;
    }

    .game__card-icon {
        font-size: 1.3rem;
    }

    .game__card-name {
        font-size: 0.85rem;
    }

    .game__card-info {
        font-size: 0.65rem;
    }

    .game__deal {
        padding: 0.6rem;
        gap: 0.3rem;
    }

    .game__deal-name {
        font-size: 0.7rem;
    }

    .game__deal-discount {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .game__deal-price-main {
        font-size: 0.7rem;
    }

    .game__deal-price-main s {
        font-size: 0.6rem;
    }

    .game__deal-price-other {
        font-size: 0.5rem;
    }

    .game__server {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

    .game__server-icon {
        font-size: 1rem;
    }

    .game__server-status {
        font-size: 0.6rem;
    }

    .game__deals-note {
        font-size: 0.55rem;
        padding: 0.4rem;
    }
}
