html, body {
    width: 100%;
    height: 100%;
    margin: 0;
}

:root {
    --bg: #121213;
    --text: white;
    --tile-bg: #121213;
    --tile-border: #3a3a3c;
    --key-bg: #88888a;
    --key-text: white;
}

.light {
    --bg: #f5f5f5;
    --text: #000;
    --tile-bg: #fff;
    --tile-border: #ccc;
    --key-bg: #e0e0e0;
    --key-text: #000;
}
.light {
    --bg: #f5f5f5;
    --text: #000;
    --tile-bg: #fff;
    --tile-border: #ccc;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: var(--bg);
    color: var(--text);
}

/* Başlık */
h1 {
    margin-top: 20px;
}

/* Yeni oyun butonu */
#reset {
    margin-top: 12px;
    padding: 10px 22px;
    font-size: 15px;
    background: #538d4e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

#reset:hover {
    background: #6aaa64;
}

/* Tema butonu */
#theme-toggle {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* Tahta */
#board {
    display: grid;
    grid-template-columns: repeat(5, 70px);
    grid-gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

/* Kutular */
.tile {
    width: 70px;
    height: 70px;
    border: 2px solid var(--tile-border);
    font-size: 32px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    border-radius: 8px;
    background: var(--tile-bg);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.03),
                0 2px 4px rgba(0,0,0,0.4);
}

/* Renkler */
.green {
    background-color: #538d4e;
    border: none;
    color: white;
}

.yellow {
    background-color: #b59f3b;
    border: none;
    color: white;
}

.gray {
    background-color: #303031;
    border: none;
    color: white;
}

/* Sallanma */
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.4s;
}

/* Pop animasyonu */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pop {
    animation: pop 0.4s;
}

/* Modal */
#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
}

#modal .box {
    background: #121213;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

#modal button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #538d4e;
    color: white;
    border: none;
    cursor: pointer;
}

/* Logo */
#logo {
    margin-top: 20px;
}

#logo img {
    width: 300px;
    height: auto;
}

/* Klavye */
#keyboard {
    margin-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#keyboard .row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

#keyboard button {
    padding: 12px 14px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background: rgb(117, 117, 117);
    color: white;
    cursor: pointer;
    
    background: var(--key-bg);
    color: var(--key-text);
}


#keyboard button:hover {
    background: #555;
}

#keyboard button.green {
    background: #538d4e;
}

#keyboard button.yellow {
    background: #b59f3b;
}

#keyboard button.gray {
    background: #464545;
}

/* Mobile responsive */
@media (max-width: 600px) {

    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    #board {
        grid-template-columns: repeat(5, 44px);
        grid-gap: 3px;
        justify-content: center;
    }

    .tile {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    h1 {
        font-size: 20px;
    }

    #keyboard {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #keyboard .row {
        display: flex;
        justify-content: center;
        gap: 2px;
    }

    #keyboard button {
        min-width: 28px;
        padding: 6px;
        font-size: 10px;
        border-radius: 4px;
    }
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #3a3a3c;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px;
    transition: 0.3s;
}

.slider .icon {
    font-size: 16px;
}

.slider::before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s;
}

input:checked + .slider {
    background: #6aaa64;
}

input:checked + .slider::before {
    transform: translateX(28px);
}
#theme-area {
    margin-top: -33px;   /* yukarı aşağı oynat */
}
#theme-area {
    margin-left: 300px;
}
#modal .box {
    background: var(--tile-bg);
    color: var(--text);
}
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}


input:checked + .slider {
    background: #6aaa64;
}

input:checked + .slider::before {
    transform: translateX(32px);
}

/* gizleme sınıfı */
.hidden {
    display: none !important;
}.keyboard-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
}

.keyboard-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.keyboard-switch .slider {
    position: absolute;
    inset: 0;
    background: #3a3a3c;
    border-radius: 28px;
    transition: 0.3s;
    box-sizing: border-box;
}

.keyboard-switch .slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

input:checked + .slider {
    background: #6aaa64;
}

input:checked + .slider::before {
    transform: translateX(28px);
}
#mobile-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
/* Modal her şeyin üstünde dursun */
#modal {
  z-index: 99999 !important;
}

/* Focus kaldırma (en alt) */
button:focus {
  outline: none;
}
/* Yazı seçmeyi kapat */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mobil zoom ve çift dokunma */
html, body {
    touch-action: manipulation;
}

/* Uzun basınca çıkan menüyü kapat */
body {
    -webkit-touch-callout: none;
}

/* Resim sürüklemeyi kapat */
img {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Mobil input yine seçilebilir olsun */
#mobile-input {
    user-select: text;
}
/* Modal her şeyin üstünde dursun */
#modal {
  z-index: 99999 !important;
}

/* Klavye ve switch modaldan altta kalsın */
#keyboard,
#keyboard-toggle-area,
.keyboard-switch {
  position: relative;
  z-index: 1;
}
}