/* Reset e Estilos Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Adicionado para centralização vertical */
    padding: 20px;
}

body.iframe-page {
    padding: 0;
    justify-content: flex-start;
}

body.iframe-page iframe {
    width: 100vw; /* Full viewport width */
    height: 90vh; /* Full viewport height */
    border: none;
}

/* Container Principal */
.games-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Grade de Jogos */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%; /* Mudança principal: ajusta ao conteúdo */
    max-width: 100%;
    justify-items: center;
    align-items: start; /* Para cards de alturas diferentes */
    margin: 0 auto;
    justify-content: center; /* Centraliza as colunas do grid */
}

/* Cards de Jogo */
.game-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.15);
}

.game-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background-color: #fff5f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #303135;
    font-size: 1.5rem;
}

.game-card:hover .game-icon {
    background-color: #303135;
    color: white;
}

.game-card h3 {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.game-card p {
    color: #666;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.play-button {
    background-color: #303135;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.play-button:hover {
    background-color: #646c6c;
}

/* Responsividade */

@media (max-width: 768px) {
    .games-grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
        width: fit-content;
        max-width: 100%;
    }
    
    .game-card {
        padding: 12px;
        max-width: 220px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
        width: fit-content;
        max-width: 100%;
    }
    
    .game-card {
        max-width: 180px;
    }
    
    .game-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .game-card h3 {
        font-size: 1rem;
    }
    
    .game-card p {
        font-size: 0.8rem;
    }
}

/* ===== ESTILOS PARA PÁGINAS DE JOGOS ===== */

/* Reset do body para páginas de jogos */
body.game-page {
    padding: 0;
    justify-content: flex-start;
}

/* Estilos do Header para Páginas de Jogo */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #303135;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%; /* Garante que ocupe toda a largura */
    margin: 0; /* Remove qualquer margem */
    margin-bottom: 20px;
}

.header-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    font-weight: 100;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.header-button:hover {
    background-color: #646c6c;
}

.game-title {
    font-weight: 700;
    color: white;
    margin: 0;
}

/* Container do Conteúdo do Jogo */
.game-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}