/* Reset e Configurações Gerais */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #121214, #1a1a2e);
    color: #e1e1e6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

/* Telas */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
}

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

/* Títulos e Botões */
.game-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(90deg, #8257e5, #ff79c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: #a8a8b3;
    margin-bottom: 30px;
}

.btn-primary {
    background: linear-gradient(90deg, #9575cd, #7e57c2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(126, 87, 194, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(126, 87, 194, 0.6);
    background: linear-gradient(90deg, #aa00ff, #7e57c2);
}

/* Cabeçalho do Jogo */
.game-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 30px;
}

.score-board {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Área do Puzzle */
.puzzle-area {
    width: 100%;
}

.section-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ff79c6;
    margin-bottom: 15px;
    margin-top: 20px;
}

.target-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.options-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Sistema de Cartas Modular */
.atom-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    width: 180px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

/* Variações de cor com base no Tipo/Família do Átomo */
.atom-card[data-type="metal"] { border-color: #44475a; background: linear-gradient(145deg, rgba(68, 71, 90, 0.2), rgba(0,0,0,0.4)); }
.atom-card[data-type="nao-metal"] { border-color: #ffb86c; background: linear-gradient(145deg, rgba(255, 184, 108, 0.15), rgba(0,0,0,0.4)); }
.atom-card[data-type="halogenio"] { border-color: #ff5555; background: linear-gradient(145deg, rgba(255, 85, 85, 0.15), rgba(0,0,0,0.4)); }
.atom-card[data-type="alcalino"] { border-color: #50fa7b; background: linear-gradient(145deg, rgba(80, 250, 123, 0.15), rgba(0,0,0,0.4)); }
.atom-card[data-type="alcalino-terroso"] { border-color: #8be9fd; background: linear-gradient(145deg, rgba(139, 233, 253, 0.15), rgba(0,0,0,0.4)); }
.atom-card[data-type="hidrogenio"] { border-color: #f1fa8c; background: linear-gradient(145deg, rgba(241, 250, 140, 0.15), rgba(0,0,0,0.4)); }

.atom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Detalhes internos da carta */
.atom-symbol {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.atom-name {
    font-size: 1rem;
    color: #a8a8b3;
    margin-bottom: 15px;
}

.atom-details {
    font-size: 0.85rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 8px;
}

.atom-details p {
    margin-bottom: 4px;
}
.atom-details p:last-child {
    margin-bottom: 0;
}

.label {
    color: #6272a4;
    font-weight: bold;
}

/* Mensagem de Feedback */
.feedback {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 8px;
    margin-top: 15px;
    transition: all 0.3s ease;
}
.feedback.correct {
    background-color: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
    border: 1px solid #50fa7b;
}
.feedback.incorrect {
    background-color: rgba(255, 85, 85, 0.2);
    color: #ff5555;
    border: 1px solid #ff5555;
}
.hidden {
    display: none !important;
}
