body {
    margin: 0;
    padding: 0;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Press Start 2P', cursive;
    color: white;
}

.game-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

canvas {
    display: block;
    background-color: #000;
    border: 2px solid #333;
}

.mode-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    color: #39FF14;
    border: 2px solid #39FF14;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    display: none;
    outline: none;
}

.mode-btn:hover {
    background-color: #39FF14;
    color: #000;
}

.settings-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    border: 4px solid #FF1493;
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
}

.settings-overlay h2 {
    color: #00FFFF;
    margin: 0;
    font-size: 20px;
    text-shadow: 0 0 5px #00FFFF;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for settings */
.settings-content::-webkit-scrollbar {
    width: 8px;
}
.settings-content::-webkit-scrollbar-track {
    background: #111; 
}
.settings-content::-webkit-scrollbar-thumb {
    background: #FF1493; 
}

.dict-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.master-label {
    cursor: pointer;
    font-size: 14px;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px dashed #555;
    padding-bottom: 5px;
}

.master-label input[type="checkbox"] {
    appearance: none;
    background-color: #282828;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 20px;
    height: 20px;
    border: 2px solid #39FF14;
    display: grid;
    place-content: center;
    cursor: pointer;
}

.master-label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #39FF14;
}

.master-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.char-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.char-btn {
    background-color: #282828;
    color: #555;
    border: 2px solid #555;
    font-family: sans-serif;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
}

.char-btn.active {
    background-color: #39FF14;
    color: #000;
    border-color: #39FF14;
}

.save-btn {
    margin-top: 10px;
    background-color: transparent;
    color: #FFFF00;
    border: 2px solid #FFFF00;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
}

.save-btn:hover {
    background-color: #FFFF00;
    color: #000;
}
