body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ffd1dc, #ffb6c1, #ffc0cb);
    color: #8b008b; /* Melhor contraste - roxo escuro */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.game-container {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(255, 182, 193, 0.5);
    max-width: 800px;
    width: 90%;
    border: 3px solid #ffc0cb;
}

h1 {
    color: #8b008b; /* Melhor contraste */
    text-shadow: 2px 2px 4px rgba(139, 0, 139, 0.3);
    font-size: 2.5em;
    margin-bottom: 20px;
}

input[type="number"] {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

button {
    padding: 10px 20px;
    background-color: #ff69b4;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #ff85c1;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 240, 245, 0.6);
    border-radius: 15px;
}

.number-grid div {
    padding: 12px 8px;
    background: linear-gradient(145deg, #fff0f5, #ffe4e1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ffd1dc;
    font-weight: bold;
    color: #8b008b; /* Melhor contraste */
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.2);
}

.number-grid div:hover {
    transform: scale(1.1);
    background: linear-gradient(145deg, #ffe4e1, #fff0f5);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.number-grid div.selected {
    background: linear-gradient(145deg, #ff69b4, #ff85c1);
    color: white;
    border-color: #ff69b4;
}

.number-grid div.highlight {
    background: linear-gradient(145deg, #ffb6c1, #ffc0cb);
    transform: scale(1.15);
    animation: sparkle 0.5s ease;
}

#feedback {
    margin: 25px auto;
    padding: 15px;
    font-size: 1.3em;
    border-radius: 15px;
    background: rgba(255, 240, 245, 0.8);
    max-width: 80%;
}

#feedback.success {
    color: #ff1493;
    background: rgba(255, 240, 245, 0.9);
    border: 2px solid #ff69b4;
    animation: celebrate 1s ease infinite;
}

#feedback.error {
    color: #ff4081;
    background: rgba(255, 240, 245, 0.7);
    border: 2px solid #ffb6c1;
}

@keyframes sparkle {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.15); }
}

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

@media (max-width: 600px) {
    .number-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .game-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
}

.game-info {
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 240, 245, 0.8);
    border-radius: 15px;
    max-width: 80%;
}

#attempts {
    font-size: 1.2em;
    color: #ff69b4;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 2px dashed #ff85c1;
}

#attempts span {
    color: #ff1493;
    font-size: 1.3em;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Controles do jogo */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.restart-button {
    padding: 12px 24px;
    background: linear-gradient(145deg, #ff69b4, #ff85c1);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
}

.restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.4);
    background: linear-gradient(145deg, #ff85c1, #ff69b4);
}

.restart-button:active {
    transform: translateY(0);
}

.difficulty-select {
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #ffc0cb;
    background: white;
    color: #ff69b4;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-select:hover {
    border-color: #ff69b4;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

.difficulty-select:focus {
    outline: none;
    border-color: #ff1493;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}

.sound-toggle {
    padding: 10px 15px;
    background: linear-gradient(145deg, #ffc0cb, #ffb6c1);
    color: #ff69b4;
    border: 2px solid #ffc0cb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    min-width: 50px;
}

.sound-toggle:hover {
    background: linear-gradient(145deg, #ffb6c1, #ffc0cb);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
}

.sound-toggle:active {
    transform: scale(0.95);
}

/* Números desabilitados */
.number-grid div.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
    color: #999;
    border-color: #ccc;
}

.number-grid div.disabled:hover {
    transform: none;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.2);
}

/* Número correto */
.number-grid div.correct {
    background: linear-gradient(145deg, #ff1493, #ff69b4);
    color: white;
    border-color: #ff1493;
    animation: winnerPulse 1s ease infinite;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.6);
    transform: scale(1.1);
}

@keyframes winnerPulse {
    0%, 100% { 
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(255, 20, 147, 0.6);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 35px rgba(255, 20, 147, 0.8);
    }
}

/* Grid desabilitado após vitória */
.number-grid.game-ended {
    pointer-events: none;
    opacity: 0.9;
}

.number-grid.game-ended div:not(.correct) {
    opacity: 0.6;
}

/* Indicador de progresso */
.progress-container {
    margin: 15px auto;
    width: 80%;
    max-width: 400px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 20px;
    background: rgba(255, 182, 193, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid #ffc0cb;
}

.progress-bar {
    background: linear-gradient(90deg, #ff69b4, #ff85c1);
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

#progress-text {
    display: block;
    font-size: 0.9em;
    color: #ff69b4;
    font-weight: bold;
}

#range-hint {
    margin: 10px auto;
    padding: 8px;
    font-size: 1em;
    color: #ff69b4;
    background: rgba(255, 240, 245, 0.6);
    border-radius: 10px;
    border: 2px dashed #ffc0cb;
}

#range-hint span {
    font-weight: bold;
    color: #ff1493;
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff69b4;
    position: absolute;
    top: -10px;
    animation: confettiFall linear forwards;
    border-radius: 50%;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Melhorias de acessibilidade */
.number-grid div:focus {
    outline: 3px solid #ff69b4;
    outline-offset: 2px;
}

.number-grid div:focus-visible {
    outline: 3px solid #ff1493;
    outline-offset: 2px;
}

/* Responsividade melhorada */
@media (max-width: 600px) {
    .number-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .game-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .game-controls {
        flex-direction: column;
    }
    
    .restart-button,
    .difficulty-select {
        width: 100%;
        max-width: 250px;
    }
    
    .progress-container {
        width: 95%;
    }
}

@media (max-width: 400px) {
    .number-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        padding: 10px;
    }
    
    .number-grid div {
        padding: 8px 4px;
        font-size: 0.9em;
    }
} 