:root {
    --primary: #2b2d42;
    --secondary: #8d99ae;
    --accent: #ef233c;
    --highlight: #06d6a0;
    --light: #edf2f4;
    --dark: #1a1a2e;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --code-bg: #011627;
    --simon-green: #06d614;
    --simon-red: #f81960;
    --simon-yellow: #ffff2d;
    --simon-blue: #3ee2ff;
    
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.header {
    background: var(--primary);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--highlight);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 span {
    color: var(--highlight);
    font-family: 'Fira Code', monospace;
}

.header h1 i {
    color: var(--highlight);
}

.score {
    display: flex;
    gap: 20px;
}

.wins, .losses {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.2rem;
}

.wins {
    color: var(--highlight);
}

.losses {
    color: var(--light);
}

.game-area {
    display: flex;
    flex-direction: column;
    padding: 25px;
}

@media (min-width: 900px) {
    .game-area {
        flex-direction: row;
        gap: 30px;
    }
}

.simon-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.simon-container {
    width: 100%;
    background: var(--code-bg);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid var(--highlight);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.simon-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 250px;
    height: 250px;
    position: relative;
}

.simon-btn {
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0.3;
    position: relative;
}

.simon-btn:hover {
    opacity: 0.9;
}

.simon-btn.active {
    opacity: 1;
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.simon-btn:not(.active) {
    opacity: 0.3 !important;
}

.green {
    background-color: var(--simon-green);
    border-top-left-radius: 100%;
}

.red {
    background-color: var(--simon-red);
    border-top-right-radius: 100%;
}

.yellow {
    background-color: var(--simon-yellow);
    border-bottom-left-radius: 100%;
}

.blue {
    background-color: var(--simon-blue);
    border-bottom-right-radius: 100%;
}


/* Estilos para os ícones nos botões */
.simon-btn i {
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.655);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.controls-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    justify-content: center;
    align-items: center;
}

.display {
    background: var(--primary);
    color: var(--highlight);
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    width: 120px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    margin: 0 auto;
    border: 2px solid var(--highlight);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn:active {
    transform: translateY(0);
}

.hint-btn {
    background: var(--warning);
    color: var(--dark);
}

.hint-btn:hover {
    background: #f8961e;
}

.sound-btn {
    background: var(--secondary);
    color: var(--dark);
}

.sound-btn:hover {
    background: #8d99ae;
}

.restart-btn {
    background: var(--highlight);
    color: var(--dark);
    flex: 1;
    justify-content: center;
}

.restart-btn:hover {
    background: #06d6a0;
}

.footer {
    background: var(--primary);
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.message-box {
    background: rgba(0, 0, 0, 0.218);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
}

.message-box i {
    font-size: 1.3rem;
}

.message-box.info {
    color: var(--light);
    border-left: 4px solid var(--highlight);
}

.message-box.success {
    color: var(--highlight);
    border-left: 4px solid var(--success);
}

.message-box.error {
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.message-text {
    font-weight: 500;
}

/* Ranking */
.ranking-container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: 90%;
    max-width: 500px;
    color: white;
    border: 2px solid var(--highlight);
}

.ranking-container h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#ranking-list {
    list-style: none;
    margin-bottom: 15px;
}

#ranking-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#ranking-list li span.rank {
    color: var(--highlight);
    font-weight: bold;
    width: 30px;
}

#ranking-list li span.name {
    flex: 1;
    text-align: left;
    padding-left: 15px;
}

#ranking-list li span.score {
    width: 80px;
    text-align: right;
}

#ranking-list li span.date {
    width: 80px;
    text-align: right;
    color: var(--secondary);
    font-size: 0.8rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
}

.ranking-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background: var(--highlight);
    color: var(--dark);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none;
}

/* Animações */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

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

.pulse {
    animation: pulse 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s;
}

/* Responsividade */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 10px;
    }
    
    .simon-board {
        width: 200px;
        height: 200px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .ranking-container {
        padding: 15px;
    }
    
    #ranking-list li span.date {
        display: none;
    }
}

/* Ajuste para mais cores */
@media (min-width: 600px) {
    .simon-board.three-columns {
        grid-template-columns: 1fr 1fr 1fr;
        width: 350px;
        height: 350px;
    }
}