/* ==================== RESET E BASE ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ==================== MENU PRINCIPAL ==================== */

.main-menu {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.menu-container {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.menu-container h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4, #ffd700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ==================== GRID DE JOGOS ==================== */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    padding: 10px;
    max-width: 100%;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-card:not(.disabled):hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.game-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

.game-card:hover .game-icon:not(.disabled .game-icon) {
    animation: spin 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.game-card h2 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 6px;
    font-weight: bold;
}

.game-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

/* ==================== CONTAINER DE JOGO ==================== */

#gameContainer {
    width: 100%;
    min-height: 100vh;
}

#gameContainer iframe {
    width: 100%;
    height: 100vh;
    border: none;
}

/* ==================== BOTÃO VOLTAR ==================== */

.back-to-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.back-to-menu:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-5px);
}

/* ==================== RESPONSIVO ==================== */

@media (max-width: 768px) {
    .menu-container h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .game-card {
        padding: 30px 20px;
    }

    .game-icon {
        font-size: 4rem;
    }

    .game-card h2 {
        font-size: 1.5rem;
    }

    .back-to-menu {
        padding: 12px 20px;
        font-size: 1rem;
    }
}
