::-webkit-scrollbar {
    width: 8px;
    background-color: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: linear-gradient(180deg, #0f3460 0%, #16213e 100%);
}

body.dark {
    background: #000000;
    background-attachment: fixed;
    text-align: center;
    min-height: 100vh;
    color: #eaeaea;
}

.cell {
    font-size: 22px;
    width: 22px;
    height: 22px;
    border: none;
    background-color: #2d5016;
}

.game {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    padding: 40px 20px;
}

.game > div,
.game > #theBoard {
    margin: 20px;
}

#theBoard {
    border: 8px solid #8B4513;
    border-radius: 5px;
    padding: 0;
    background: #2d5016;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 0 4px #654321,
        inset 0 0 0 8px #A0522D;
    position: relative;
}

#restart {
    width: 200px;
    height: 60px;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border: none;
    border-radius: 30px;
    color: #fff;
    transition: all 0.3s ease;
}

#restart:hover {
    background: linear-gradient(135deg, #0099ff 0%, #00d4ff 100%);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    transform: scale(1.05);
}

.controls {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    font-size: 22px;
    width: 500px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#instruct {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 255, 0.2) 100%);
    padding: 15px;
    font-size: 22px;
    font-weight: 700;
    border-radius: 10px;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.flex-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
    width: 30%;
}

.ctrlBtn {
    font-size: 40px;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 2px solid rgba(0, 212, 255, 0.4);
    color: #00d4ff;
    transition: all 0.3s ease;
}

.ctrlBtn:hover {
    background: linear-gradient(135deg, #3a3a4e 0%, #2a2a3e 100%);
    border-color: #00d4ff;
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.ctrlBtn#btnLeft,
.ctrlBtn#btnRight {
    width: 20%;
    font-size: 70px;
}

#scroll-lock-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 10px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#scroll-lock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

hr {
    border-color: rgba(0, 212, 255, 0.3);
}

@media (max-width: 1100px) {
    .controls {
        top: 600px;
    }
    
    #restart {
        width: 180px;
        height: 50px;
        font-size: 16px;
    }
}

@media (max-width: 580px) {
    .cell {
        width: 15px;
        height: 15px;
    }
    
    .controls {
        font-size: 18px;
        width: 360px;
        padding: 20px;
    }
    
    .ctrlBtn {
        font-size: 30px;
    }
    
    .ctrlBtn#btnLeft,
    .ctrlBtn#btnRight {
        font-size: 50px;
    }
}
