
body {
    background-color: #121213;
    color: #ffffff;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

header {
    text-align: center;
    border-bottom: 1px solid #3a3a3c;
    padding-bottom: 20px;
    margin-bottom: 20px;
    width: 100%;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
}

header p {
    color: #d7dadc;
}

.box {
    display: grid;
    grid-template-rows: repeat(6, auto);
}

.row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.row:last-child {
    margin-bottom: 0;
}

.tile {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid #3a3a3c;
    border-radius: 4px;
    user-select: none;
    transition: all 0.2s;
    color: #3a3a3c;
}

.row.active .tile {
    cursor: pointer;
}

.tile.gray,
.tile.yellow,
.tile.green {
    color: white;
}

.tile.gray {
    background-color: #3a3a3c;
    border-color: #3a3a3c;
}

.tile.yellow {
    background-color: #b59f3b;
    border-color: #b59f3b;
}

.tile.green {
    background-color: #538d4e;
    border-color: #538d4e;
}

.tile.locked {
    cursor: not-allowed;
    opacity: 0.85;
}

.controls {
    text-align: center;
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #538d4e;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) {
    background-color: #6aaa64;
}

button:disabled {
    background-color: #3a3a3c;
    color: #787c7e;
    cursor: not-allowed;
}

#message-log {
    position: fixed;
    bottom: 0px;
    /* Jarak dari bawah layar */
    left: 50%;
    /* Posisi tengah secara horizontal */
    transform: translateX(-50%);
    /* Geser balik separuh lebarnya supaya center sempurna */
    text-align: center;
    width: 100%;
    max-width: 400px;
    /* Biar gak terlalu lebar di layar besar */
    padding: 8px 12px;
    background-color: rgba(18, 18, 19, 0.9);
    border-radius: 8px;
    font-style: italic;
    color: #818384;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle-container {
    position: fixed;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #3a3a3c;
    padding: 8px 12px;
    border-radius: 20px;
    z-index: 100;
}

.lang-toggle-container span {
    color: #d7dadc;
    font-size: 0.9rem;
    font-weight: bold;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #818384;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #538d4e;
}

input:checked+.slider:before {
    transform: translateX(20px);
}