/* GENEL KONTEYNER AYARLARI */
.asmaca-container {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 30px;
    padding: 20px; /* Mobilde iç boşluğu biraz azalttık */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .asmaca-container {
        padding: 40px;
        gap: 40px;
    }
}

/* VISUAL & OYUN ALANI */
.hangman-visual svg { 
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)); 
    max-width: 100%; /* Mobilde taşmasın */
}

.draw-part { visibility: hidden; } 
.draw-part.visible { visibility: visible; }

.word-letters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    font-size: 2rem; /* Mobilde biraz küçülttük */
    font-weight: 800;
    color: #fff;
    flex-wrap: wrap; /* Uzun kelimeler mobilde aşağı kaysın */
}

@media (min-width: 768px) {
    .word-letters {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }
}

.letter-box {
    border-bottom: 4px solid #8b5cf6;
    min-width: 30px;
    text-align: center;
}

/* MOBİL UYUMLU KLAVYE (Burayı tamamen optimize ettim) */
.keyboard-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px 5px;
    box-sizing: border-box; /* Padding'in genişliği etkilemesini önler */
}

.key, .keyboard-grid button {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0; /* Padding yerine width/height kullanıyoruz */
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    
    /* Dinamik Boyutlandırma */
    width: 11vw; 
    height: 11vw;
    max-width: 45px;
    max-height: 45px;
    min-width: 35px; /* Çok küçük ekranlarda bile basılabilir kalsın */
    min-height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.key:hover { background: #8b5cf6; transform: scale(1.05); }
.key.correct { background: #10b981; pointer-events: none; border-color: transparent; }
.key.wrong { background: #f43f5e; opacity: 0.5; pointer-events: none; border-color: transparent; }

/* MODAL AYARLARI */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.modal.active { display: flex; }

.modal-content {
    background: #1e293b;
    border: 2px solid #8b5cf6;
    padding: 30px;
    border-radius: 30px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* SEÇİM EKRANI & KATEGORİLER */
.selection-screen { text-align: center; padding: 30px 0; }
.category-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 15px; 
    margin-top: 30px; 
    width: 100%;
}

.cat-btn {
    background: #1e293b;
    border: 2px solid #8b5cf6;
    color: white;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}
.cat-btn:hover { background: #8b5cf6; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4); }

/* Kategori Değiştir Butonu Özel Stili */
.btn-secondary {
    background: rgba(139, 92, 246, 0.1); /* Morun şeffaf hali */
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #e2e8f0;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    width: 100%; /* Mobilde tam genişlik */
    margin-top: 8px;
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #fff;
    transform: translateY(-2px);
}

/* Modal içindeki butonların yerleşimi için ek düzenleme */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

/* KÜÇÜK MOBİL AYARI */
@media (max-width: 480px) {
    .keyboard-grid { gap: 4px; }
    .key, .keyboard-grid button {
        font-size: 0.85rem;
        border-radius: 6px;
    }
    .modal-content { padding: 20px; }
}