/* Reset e estilos 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%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 .subtitle {
    display: block;
    font-size: 0.5em;
    margin-top: 8px;
    font-weight: 400;
    opacity: 0.95;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Formulário de sessão */
.session-setup {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 5px;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Hub de jogos */
.session-info {
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.session-info h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.game-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.game-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.game-status {
    position: absolute;
    top: 15px;
    right: 15px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #ffc107;
    color: #856404;
}

.status-badge.completed {
    background: #28a745;
    color: white;
}

.session-actions {
    text-align: center;
}

/* Game específico */
.game-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.game-header {
    margin-bottom: 30px;
}

.game-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
}

.info-item {
    text-align: center;
}

.info-item .label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.info-item .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* Grid de jogo */
.game-grid {
    display: grid;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.grid-3x3 {
    grid-template-columns: repeat(3, 120px);
}

.grid-2x3 {
    grid-template-columns: repeat(3, 120px);
    grid-template-rows: repeat(2, 120px);
}

.grid-item {
    width: 120px;
    height: 120px;
    border: 3px solid #ddd;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    font-size: 3.75rem;
}


.grid-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.grid-item.active {
    background: #fff3cd;
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    animation: glow 1s ease-in-out;
}

/* Cores individuais para cada figura geométrica quando ativa */
.grid-item.active[data-index="0"] { color: #ff0000; } /* ● Círculo - Vermelho */
.grid-item.active[data-index="1"] { color: #0066ff; } /* ■ Quadrado - Azul */
.grid-item.active[data-index="2"] { color: #00cc00; } /* ▲ Triângulo - Verde */
.grid-item.active[data-index="3"] { color: #ffcc00; } /* ★ Estrela - Dourado */
.grid-item.active[data-index="4"] { color: #ff6699; } /* ♥ Coração - Rosa */
.grid-item.active[data-index="5"] { color: #9966ff; } /* ♦ Losango - Roxo */
.grid-item.active[data-index="6"] { color: #ff9900; } /* ▼ Triângulo invertido - Laranja */
.grid-item.active[data-index="7"] { color: #00cccc; } /* ◆ Losango alternativo - Ciano */
.grid-item.active[data-index="8"] { color: #666666; } /* ♠ Espada - Cinza escuro */

.grid-item.correct {
    background: #d4edda;
    border-color: #28a745;
}

.grid-item.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.5); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.8); 
    }
}

/* Mensagens de feedback */
.message {
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Instruções */
.instructions {
    background: #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.instructions h3 {
    color: #495057;
    margin-bottom: 10px;
}

.instructions p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .grid-item {
        width: 80px;
        height: 80px;
        font-size: 3.125rem;
    }
    
    /* Ajustar tamanho das figuras SVG para tablet */
    .grid-item[class*="figure-"] {
        background-size: 80%;
    }
    
    .grid-3x3 {
        grid-template-columns: repeat(3, 80px);
    }
    
    .grid-2x3 {
        grid-template-columns: repeat(3, 80px);
        grid-template-rows: repeat(2, 80px);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }
    
    .grid-item {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    /* Ajustar tamanho das figuras SVG para mobile */
    .grid-item[class*="figure-"] {
        background-size: 85%;
    }
    
    .grid-3x3 {
        grid-template-columns: repeat(3, 70px);
    }
    
    .grid-2x3 {
        grid-template-columns: repeat(3, 70px);
        grid-template-rows: repeat(2, 70px);
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}