/* Games Page Styles */

/* Back Button */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto 20px auto;
    padding: 0 20px;
    text-align: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(20, 30, 40, 0.9);
    border: 2px solid #ff8c00;
    border-radius: 8px;
    color: #ff8c00;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-button:hover {
    background: rgba(255, 140, 0, 0.2);
    border-color: #ffa500;
    color: #ffa500;
    transform: translateX(-5px);
}

.back-arrow {
    font-size: 1.5rem;
    line-height: 1;
}

.back-text {
    line-height: 1;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.games-container .loading,
.games-container .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #a0a0a0;
    font-size: 1.2rem;
}

.games-container .error {
    color: #ff6b6b;
}

/* Game Card */
.game-card {
    position: relative;
    background: rgba(20, 30, 40, 0.9);
    border-radius: 15px;
    border-left: 5px solid #ff8c00;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
}

/* Disabled Game Card */
.game-card.disabled {
    cursor: not-allowed;
    filter: grayscale(100%) brightness(0.6);
    border-left-color: #666;
}

.game-card.disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Game Image */
.game-card-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    order: 3;
}

/* TMT Series Image (landscape format) */
.tmt-series-image {
    height: 240px;
    object-fit: cover;
}

/* Game Info Section */
.game-card-info {
    padding: 15px 20px 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    order: 1;
}

.game-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.game-card-release {
    color: #ff8c00;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.game-card-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 140, 0, 0.3);
}

.game-stat {
    flex: 1;
    text-align: center;
}

.game-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff8c00;
    line-height: 1;
}

.game-stat-label {
    display: block;
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Environment Bar */
.game-environments {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 140, 0, 0.2);
    order: 2;
}

.enviro-icon {
    height: 28px;
    width: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.enviro-icon.active {
    filter: none;
}

.enviro-icon.inactive {
    filter: grayscale(100%) brightness(0.4);
    opacity: 0.3;
}

/* Not Yet Archived Badge */
.not-archived-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 10;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .game-card-image {
        height: 200px;
    }

    .tmt-series-image {
        height: 200px;
    }

    .game-card-info {
        padding: 12px 15px 8px 15px;
    }

    .game-card-title {
        font-size: 1.3rem;
    }

    .game-stat-value {
        font-size: 1.5rem;
    }

    .not-archived-badge {
        font-size: 1.2rem;
        padding: 10px 30px;
    }

    .enviro-icon {
        height: 24px;
    }

    .game-environments {
        gap: 6px;
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .game-card-stats {
        flex-direction: column;
        gap: 10px;
    }

    .game-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .game-stat-value,
    .game-stat-label {
        display: inline;
    }

    .game-stat-label {
        margin-top: 0;
    }
}
