:root {
    --font-family: 'Marhey', sans-serif;
    --font-family-arabic: 'Harmattan', serif;
    --primary-color: #007bff; /* Mavi */
    --success-color: #28a745; 
    --error-color: #dc3545; /* Kırmızı */
    
    --background-color: #f8f9fa; 
    --panel-background: #f8f9fa; 
    
    --text-color: #343a40; 
    --light-text-color: #adb5bd;
    
    --border-color: transparent; 
    
    /* GÜNCELLENDİ: Daha güçlü 3D gölgeler */
    --shadow-light: -8px -8px 16px rgba(255, 255, 255, 1);
    --shadow-dark: 8px 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-inset: inset -6px -6px 12px rgba(255, 255, 255, 1), inset 6px 6px 12px rgba(0, 0, 0, 0.12);

    --container-width: 90%; 
    --base-font-size: 3.5em; 
    
    --circle-size: 42px; 
    --circle-font-size: 1.3em; 
}

html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%; /* iOS zoom'u engelle */
}

body {
    font-family: var(--font-family) !important;
    background-color: var(--background-color); 
    color: var(--text-color);
    
    /* EKLENDİ: Mat/Kumlu Doku Efekti */
    background-image: linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.02) 75%),
                      linear-gradient(45deg, rgba(0,0,0,0.02) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.02) 75%);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    padding: 5px; box-sizing: border-box; direction: ltr;
}

#game-container {
     width: var(--container-width); 
     position: relative;
     margin: auto; 
}
main { display: none; }
main.active { display: block; }

/* GÜNCELLENDİ: Ana panel (Kutusuz tasarım) */
#level2-container {
    width: 100%; 
    margin: 0 auto;
    padding: 25px; /* İç boşluk artırıldı */
    background-color: var(--panel-background); /* Arka planla aynı renk */
    border-radius: 20px;
    /* GÜNCELLENDİ: 3D Kabartma efekti */
    box-shadow: var(--shadow-light), var(--shadow-dark);
    direction: rtl;
    text-align: center;
    max-height: 98vh;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    overflow-y: auto; 
}

#l2-root-area {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    padding: 5px 0px; 
    margin-bottom: 10px;
    width: 100%;
    flex-shrink: 0; 
}

.l2-passive-suffixes {
    font-family: var(--font-family-arabic) !important;
    font-size: 2.6em; 
    color: var(--text-color); /* siyah */
    opacity: 1;
    direction: rtl;
    text-align: center; 
    user-select: none;
    transition: opacity 0.5s ease;
    flex-shrink: 0; 
    flex-grow: 1; 
}
.l2-passive-suffixes.faded {
     opacity: 0.1; /* Daha da soluk */
     pointer-events: none;
}

#l2-draggable-root-wrapper { 
    align-self: center; 
    display: flex; 
    justify-content: center; 
    margin: 0 10px; 
    position: relative;
}

/* GÜNCELLENDİ: Kök Kartı (Cam efekti -> 3D Mat Kabartma) */
.l2-draggable-root { 
    display: inline-flex; align-items: center; gap: 15px; 
    padding: 12px 24px; 
    font-family: var(--font-family-arabic) !important; 
    font-size: calc(var(--base-font-size) * 1.3); 
    font-weight: bold; line-height: 1; 
    
    background-color: var(--background-color); /* Arka planla aynı */
    backdrop-filter: none; /* Cam efekti kaldırıldı */
    border: none; /* Sınır kaldırıldı */
    
    color: var(--text-color); 
    border-radius: 15px; 
    cursor: grab; 
    transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.5s ease; 
    
    /* GÜNCELLENDİ: 3D Kabartma efekti */
    box-shadow: var(--shadow-light), var(--shadow-dark);
    
    user-select: none; 
    position: relative;
    z-index: 2;
    touch-action: none; 
}
.l2-draggable-root span { 
    display: inline-block; 
    font-family: var(--font-family-arabic) !important; 
}

.l2-draggable-root:hover { 
    transform: translateY(-3px); 
    /* Arka plan değişimi kaldırıldı */
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1); 
}

.l2-draggable-root.faded {
    opacity: 0.3; 
    pointer-events: none;
    cursor: default; 
    box-shadow: none; /* Solukken gölge olmasın */
}

/* GÜNCELLENDİ: Sürüklenen hayalet kart (Mat görünüm) */
.drag-ghost { 
    position: fixed; 
    top: 0; left: 0; 
    display: inline-flex; align-items: center; gap: 15px; 
    padding: 12px 24px; 
    font-family: var(--font-family-arabic) !important; 
    font-size: calc(var(--base-font-size) * 1.3); 
    font-weight: bold; line-height: 1; 
    
    background-color: var(--background-color); /* Mat arka plan */
    backdrop-filter: none;
    border: 2px dashed var(--primary-color); 
    
    color: var(--text-color); 
    border-radius: 15px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); 
    transform: scale(1.05) !important; 
    opacity: 1; 
    pointer-events: none; 
    z-index: 1000; 
    direction: rtl !important; 
    transition: none; 
}
.drag-ghost span { display: inline-block; font-family: var(--font-family-arabic) !important; }

#l2-mistakes { display: none; } 

/* GÜNCELLENDİ: Türkçe kelime alanı (Kutusuz) */
#l2-turkish-words-progress {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0 0 20px 0; 
    padding: 10px;
    border-radius: 10px;
    background-color: transparent; /* Kutu kaldırıldı */
    direction: ltr;
    flex-wrap: wrap; 
    flex-shrink: 0; 
}

/* GÜNCELLENDİ: Türkçe kelime (3D Kabartma) */
.l2-turkish-word {
    font-family: var(--font-family) !important; 
    font-size: 1.3em; 
    font-weight: bold;
    color: var(--text-color); 
    padding: 10px 18px;
    border-radius: 8px;
    background-color: var(--background-color); 
    border: none; /* Sınır kaldırıldı */
    transition: all 0.3s ease;
    opacity: 1;
    margin: 3px; 
    box-shadow: var(--shadow-light), var(--shadow-dark);
}


/* GÜNCELLENDİ: Aktif kelime (Parlak Kırmızı Çerçeve) */
.l2-turkish-word.active {
    color: var(--text-color);
    border: 4px solid var(--error-color); /* Kalın kırmızı çerçeve */
    transform: scale(1.1); /* Biraz daha büyük */
    box-shadow: 0 0 15px var(--error-color); /* Parlak kırmızı gölge */
    opacity: 1;
}

/* GÜNCELLENDİ: Aktif kök kartı (Sürüklenebilir Animasyon) */
.l2-draggable-root.active {
    /* "Beni sürükle" efekti için animasyonu geri getiriyoruz */
    animation: pulse-vurgu-glass 1.5s infinite ease-in-out;
    /* Bastırma efektleri (box-shadow ve transform) kaldırıldı */
}

/* GÜNCELLENDİ: Tamamlanan kelime (Başarılı) */
.l2-turkish-word.done {
    background-color: var(--success-color); 
    color: white; 
    border: none; 
    opacity: 1; 
    filter: none; 
    transform: scale(1);
    box-shadow: none; /* Renkli olunca gölgeye gerek yok */
}

/* GÜNCELLENDİ: Hatalı kelime (Hatalı) */
.l2-turkish-word.failed {
    background-color: var(--error-color); 
    color: white; 
    border: none; 
    opacity: 1; 
    filter: none; 
    transform: scale(1);
    box-shadow: none; /* Renkli olunca gölgeye gerek yok */
    animation: none; 
}

.l2-turkish-word.correct { 
    animation: flash-correct 0.5s; 
}

.l2-turkish-word.incorrect { 
     animation: flash-incorrect 0.5s;
     animation-name: flash-incorrect; 
     animation-iteration-count: 1;
}

.l2-turkish-word.faded,
.l2-turkish-word.done.faded,
.l2-turkish-word.failed.faded {
    opacity: 0.3; 
    filter: grayscale(80%); 
    pointer-events: none;
    background-color: var(--background-color); 
    color: var(--light-text-color); 
    border: none; 
    box-shadow: var(--shadow-light), var(--shadow-dark);
}

/* GÜNCELLENDİ: Kalıp ızgarası */
#l2-patterns-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-rows: auto auto auto auto; 
    gap: 15px; /* Boşluk artırıldı */
    padding-top: 20px; /* Boşluk artırıldı */
    border-top: 2px solid rgba(0,0,0,0.05); /* Daha yumuşak çizgi */
    width: 90%; 
    margin-left: auto; 
    margin-right: auto; 
    flex-grow: 0; 
}

/* GÜNCELLENDİ: Kalıp Kutusu (3D Kabartma) */
.l2-pattern-group {
    background-color: var(--background-color);
    border: none; /* Sınır kaldırıldı */
    border-radius: 15px;
    padding: 8px;
    padding-right: calc(var(--circle-size) + 12px); 
    transition: all 0.3s ease;
    position: relative;
    min-height: calc(var(--base-font-size) * 2.0); 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* GÜNCELLENDİ: 3D Kabartma efekti */
    box-shadow: var(--shadow-light), var(--shadow-dark);
}

/* GÜNCELLENDİ: Üzerine gelme (İçine bastırılmış) */
.l2-pattern-group.dragover { 
    border: none; 
    background-color: var(--background-color);
    box-shadow: var(--shadow-inset);
}

.l2-pattern-group.incorrect-flash { 
    animation: shake 0.5s; 
    box-shadow: var(--shadow-inset), 0 0 10px var(--error-color); /* Hata efekti */
    background-color: var(--background-color) !important; 
}

.l2-pattern-group.faded { 
    opacity: 0.3; 
    pointer-events: none; 
    transition: opacity 0.5s ease; 
}

.l2-pattern-group.highlight-correct-pattern {
    border: none !important; 
    background-color: var(--background-color) !important; 
    box-shadow: var(--shadow-light), var(--shadow-dark), 0 0 10px var(--error-color); /* Vurgu */
}

/* GÜNCELLENDİ: Rakam dairesi (İçine bastırılmış) */
.pattern-number-circle {
    position: absolute;
    right: 8px; 
    top: 50%;
    transform: translateY(-50%);
    width: var(--circle-size);
    height: var(--circle-size);
    background-color: var(--background-color); 
    color: var(--text-color); 
    border: none; /* Sınır kaldırıldı */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--circle-font-size);
    font-weight: bold;
    font-family: var(--font-family); 
    z-index: 3;
    line-height: 1; 
    /* GÜNCELLENDİ: 3D Bastırma efekti */
    box-shadow: var(--shadow-inset);
}

.l2-pattern-number {
    font-family: var(--font-family-arabic) !important;
    font-size: calc(var(--base-font-size) * 1.15); 
    font-weight: normal;
    color: var(--error-color); 
    position: absolute; 
    width: calc(100% - var(--circle-size) - 15px); 
    height: 100%; top: 0; left: 0; 
    display: flex; align-items: center; justify-content: center;
    gap: 40px; 
    direction: rtl;
    padding: 0 10px;
    pointer-events: none;
    transition: opacity 0.3s ease; 
}
.l2-pattern-number span { display: inline-block; line-height: 1; background-color: transparent; padding: 3px 6px; border-radius: 4px; }
.l2-pattern-number.hidden { opacity: 0; }

.l2-derived-word {
    font-family: var(--font-family-arabic) !important; 
    font-size: calc(var(--base-font-size) * 1.1); 
    font-weight: bold;
    color: var(--success-color); 
    text-align: center;
    line-height: 1.2;
    position: absolute;
    width: calc(100% - var(--circle-size) - 15px); 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    direction: rtl;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; 
}
 .l2-derived-word span { 
    display: inline-block; 
    margin-left: 0; 
    font-size: 0.8em; 
    line-height: 1; 
 }

#l2-global-result { 
    margin-top: 5px; 
    font-size: 1.1em; 
    color: var(--primary-color); 
    font-weight: 500; 
    min-height: 1.5em; 
    font-family: var(--font-family) !important; 
    flex-shrink: 0;
}

 #l2-bottom-area {
    width: 100%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-top: 10px; 
    padding-top: 5px; 
    flex-shrink: 0;
    direction: ltr; 
}

/* GÜNCELLENDİ: İleri tuşu (3D Kabartma) */
#next-button {
    align-self: center; 
    display: block;
    margin: 0;
    padding: 12px 28px; /* Biraz büyüdü */
    font-size: 1em;
    font-weight: bold;
    color: white;
    background-color: var(--success-color); 
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family) !important; 
    /* GÜNCELLENDİ: 3D Kabartma efekti */
    box-shadow: var(--shadow-light), var(--shadow-dark);
}
#next-button.pulse-on-appear {
    animation: pulse-appear 0.6s ease-out; 
}

#next-button:hover { 
    background-color: #218838; 
    transform: translateY(-2px); 
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1);
}

#next-button:active {
    box-shadow: var(--shadow-inset); /* Bastırma efekti */
    transform: translateY(1px);
}

.hidden { display: none !important; }

/* GÜNCELLENDİ: Overlay (Mat yüzey) */
.overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: rgba(248, 249, 250, 0.97); /* Arka planla uyumlu */
    display: flex; justify-content: center; align-items: center; text-align: center; 
    z-index: 10; transition: opacity 0.3s, visibility 0.3s; 
    direction: ltr; padding: 15px; box-sizing: border-box; 
}
.overlay.hidden { opacity: 0; visibility: hidden; }

/* GÜNCELLENDİ: Overlay içeriği (3D Kabartma) */
.overlay-content { 
    background: var(--panel-background); 
    padding: 30px 40px; 
    border-radius: 20px; 
    box-shadow: var(--shadow-light), var(--shadow-dark); /* 3D Efekti */
    max-width: 90%; margin: auto; direction: ltr; text-align: center; 
}
#results-screen .overlay-content { padding-top: 40px; padding-bottom: 40px; }
.overlay h1, .overlay h2 { color: var(--text-color); margin-top: 0; font-family: var(--font-family) !important; }
.start-options { display: flex; justify-content: center; gap: 15px; margin-top: 25px; margin-bottom: 30px; flex-wrap: wrap; }

/* GÜNCELLENDİ: Başlangıç butonu (3D Kabartma) */
.start-button-option { 
    background-color: var(--primary-color); 
    color: white; border: none; padding: 12px 25px; 
    font-size: 1em; font-weight: bold; border-radius: 10px; 
    cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; 
    font-family: var(--font-family) !important; 
    box-shadow: var(--shadow-light), var(--shadow-dark);
}
.start-button-option:hover { 
    background-color: #0056b3; 
    transform: translateY(-2px); 
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1);
}
.start-button-option:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(1px);
}
.start-button-option:disabled { 
    background-color: var(--light-text-color); 
    cursor: not-allowed; transform: none; 
    box-shadow: none; opacity: 0.7; 
}

/* ... (Diğer stillerde büyük değişiklik yok) ... */
.image-previews { display: flex; justify-content: center; gap: 20px; margin-top: 20px; perspective: 500px; flex-wrap: wrap; }
.image-preview { text-align: center; margin-bottom: 15px; }
.image-preview img { max-width: 150px; height: auto; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.3s ease; transform: rotateY(-10deg) rotateX(5deg); border: 1px solid var(--border-color); }
.image-preview:nth-child(2) img { transform: rotateY(10deg) rotateX(5deg); }
.image-preview img:hover { transform: scale(1.1) rotateY(0deg) rotateX(0deg); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.image-preview p { margin-top: 10px; font-size: 0.9em; color: var(--light-text-color); font-family: var(--font-family) !important; /* Marhey */ }

#results-details { margin: 20px 0; text-align: center; min-width: auto; }
#results-details p { font-family: var(--font-family) !important; /* Marhey */ }
#results-details div { font-size: 1.6em !important; font-family: var(--font-family) !important; /* Marhey */ direction: ltr !important; text-align: center !important; color: var(--primary-color); line-height: 1.8; }
#results-details div span { font-family: var(--font-family-arabic) !important; /* Harmattan */ font-size: 1.2em; margin-right: 10px; direction: rtl; }

#play-again-button { 
    font-family: var(--font-family) !important; 
    /* Başlangıç butonuyla aynı stili verelim */
    background-color: var(--primary-color); 
    color: white; border: none; padding: 12px 25px; 
    font-size: 1em; font-weight: bold; border-radius: 10px; 
    cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; 
    box-shadow: var(--shadow-light), var(--shadow-dark);
    margin-top: 15px;
}
#play-again-button:hover {
    background-color: #0056b3; 
    transform: translateY(-2px); 
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1);
}

#orientation-warning {
    background-color: var(--background-color);
    color: var(--text-color);
    z-index: 1001; 
    display: none; 
}

@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }

/* GÜNCELLENDİ: Flash animasyonları (Arka planı değil, gölgeyi değiştirsin) */
@keyframes flash-correct { 
    0%, 100% { box-shadow: var(--shadow-light), var(--shadow-dark); color: var(--text-color); } 
    50% { background-color: var(--success-color); color: white; box-shadow: none; } 
}
@keyframes flash-incorrect { 
    0%, 100% { box-shadow: var(--shadow-light), var(--shadow-dark); color: var(--text-color); } 
    50% { background-color: var(--error-color); color: white; box-shadow: none; } 
}

/* Eski pulse animasyonu kaldırıldı, yenisi eklendi */
@keyframes pulse-vurgu-glass {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: var(--shadow-light), var(--shadow-dark);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1);
    }
}
@keyframes pulse-appear {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Pembe ekler için kural */
.highlight-suffix {
    color: #E91E63; /* Canlı pembe renk */
    font-size: 1.1em; /* Normal ek yazısından %10 daha büyük */
    font-weight: bold; /* Daha belirgin olması için */
}


/* *** GÜNCELLENDİ - Mobil Uyum (Flex Order ile) *** */
@media (max-width: 600px) {
    :root { 
        --base-font-size: 1.7em; 
        --circle-size: 24px; 
        --circle-font-size: 0.65em; 
        
        --shadow-light: -5px -5px 10px rgba(255, 255, 255, 1);
        --shadow-dark: 5px 5px 10px rgba(0, 0, 0, 0.1);
        --shadow-inset: inset -3px -3px 6px rgba(255, 255, 255, 1), inset 3px 3px 6px rgba(0, 0, 0, 0.1);
    }

    #game-container { width: 98%; } 
    .overlay-content { padding: 20px 15px; }
    .start-options { flex-direction: column; }
    .image-previews { flex-direction: column; gap: 25px;}
    .image-preview img, .image-preview:nth-child(2) img { max-width: 100px; }
    
    #l2-patterns-wrapper { 
        grid-template-columns: 1fr 1fr; 
        grid-template-rows: auto; 
        max-height: none; 
        overflow-y: visible; 
        padding: 10px 5px; 
        gap: 10px; 
        order: 4; 
    }

    /* GÜNCELLENDİ: Kök kartı mobilde büyütüldü */
    .l2-draggable-root { 
        gap: 10px; /* Artırıldı */
        font-size: calc(var(--base-font-size) * 1.5); /* Artırıldı (1.05 idi) */
        padding: 10px 16px; /* Artırıldı (4px 8px idi) */
    }
    
    .l2-pattern-group { 
        min-height: calc(var(--base-font-size) * 2.5); 
        padding-right: calc(var(--circle-size) + 8px); 
    }
     
     .l2-pattern-number { 
         font-size: calc(var(--base-font-size) * 0.85); 
         width: calc(100% - var(--circle-size) - 12px); 
         gap: 8px; 
     } 
     
    .l2-derived-word { 
        font-size: calc(var(--base-font-size) * 0.85); 
        width: calc(100% - var(--circle-size) - 12px); 
    }
     .l2-derived-word span { font-size: 0.7em; } 

    #level2-container { 
        max-height: 98vh; 
        overflow-y: auto; 
        padding: 10px 5px; 
    } 
    
    #l2-turkish-words-progress { 
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 6px; 
        padding: 5px;
        margin: 5px 0; 
        order: 1; 
    } 
    
    .l2-turkish-word { 
        font-size: 0.9em; 
        padding: 6px 10px; 
        margin: 2px; 
    } 

    #l2-root-area {
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        gap: 8px; 
        padding: 5px 8px;
        margin-bottom: 2px; 
        order: 2; 
    }
    
    #l2-bottom-area {
        display: contents; 
    }
    
    .l2-passive-suffixes { 
        font-size: 1.6em; 
        text-align: center; 
        width: 100%; 
        margin-top: 10px; 
        margin-right: 0; 
        order: 6; 
    }
    
    #l2-draggable-root-wrapper { 
        width: auto; 
    }
    
    #next-button { 
        padding: 8px 15px; 
        font-size: 0.9em;
        align-self: center; 
        order: 7; 
        margin-top: 10px; 
    }

    .pattern-number-circle { right: 5px; } 

    #l2-mistakes { 
        order: 3; 
    }
    #l2-global-result {
        order: 5; 
    }
}

/* Yatay mod uyarısı */
@media (max-height: 600px) and (orientation: landscape) {
    #game-container, #start-screen, #results-screen {
        display: none;
    }
    #orientation-warning {
        display: flex !important; /* hidden'ı ezmek için */
    }
}
/* YENİ: Geri Tuşu Stili */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5em; 
    color: #000000; 
    background-color: var(--background-color); /* Panel rengiyle aynı */
    border-radius: 50%; 
    width: 44px;  
    height: 44px; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light), var(--shadow-dark); /* 3D Efekti */
    cursor: pointer;
    z-index: 10;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    line-height: 1; 
}
.back-button:hover {
    box-shadow: -8px -8px 16px rgba(255, 255, 255, 1), 8px 8px 16px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}
.back-button:active {
    box-shadow: var(--shadow-inset); /* Bastırma efekti */
    transform: translateY(1px);
}

/* Geri tuşları için konteynerleri ayarla */
#level2-container,
.overlay-content {
    position: relative;
}

/* Geri tuşuyla içerik çakışmasın diye boşluk ekle */
#l2-root-area,
#start-screen h1,
#results-screen h2 {
    margin-top: 30px; 
}

/* Mobil cihazlar için geri tuşu ayarı */
@media (max-width: 600px) {
    .back-button {
        top: 10px;
        left: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.3em;
    }
    #l2-root-area,
    #start-screen h1,
    #results-screen h2 {
        margin-top: 25px; /* Mobilde boşluk azaltıldı */
    }
}
/* YENİ EKLENDİ: Masaüstü 16:9 Oran Kuralı */
@media (min-width: 601px) and (orientation: landscape) {

/* 1. İçeriği yeni 16:9 kutuya sığdırmak için temel yazı tipi boyutunu
     ekran yüksekliğine (viewport-height) göre ayarla.
     (5vh = ekran yüksekliğinin %5'i)
     Bu, içerdeki tüm 'em' birimlerinin orantılı olarak ölçeklenmesini sağlar.
*/
:root {
    --base-font-size: 5vh;
}

/* 2. Ana oyun konteynerini 16:9 oranına zorla */
#game-container {
    /* Mevcut 90% genişlik ayarını geçersiz kıl */
    width: auto; 
    
    /* En-boy oranını 16:9 olarak ayarla */
    aspect-ratio: 16 / 9;
    
    /* Konteynerin yüksekliğini ekran yüksekliğinin %95'i yap.
       'aspect-ratio' sayesinde genişlik otomatik olarak (95vh * 16 / 9) 
       hesaplanacaktır.
    */
    height: 95vh;
    
    /* Ekranın 16:9'dan daha dar (örn: 4:3) olması durumunda
       konteynerin ekran dışına taşmasını engelle.
       Bu, konteyner genişliğini ekran genişliğinin %95'i ile sınırlar.
       Tarayıcı, bu iki kuraldan (height ve max-width) hangisi daha
       kısıtlayıcı ise onu uygular ve 16:9 oranını korur.
    */
    max-width: 95vw;
    
    /* Konteyneri dikey ve yatayda ortala */
    margin: auto;
}

/* 3. İçerideki oyun panelinin yeni 16:9 kutuyu doldurmasını sağla */
#level2-container {
    /* Ana konteynerin %100'ü kadar yüksek ol */
    height: 100%;
    
    /* Oyun öğelerinin (kartlar, kelimeler) 16:9 geniş ekranda
       çok fazla yayılmasını engellemek için maksimum genişlik ekleyelim.
       Bu, oyunun daha derli toplu görünmesini sağlar.
    */
    max-width: 1400px; /* 16:9 ekranlar için makul bir sınır */
    margin-left: auto;
    margin-right: auto;
}