
/* Tarayıcı varsayılan kalınlaştırma özelliklerini iptal eden genel sıfırlama (Kullanıcı Talebi) */
h1, h2, h3, h4, h5, h6, b, strong, th {
    font-weight: normal !important;
}

/* Arapça fontların (ör. Arakom) tarayıcı tarafından sahte olarak kalınlaştırılmasını (synthesize) engeller */
* {
    font-synthesis: none !important;
}

@font-face {
    font-family: 'Arakom';
    src: url('./arakom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --matrix-green: #000000; 
    --header-bg-gray: #FF3B30; 
    --matrix-border: #000000;
    --apple-gray: #f5f5f7;
    --apple-dark: #1d1d1f;
}

body {
    font-family: 'Arakom', sans-serif; 
    font-family: 'Arakom', sans-serif;
    background-color: #ffffff; 
    color: #000000; 
    margin: 0; 
    padding: 20px;
    overflow-x: hidden; 
    user-select: none;
}

body:has(.glass-box.matrix-opened) .back-link {
    background: #fff !important;
    color: #000 !important;
    cursor: default;
    pointer-events: none; 
}

.top-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 25;
}

/* Tüm üst butonların yüksekliği 54px'ten 46px'e çekildi */
#root-display-box,
.switch-btn,
.zoom-toggle-area,
.back-link {
    height: 46px !important;
    min-height: 46px !important;
}

#root-display-box {
    width: 380px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 10px; 
    border: 2px solid #e2e8f0;
    background-color: #f1f5f9;
    border-radius: 12px;
    box-sizing: border-box;
}

#root-display-box:hover {
    border-color: #cbd5e1;
}

.segmented-switch {
    flex: 1;
    display: flex;
    gap: 4px;
    background: #f1f5f9; 
    border: 2px solid #e2e8f0; 
    padding: 4px; 
    border-radius: 12px; 
    margin: 0 auto;
    position: relative;
    align-items: center;
    box-sizing: border-box;
    height: 46px;
}

.switch-btn {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: #000000;
    cursor: pointer;
    z-index: 1000;
    font-size: 16px;
    transition: none;
    font-family: 'Arakom', sans-serif !important;
    font-weight: normal !important;
    z-index: 2;
    text-align: center;
}

.switch-btn span {
    color: inherit !important; 
    transition: none;
}

.switch-btn span:last-child {
    font-size: 1.1rem;
}

.switch-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px; 
    width: calc(50% - 3px);
    background: #FF3B30;
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
    transform: translateX(100%);
}

.segmented-switch.mucerred-active .switch-slider { transform: translateX(100%); }
.segmented-switch.mezid-active .switch-slider { transform: translateX(0%); }
.segmented-switch.mucerred-active .switch-btn.mucerred-btn { color: #ffffff; }
.segmented-switch.mucerred-active .switch-btn.mezid-btn { color: #000000; }
.segmented-switch.mezid-active .switch-btn.mucerred-btn { color: #000000; }
.segmented-switch.mezid-active .switch-btn.mezid-btn { color: #ffffff; }

.zoom-toggle-area {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9; 
    border: 2px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 0 12px;
    box-sizing: border-box;
    transition: transform, background-color, color, opacity, box-shadow 0.2s ease;
}

.zoom-toggle-area:hover {
    border-color: #cbd5e1;
}

.zoom-toggle-label {
    font-family: 'Arakom', sans-serif !important;
    font-weight: normal !important;
    font-size: 14px;
    color: #000000;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px !important;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    z-index: 1000;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; 
    transition: .3s;
    border-radius: 24px;
    border: none;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    border: none; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); 
}

input:checked + .toggle-slider {
   background-color: #34C759;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.back-btn-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px; 
    height: 46px;
    background-color: #f1f5f9; 
    border: 2px solid #e2e8f0; 
    border-radius: 12px; 
    color: #000000;
    text-decoration: none;
    transition: transform, background-color, color, opacity, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.back-link:hover {
    background: #e2e8f0; 
    border-color: #cbd5e1;
    color: #FF3B30; 
}

.window-pencere {
    width: 100%;
    overflow: hidden; 
    touch-action: pan-y;
}

.slider-bandi {
    display: flex;
    width: 200%; 
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.tab-content { 
    width: 50%; 
    flex-shrink: 0;
    box-sizing: border-box;
}

.container { 
    max-width: 100%; 
    margin: auto; 
    background: #ffffff; 
    border: 2px solid #000;
    position: relative; 
    border-radius: 8px; 
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

th {
    color: #FFFFFF !important;
    padding: 6px 5px;
    border: 2px solid #ffffff !important;
    text-align: center;
    font-weight: normal;
    font-size: 15px;
}

.baslik-fiil { background: linear-gradient(135deg, #22c55e, #16a34a) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.15); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }
.baslik-isim { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.15); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }

th.baslik-notr { background-color: transparent !important; color: #FF3B30 !important; width: 245px !important; }

table { 
    width: 100%; 
    border-collapse: collapse; 
    color: #000; 
    table-layout: fixed; 
    margin: 0;
}

/* Bağımsız Başlık Genişlikleri */
#tab1 th:nth-child(1) { width: 10% !important; min-width: 80px !important; }
#table-view th:nth-child(1) { width: 280px !important; min-width: 280px !important; max-width: 280px !important; }

/* Gramer Overlay RTL Arabic Text Helper */
.grammar-arabic-text {
    direction: rtl;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.6em;
    display: inline-block;
    padding: 0 5px;
    color: #1a252f;
}
#table-view th:nth-child(1) { width: 22% !important; min-width: 350px; } 
th:nth-child(2) { width: 11%; } 
th:nth-child(3) { width: 11%; } 
th:nth-child(4) { width: 11%; } 
th:nth-child(5) { width: 22%; } 
th:nth-child(6) { width: 11%; } 
th:nth-child(7) { width: 11%; } 
th:nth-child(8) { width: 11%; } 
th:nth-child(9) { width: 11%; } 

td {
    background-color: #e5e5ea; 
    border: 4px solid #ffffff !important; 
    text-align: center; 
    vertical-align: middle; 
    padding: 3px 2px;
}

td:first-child {
    color: #FF3B30 !important;
    font-weight: normal; 
}

.conjugation-table td:first-child {
    color: #000000 !important;
    font-weight: normal;
}

/* --- 3. KELİME KUTULARI (3D Buton Tasarımı) --- */
.glass-box {
    position: relative; 
    background-color: #f8f9fa !important; 
    border-top: 1px solid #d1d5db !important;    
    border-left: 1px solid #d1d5db !important;   
    border-right: 1px solid #d1d5db !important;  
    border-bottom: 4px solid #9ca3af !important; 
    border-radius: 8px; 
    margin: 2px;
    padding: 10px 2px 4px 2px; 
    text-align: center;
    transition: transform, background-color, color, opacity, box-shadow 0.1s ease; 
    display: inline-block;
    min-width: 100px;
    width: 125px;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03); 
}

.glass-box:hover:not(.matrix-opened) { 
    background-color: #ffffff !important; 
    border-bottom-color: #64748b !important; 
}

.glass-box:active:not(.matrix-opened) {
    border-top: 2px solid #d1d5db !important;
    border-bottom-width: 1px !important; 
    transform: translateY(2px); 
    box-shadow: none; 
}

.ar, .ar-small, #temp-root-display, #root-text-display, .key {
    font-family: 'Arakom' !important;
    letter-spacing: 0 !important; 
    text-rendering: optimizeLegibility;
    font-weight: normal !important; 
}

#root-text-display {
    font-size: 1.25rem; 
    color: #000000;
    text-align: center;
    cursor: pointer;
    z-index: 1000;
}

.ar { font-size: 40px; color: #000 !important; line-height: 1; }
.ar-small { font-size: 30px; color: #000 !important; line-height: 1; }
.ref { position: absolute; top: 2px; right: 4px; font-size: 14px; color: #FF3B30 !important; }

.mastar-grid { 
    display: grid; 
    grid-template-rows: repeat(8, auto); 
    grid-auto-flow: column;             
    gap: 4px; 
    padding: 2px;
    justify-items: center;
}

.mastar-grid .glass-box { width: 125px !important; }

.footer-container { 
    display: flex; 
    gap: 10px; 
    margin-top: 2px; 
    width: 100%;
    background: linear-gradient(135deg, #e5eef7 0%, #d2e0f0 30%, #f0d8e6 65%, #d2ebd9 100%) !important;
    border-radius: 14px;
    padding: 6px;
}

.footer-container .ar { font-size: 36px !important; }

.footer-block { 
    background: transparent !important; 
    border: 4px solid rgba(255, 255, 255, 0.5) !important; 
    padding: 8px 10px 12px 10px; 
    border-radius: 12px; 
    box-shadow: none; 
}

.block-title { 
    text-align: center; 
    font-size: 14px;  
    margin-top: -8px; 
    margin-bottom: 8px; 
    margin-left: -10px;
    margin-right: -10px;
    padding: 4px;
    background-color: #2B88D9 !important; 
    color: #FFFFFF !important;
    border-bottom: 4px solid rgba(255, 255, 255, 0.5) !important; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px;
}

.mastar-grid, .cemi-grid { gap: 2px; }
.cemi-area .block-title { background-color: #2B88D9 !important; }

.cemi-area { flex: 8; background: transparent !important; } 
.tafdil-area { flex: 2; background: transparent !important; } 
.tasgir-area { flex: 1; background: transparent !important; }

.cemi-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 1px; 
    justify-items: center;
}

.full-screen-mode th, .full-screen-mode td { padding: 20px !important; }
.cemi-grid .glass-box, .tafdil-area .glass-box, .tasgir-area .glass-box { width: 95%; padding-top: 10px !important; padding-bottom: 4px !important; margin-top: 2px !important; margin-bottom: 2px !important; }
.cemi-grid .glass-box .ar, .tafdil-area .glass-box .ar, .tasgir-area .glass-box .ar { line-height: 1 !important; margin-bottom: -2px !important; }

.keyboard-overlay, .conjugation-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2) !important; 
    z-index: 9999999 !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* backdrop-filter removed for performance */
    -webkit-/* backdrop-filter removed for performance */
}

.keyboard-container, .conjugation-container {
    position: relative;
    padding: 25px; 
    background: #ffffff !important;
    border: 2px solid #000;
    border-radius: 16px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.conjugation-container {
    padding: 15px 20px; 
    border-radius: 12px;
    width: 100% !important;
    min-width: 350px !important;
    max-width: 95vw !important;
    height: 95vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#conjugation-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#conjugation-content table {
    height: 100%;
}


.keyboard-container {
    padding: 0px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none;
    box-shadow: none;
    height: 100vh !important;
    max-width: 100% !important;
    width: 100% !important;
    justify-content: space-between;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    direction: ltr;
}

.key {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--key-bg, #ffffff) !important;
    color: #000000;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    border-radius: 10px; 
    cursor: pointer;
    z-index: 1000;
    font-size: 1.6rem;
    user-select: none;
}

.key:hover { filter: brightness(0.9); }

#temp-root-display {
    font-size: 3rem;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    width: 500px;
    margin: 0 auto 20px auto;
    background: rgba(0, 0, 0, 0.7); 
    border-radius: 14px;
    direction: rtl;
}

.root-icon {
    cursor: pointer;
    z-index: 1000;
    font-size: 1.2rem;
    padding: 8px;
    transition: 0.3s;
    color: #000;
}

.root-icon:hover {
    color: #FF3B30; 
    transform: scale(1.1);
}

.conjugation-inline-container {
    display: flex;
    position: absolute; 
    background: #ffffff !important;
    border: 3px solid #000000;
    border-radius: 16px;       
    padding: 20px;             
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 999999 !important; 
    width: 600px !important; 
    max-width: 95vw !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.15s ease;
}

.glass-box.matrix-opened .conjugation-inline-container {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.conjugation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    direction: rtl;
    table-layout: fixed;
}

.glass-box.no-transition { transition: none !important; }

.conjugation-table th {
    background-color: #FF3B30 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000;
    padding: 8px;
    font-size: 16px;
    font-family: 'Arakom' !important;
    font-weight: normal !important;
}

.conjugation-table td {
    border: 2px solid #000000;
    padding: 4px 2px;
    text-align: center;
    background: #ffffff;
    width: 33.33%;
}

.siga-text {
    font-size: 28px;
    color: #000000;
    display: block;
    font-family: 'Arakom' !important;
    font-weight: normal !important;
    line-height: 1.2;
    white-space: nowrap;
}

.kok { color: #000000 !important; }
.ek { color: #FF3B30 !important; }

.matrix-close-btn {
    position: absolute;
    top: 4px;
    right: 12px;
    color: #FF3B30;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    font-weight: normal;
    z-index: 1000001; 
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.matrix-close-btn:hover { transform: scale(1.2); }

#tab2 .ar { font-size: 2.2rem !important; }
#tab2 .conjugation-table { margin-top: 6px; }
#tab2 .glass-box { width: 92%; padding: 10px 2px 4px 2px; }
#tab2 .glass-box .ar { font-size: 38px; line-height: 1; }

/* Sülasi (Mücerred) Tablosu - GENEL YEKPARE MAT PASTEL GRADYAN (Parlak beyaz içermez, ana renklere benzemez) */
#tab1 tbody {
    background: linear-gradient(135deg, #e6e2db 0%, #dce2dd 33%, #e1dfe6 66%, #eaddd7 100%) !important;
}

/* Mücerred tablosundaki tüm hücre (td) arkaplanlarını şeffaf yaparak genel gradyanı görünür kılıyoruz */
#tab1 tbody td {
    background: transparent !important;
}

/* Mezid Bab Satırları (Canlı ama Göz Yormayan Daha Açık ve Uçuk Pasteller) */
#tab2 tbody tr:nth-child(1) td { background-color: #fcf0f0 !important; } /* İf'al: Uçuk Tatlı Kırmızı */
#tab2 tbody tr:nth-child(2) td { background-color: #fbf5ee !important; } /* Tef'il: Uçuk Tatlı Turuncu */
#tab2 tbody tr:nth-child(3) td { background-color: #f7f4e4 !important; } /* Müfa'ale: Uçuk Tatlı Sarı */
/* 4. satır ayırıcı çizgidir */
#tab2 tbody tr:nth-child(5) td { background-color: #e8f5ec !important; } /* İnfi'al: Uçuk Tatlı Yeşil */
#tab2 tbody tr:nth-child(6) td { background-color: #e0f2ef !important; } /* İfti'al: Uçuk Tatlı Camgöbeği */
#tab2 tbody tr:nth-child(7) td { background-color: #e5eef7 !important; } /* İf'ilal: Uçuk Tatlı Mavi */
/* 8. satır ayırıcı çizgidir */
#tab2 tbody tr:nth-child(9) td { background-color: #ebedf7 !important; } /* Tefe'ul: Uçuk Tatlı İndigo */
#tab2 tbody tr:nth-child(10) td { background-color: #f3ebf7 !important; } /* Tefa'ul: Uçuk Tatlı Mor */
#tab2 tbody tr:nth-child(11) td { background-color: #f7ebf2 !important; } /* İstif'al: Uçuk Tatlı Pembe */

/* Büyüyen Kutu Efektleri ve Çakışma Önleyiciler */
.zoom-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.4) !important; 
    /* backdrop-filter removed for performance */
    -webkit-/* backdrop-filter removed for performance */
    z-index: 9990 !important; 
    display: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
}

.zoom-overlay.active { display: block; }

.pulse-highlight {
    transform: translate3d(var(--move-x), var(--move-y), 0) scale(4) rotate(0.001deg) !important;
    z-index: 99999 !important; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3) !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease !important;
    transform-origin: center center;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    -webkit-transform-style: preserve-3d !important;
    transform-style: preserve-3d !important;
    will-change: transform;
}

.glass-box.pulse-settled {
    transition: none !important; 
    animation: none !important;
    transform: translate(var(--move-x), var(--move-y)) scale(4) !important;
    will-change: auto !important; 
}

.glass-box.pulse-highlight * { animation: none !important; }
.glass-box.pulse-highlight { animation: none !important; }

.glass-box.pulse-highlight .ref {
    transform: scale(0.95) !important; 
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.9) !important; 
    background-color: #FF3B30 !important; 
    color: #ffffff !important; 
}

.current-active-red {
    border-color: #FF3B30 !important; 
    background-color: #fffaf9 !important; 
    box-shadow: inset 0 3px 8px rgba(255, 59, 48, 0.15), 0 1px 2px rgba(255, 59, 48, 0.1) !important; 
    z-index: 100;
}

/* Kök türetilmiş kutuların varsayılan yeşil arka planı (Kırmızı aktif değilse) */
.glass-box.kok-turendi:not(.current-active-red) {
    background-color: #bfffdf !important;
}

/* Kutu BÜYÜTÜLMEDİĞİ SÜRECE aşağı basık durur (Büyüyen Klonları Hariç Tutar!) */
.glass-box.current-active-red:not(.pulse-highlight):not(.crisp-zoom-clone) {
    transform: translateY(2px) !important; 
}

/* Fareyle üzerine gelindiğinde zıplamasını engeller (Büyüyen Klonları Hariç Tutar!) */
.glass-box.current-active-red:not(.pulse-highlight):not(.crisp-zoom-clone):hover {
    transform: translateY(2px) !important; 
    background-color: #fff0ed !important; 
    box-shadow: inset 0 4px 12px rgba(255, 59, 48, 0.25), 0 1px 2px rgba(255, 59, 48, 0.1) !important; 
    border-color: #e6352b !important; 
}

.glass-box.current-active-red.pulse-highlight:hover {
    background-color: #fff0ed !important; 
    border-color: #FF3B30 !important; 
    box-shadow: 0 15px 40px rgba(255, 59, 48, 0.25) !important; 
}


/* CÜMLE BUTONU (!) - Kırmızı Dolgulu Küçük Tasarım */
.easter-egg-trigger {
    position: absolute;
    top: -8px;   
    left: -8px; 
    width: 20px;  
    height: 20px;
    background: #FF3B30; 
    color: #ffffff;      
    border: 1.5px solid #ffffff; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    z-index: 100;
    font-size: 13px;
    font-family: 'Arakom', sans-serif;
    font-weight: normal;
    animation: elegantRedGlow 2s infinite alternate;
    transition: transform 0.2s ease;
}

.easter-egg-trigger:hover { transform: scale(1.15); }

@keyframes elegantRedGlow {
    0% { box-shadow: 0 1px 3px rgba(255, 59, 48, 0.3); }
    100% { box-shadow: 0 0 8px rgba(255, 59, 48, 0.7); }
}

.easter-egg-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999 !important;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUpModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.easter-egg-content {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Mobilde taşmayı önleyen kritik özellik */
    box-sizing: border-box;
    /* Çarpı butonu metinle üst üste binmesin diye üstten 60px padding */
    padding: 60px 20px 30px 20px; 
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    text-align: center;
    
    width: 96vw !important; 
    max-width: 1800px !important;
    max-height: 85vh !important; 
    overflow-y: auto !important; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.2) inset;
    animation: scaleUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll (Kaydırma Çubuğu) Tasarımı */
.easter-egg-content::-webkit-scrollbar {
    width: 8px;
}
.easter-egg-content::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 20px;
    margin-bottom: 20px;
}
.easter-egg-content::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.5);
    border-radius: 20px;
}
.easter-egg-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.8);
}

/* Kapatma Butonu Tasarımı */
.easter-egg-close-btn {
    position: absolute;
    top: 25px; 
    right: 25px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    font-weight: normal;
    font-family: 'Arakom', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.easter-egg-close-btn:hover { 
    transform: scale(1.1) rotate(90deg); 
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.easter-egg-ar {
    font-size: 110px; 
    direction: rtl; 
    color: #0f172a;
    margin-bottom: 20px; 
    line-height: 1.2;
    font-family: 'Arakom', sans-serif !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.easter-egg-tr {
    font-size: 60px; 
    direction: ltr; 
    color: #dc2626;
    line-height: 1.3;
    font-family: 'Arakom', sans-serif !important;
    font-weight: normal;
}

.sentence-emoji-header {
    width: 100%; display: flex; justify-content: center; align-items: center;
    padding: 10px 0; margin-bottom: 10px;
}

.sentence-emoji-badge {
    font-size: 40px; background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px; border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 1px solid rgba(255, 255, 255, 0.5);
    /* backdrop-filter removed for performance */
}

/* TAM EKRAN MODU */
.matrix-fullscreen-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #ffffff !important; z-index: 9999999 !important; overflow: hidden; 
    padding: 0; box-sizing: border-box; direction: rtl; align-items: center; justify-content: center;
}

.matrix-fullscreen-content {
    width: 100%; height: 100%; max-width: 100%;
    position: relative; display: flex; flex-direction: column; justify-content: center;
}

.matrix-fullscreen-close {
    position: fixed; top: 25px; left: 25px; width: 50px; height: 50px;
    background: #ffffff; border: 3px solid #000000; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 28px; color: #000000; 
    cursor: pointer;
    z-index: 1000; z-index: 99999999; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-family: 'Arakom', sans-serif; transition: transform 0.1s ease;
}
.matrix-fullscreen-close:active { transform: scale(0.9); }

.matrix-fullscreen-table {
    width: 100%; height: 95%; border-collapse: collapse; margin: auto 0; table-layout: fixed; 
}
.matrix-fullscreen-table th {
    background-color: #FF3B30 !important; color: #FFFFFF !important; border: 3px solid #000000;
    padding: 1vh 1vw; font-size: clamp(20px, 3.5vh, 30px); font-family: 'Arakom', sans-serif !important;
    font-weight: normal !important; text-align: center; height: 6vh; 
}
.matrix-fullscreen-table td {
    border: 3px solid #000000; padding: 1vh 1vw; text-align: center; background: #ffffff; vertical-align: middle;
}
.matrix-fullscreen-text {
    font-size: clamp(24px, 10vh, 100px); color: #000000; display: block;
    font-family: 'Arakom', sans-serif !important; font-weight: normal !important; line-height: 1.1;
    white-space: nowrap;
}
.matrix-expand-btn {
    position: absolute; top: 4px; left: 12px; color: #2B88D9; font-size: 18px; cursor: pointer;
    z-index: 1000;
    z-index: 1000001; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.matrix-expand-btn:hover { transform: scale(1.2); }

@keyframes glowingPlus {
    0% { transform: scale(1); color: #000; text-shadow: none; }
    50% { transform: scale(1.6); color: #FF3B30; text-shadow: 0 0 15px rgba(255, 59, 48, 0.8); }
    100% { transform: scale(1); color: #000; text-shadow: none; }
}

.plus-highlighted { animation: glowingPlus 1.2s infinite !important; color: #FF3B30 !important; }

/* Uzun Basma (Long Press) Tuş Varyasyon Menüsü */
.key-variations-menu {
    position: absolute; background: #ffffff; border: 2px solid #000; border-radius: 12px;
    padding: 6px; gap: 6px; box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 99999999 !important; display: flex; flex-direction: row-reverse; 
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.var-key {
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    background: #f5f5f7; color: #000; border: 1px solid #ccc; border-radius: 8px; cursor: pointer;
    z-index: 1000;
    font-size: 1.6rem; font-family: 'Arakom', sans-serif !important; user-select: none; transition: background 0.2s;
}
.var-key:hover { background: #d1d1d6; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3 BOYUTLU AHŞAP KÖK TAŞI (YATAYDA UZATILMIŞ) */
.draggable-root-clone {
    position: absolute; z-index: 2000; font-family: 'Arakom', sans-serif;
    font-weight: normal !important; font-size: 2.6rem; color: #000000; direction: rtl;
    pointer-events: auto; cursor: grab; user-select: none; white-space: nowrap;
    background-color: #e4be97; 
    background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03) 0px, rgba(0, 0, 0, 0.03) 2px, transparent 2px, transparent 6px); 
    
    /* İŞTE BURASI: Sağ ve sol boşluklar (45px) artırılarak kutu yatayda uzatıldı */
    padding: 8px 15px 15px 0px !important; 
    min-width: 180px; /* Kutuya standart bir yatay uzunluk verir */
    text-align: center; /* Kutu uzasa da Arapça kök tam ortada kalır */
    
    line-height: 1.2 !important;
    border-radius: 10px; border: 2px solid #5c3a21; 
    box-shadow: 5px 5px 0px #5c3a21, 0px 10px 20px rgba(0,0,0,0.3); text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4); 
}
.draggable-root-clone:active { cursor: grabbing; }

body:has(#zoomToggleCheckbox:checked) .draggable-root-clone:not(#crisp-root-clone) {
    opacity: 0 !important; pointer-events: none !important; transition: opacity 0.2s ease !important;
}

.sari-vurgu {
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.8), inset 0 0 10px rgba(255, 204, 0, 0.3) !important;
    background-color: #fffde7 !important; transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}

/* FİİL NUMARALARINI BUTONA ÇEVİRME (Tekrarlar temizlendi) */
.glass-box.fiil-box.kok-turendi .ref,
.glass-box.coklu-kullanim.kok-turendi .ref {
    background-color: #FF3B30 !important; color: #ffffff !important; border-radius: 5px; 
    padding: 0px 5px; transform: scale(0.95); -webkit-text-stroke: 0 !important; 
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.7); cursor: pointer;
    z-index: 1000; z-index: 105; 
    pointer-events: auto; animation: refPulse 1.5s infinite;
}

.glass-box.fiil-box.kok-turendi .ref:hover,
.glass-box.coklu-kullanim.kok-turendi .ref:hover {
    background-color: #d62828 !important; transform: scale(1.1); 
}

@keyframes refPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 4px rgba(255, 59, 48, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* YENİ KÖK SEÇME EKRANI (TAM EKRAN + POPUP KLAVYE) */
.verb-overlay {
    background-color: #eef2f5 !important;
    width: 100vw !important; height: 100vh !important;
    position: fixed; top: 0; left: 0; z-index: 99999999;
    display: none; /* js ile açılır */
    margin: 0; padding: 0;
}

.new-verb-layout {
    display: flex; flex-direction: column; width: 100%; height: 100%;
    padding: 15px 3vw; box-sizing: border-box; overflow: hidden;
}

.root-header {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px; width: 90%; 
    margin-left: auto; margin-right: auto; flex-shrink: 0; justify-content: center; direction: ltr;
}

#root-search {
    flex: 1; height: 55px; font-size: 24px; font-family: 'Arakom', sans-serif;
    padding: 0 20px; background: #ffffff; color: #2c3e50; border: 2px solid #FF3B30 !important; 
    border-radius: 15px; outline: none; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05), 0 0 10px rgba(255, 59, 48, 0.1); 
    text-align: left !important; direction: ltr !important; cursor: text; transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}

#root-search:focus {
    border-color: #d62828 !important; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05), 0 0 15px rgba(255, 59, 48, 0.3);
}

.verb-close-btn {
    background: #ffffff; border: 2px solid #cbd5e1; border-radius: 50%;
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #64748b; cursor: pointer;
    z-index: 1000; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: 0.2s; flex-shrink: 0; 
}
.verb-close-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; transform: scale(1.05); }

/* TAHMİN (ÖNERİ) ÇUBUĞU */
.root-predictions {
    display: flex; gap: 10px; padding: 5px 0 15px 0; flex-shrink: 0;
    justify-content: center; flex-wrap: wrap; 
}
.prediction-chip {
    background: #f0fdf4; color: #166534; padding: 8px 20px; border-radius: 20px;
    font-family: 'Arakom', sans-serif; font-size: 22px; cursor: pointer;
    z-index: 1000; white-space: nowrap;
    border: 2px solid #34C759 !important; box-shadow: 0 4px 10px rgba(52, 199, 89, 0.15); 
    font-weight: normal; transition: 0.2s;
}
.prediction-chip:hover { transform: scale(1.05); background: #dcfce7; box-shadow: 0 6px 15px rgba(52, 199, 89, 0.3); }

/* ========================================================= */
/* KLAVYE AÇILDIĞINDA ÖNEMLİ KÖKLERİ GİZLEME (YENİ EK)       */
/* ========================================================= */
body:has(.integrated-keyboard-popup.active) #important-roots-list,
body:has(.integrated-keyboard-popup.active) .important-roots-wrapper {
    display: none !important;
}


/* ÖNEMLİ KÖKLER LİSTESİ (Ortalanmış ve Yeşil) */
#important-roots-list {
    display: flex; flex-wrap: wrap; justify-content: center !important; gap: 12px; padding: 10px 0 25px 0;
}
.important-roots-wrapper .section-title { text-align: center !important; width: 100%; margin-bottom: 15px; }

#important-roots-list .flat-root-item {
    background-color: #f0fdf4 !important; color: #166534 !important;
    border-top: 1px solid #86efac !important; border-left: 1px solid #86efac !important;
    border-right: 1px solid #86efac !important; border-bottom: 4px solid #22c55e !important; 
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.15); font-weight: normal; border-radius: 10px;
}
#important-roots-list .flat-root-item:hover { background-color: #dcfce7 !important; border-bottom-color: #16a34a !important; transform: translateY(-2px); }
#important-roots-list .flat-root-item:active { border-top: 2px solid #86efac !important; border-bottom-width: 1px !important; transform: translateY(2px); box-shadow: none; }

.section-title.left-aligned {
    text-align: left; margin: 0 0 10px 0; font-size: 18px; color: #64748b;
    border-bottom: 2px solid rgba(200, 210, 224, 0.5); padding-bottom: 5px;
}

.flat-root-list { display: flex; flex-wrap: wrap; gap: 10px; }
.flat-root-item {
    display: flex; flex-direction: row-reverse; align-items: center; justify-content: center;
    gap: 8px; background-color: #f8f9fa !important; color: #000; padding: 10px 18px; 
    font-family: 'Arakom', sans-serif; font-size: 22px; cursor: pointer;
    z-index: 1000; border-radius: 8px; 
    border-top: 1px solid #d1d5db !important; border-left: 1px solid #d1d5db !important;
    border-right: 1px solid #d1d5db !important; border-bottom: 3px solid #9ca3af !important; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.03); transition: transform, background-color, color, opacity, box-shadow 0.1s ease;
}
.flat-root-item:hover { background-color: #ffffff !important; border-bottom-color: #64748b !important; }
.flat-root-item:active { border-bottom-width: 1px !important; transform: translateY(2px); }

.letters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; height: 100%; }
.letter-column {
    display: flex; flex-direction: column; gap: 10px; overflow-y: auto;
    padding-right: 5px; background: #e5e5ea !important; border: 4px solid #ffffff !important; 
    border-radius: 12px; padding-bottom: 20px;
}
.letter-column::-webkit-scrollbar { width: 5px; }
.letter-column::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }

.col-range-header {
    text-align: center; font-weight: normal; background: #2B88D9 !important; color: #ffffff !important;
    border-bottom: 4px solid #ffffff !important; padding: 10px; position: sticky; top: 0; z-index: 1010; 
    font-size: 18px; font-family: 'Arakom', sans-serif; border-radius: 8px 8px 0 0;
    margin-top: -4px; margin-left: -4px; margin-right: -4px;
}
.letter-group-title { font-size: 26px; font-family: 'Arakom', sans-serif; color: #f28b82; text-align: center; border-bottom: 1px dashed rgba(242, 139, 130, 0.4); margin: 10px 15px 5px; }

/* Küçük Yüzen (Popup) Butonlar */
.floating-mini-btns { position: absolute; bottom: 30px; right: 3vw; display: flex; flex-direction: column; gap: 15px; z-index: 100; }
.mini-popup-btn {
    color: #2c3e50; border: 1px solid rgba(255,255,255,0.8); padding: 12px 25px; border-radius: 30px;
    font-family: 'Arakom', sans-serif; font-size: 18px; box-shadow: 0 6px 15px rgba(0,0,0,0.06); cursor: pointer;
    z-index: 1000; transition: 0.3s; font-weight: normal;
}
.mini-popup-btn.btn-aksam { background: rgba(163, 191, 250, 0.9); }
.mini-popup-btn.btn-mezid { background: rgba(252, 165, 165, 0.9); }

/* POPUP KLAVYE TASARIMI */
.integrated-keyboard-popup {
    position: fixed; bottom: -100%; left: 0; width: 100vw;
    background: rgba(255,255,255,0.85); /* backdrop-filter removed for performance */ -webkit-/* backdrop-filter removed for performance */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1); transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10000; border-top-left-radius: 25px; border-top-right-radius: 25px; padding-bottom: 25px; border-top: 1px solid #ffffff;
}
.integrated-keyboard-popup.active { bottom: 0; }

.keyboard-popup-dragbar { width: 100%; height: 35px; display: flex; align-items: center; justify-content: center; cursor: pointer;
    z-index: 1000; }
.keyboard-popup-dragbar div { width: 50px; height: 6px; background: #cbd5e1; border-radius: 10px; pointer-events: none;}

.integrated-keyboard-inner { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 0px 20px; }
.search-kb-row { display: flex; justify-content: center; gap: 10px; direction: ltr; }
.search-key {
    width: 55px; height: 55px; display: flex; align-items: center; justify-content: center;
    background: #1d1d1f; color: #ffffff; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    cursor: pointer;
    z-index: 1000; font-size: 26px; font-family: 'Arakom', sans-serif; user-select: none; transition: 0.1s;
}
.search-key:active { background: #323236; transform: scale(0.95); }
.search-key.backspace { background: #600; min-width: 80px; }

/* Slide Menü */
.slide-up-menu {
    position: fixed; bottom: -100%; left: 0; width: 100vw; height: 65vh; 
    background: rgba(248, 250, 252, 0.95); /* backdrop-filter removed for performance */ border-top: 1px solid rgba(255,255,255,0.9);
    border-top-left-radius: 30px; border-top-right-radius: 30px; box-shadow: 0 -10px 40px rgba(0,0,0,0.05);
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1); display: flex; flex-direction: column; padding: 20px 3vw; box-sizing: border-box; z-index: 105;
}
.slide-up-menu.active { bottom: 0; }
.slide-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid rgba(200, 210, 224, 0.5); padding-bottom: 15px; }
.slide-header h3 { margin: 0; font-size: 24px; color: #334155; }
.slide-close { background: #f1f5f9; border: none; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    z-index: 1000; color: #ef4444; font-weight: normal;}
.slide-content { overflow-y: auto; flex: 1; align-content: flex-start;}

/* --- KLAVYE İÇİN GÖRÜNMEZ TIKLAMA KALKANI (İPTAL EDİLDİ) --- */
.keyboard-backdrop { 
    display: none !important; 
    pointer-events: none !important; 
}
.keyboard-backdrop.active { 
    display: none !important; 
    pointer-events: none !important; 
}

.slide-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: transparent; z-index: 104; }
.slide-backdrop.active { display: block; }


/* ========================================================= */
/* YÜKSEK ÇÖZÜNÜRLÜKLÜ KLON (ZOOM BULANIKLIK ÇÖZÜMÜ)         */
/* ========================================================= */
.crisp-zoom-clone {
    position: fixed !important; 
    top: 35% !important; 
    left: 50% !important; 
    /* DİKKAT: !important takısı kaldırıldı ki büyüme/açılma animasyonu çalışabilsin */
    transform: translate(-50%, -50%); 
    margin: 0 !important;
    z-index: 999999 !important;
    width: auto !important;
    min-width: 400px !important;
    min-height: 120px !important;
    padding: 35px 55px !important;
    background-color: #fffaf9 !important; 
    border: 4px solid #FF3B30 !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(255, 59, 48, 0.3) !important;
    animation: crispPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    will-change: auto !important; 
    cursor: default !important;
}

/* KAHVERENGİ KÖK TAŞI KLONU */
.crisp-root-clone {
    position: fixed !important; 
    top: 75% !important; 
    left: 50% !important; 
    /* DİKKAT: !important takısı kaldırıldı ki büyüme/açılma animasyonu çalışabilsin */
    transform: translate(-50%, -50%); 
    margin: 0 !important;
    z-index: 999999 !important;
    background-color: #e4be97 !important; 
    background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03) 0px, rgba(0, 0, 0, 0.03) 2px, transparent 2px, transparent 6px) !important;
    border: 3px solid #5c3a21 !important; 
    border-radius: 18px !important; 
    padding: 15px 40px !important;
    box-shadow: 6px 6px 0px #5c3a21, 0 20px 50px rgba(0,0,0,0.4) !important;
    animation: crispPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important; 
    pointer-events: none !important;
}

#crisp-root-clone .root-clone-buttons {
    display: none !important;
}

.crisp-zoom-clone .ar, .crisp-zoom-clone .ar-small {
    font-size: 180px !important; line-height: 1.2 !important; white-space: nowrap !important;
}

.crisp-zoom-clone .ref {
    font-size: 26px !important; top: 15px !important; right: 15px !important; padding: 4px 12px !important;
    border-radius: 8px !important; background-color: #FF3B30 !important; color: #ffffff !important;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.6) !important; animation: none !important; 
}

.crisp-zoom-clone .easter-egg-trigger {
    width: 45px !important; height: 45px !important; font-size: 24px !important;
    top: -15px !important; left: -15px !important; cursor: pointer !important;
}


.crisp-root-clone .ar-root {
    font-family: 'Arakom', sans-serif !important; font-size: 130px !important; color: #000000 !important; 
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4) !important; line-height: 1.2 !important; white-space: nowrap !important;
    display: block !important; direction: rtl !important; padding-bottom: 0px !important; 
}

.crisp-root-clone.is-ghost {
    opacity: 0.4 !important;
    filter: grayscale(30%) !important;
    pointer-events: none !important;
}

@keyframes crispPopIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.glass-box.crisp-zoom-clone:hover {
    border-color: #FF3B30 !important; background-color: #fffaf9 !important; transform: translate(-50%, -50%) scale(1) !important; 
}
.glass-box.crisp-zoom-clone[style*="#bfffdf"]:hover { border-color: #000000 !important; background-color: #bfffdf !important; }

/* ARTI (+) MENÜSÜ */
#suffix-dropdown {
    transform: scale(1.1) !important; 
    transform-origin: top center !important; 
    z-index: 9999999 !important;
    width: max-content !important; /* YENİ EKLENEN: Sütunların sıkışmasını engeller */
}
#suffix-dropdown .key.suggested-suffix {
    background-color: #fbbf24 !important; color: #1e293b !important; border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); transform: scale(1.08); font-weight: normal; transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}

.plus-hint-badge {
    position: absolute; bottom: -10px; right: -10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(245, 158, 11, 0.5)); 
    color: rgba(255, 255, 255, 0.75); font-size: 14px; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2); animation: pulseHintBadge 1.5s infinite;
    z-index: 20; pointer-events: none; /* backdrop-filter removed for performance */ 
}

@keyframes pulseHintBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ==========================================================================
   GÜNCEL: AKILLI YÜZEREK UÇAN EMOJİ (HASSAS KONUM AYARLI)
   ========================================================================== */
.elegant-emoji {
    position: absolute; 
    width: 100%; 
    left: 0;
    top: 0; 
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 110px; 
    /* DEV KLONUN DA ÜSTÜNE ÇIKMASI İÇİN Z-INDEX EN ZİRVEYE ALINDI */
    z-index: 99999999 !important; 
    pointer-events: none; 
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.35)); 
    opacity: 0; 
}

/* 1. Aşağıdaki Kalıplar -> Yukarı Uçar */
.pop-up-right { animation: floatUpRight 2.5s ease-out forwards; }
.pop-up-left { animation: floatUpLeft 2.5s ease-out forwards; }

/* 2. Yukarıdaki Kalıplar -> Aşağı Uçar */
.pop-down-right { animation: floatDownRight 2.5s ease-out forwards; }
.pop-down-left { animation: floatDownLeft 2.5s ease-out forwards; }

/* 3. BÜYÜTÜLMÜŞ DEV KLON -> Sağdan fırlar! */
.pop-zoom-right { animation: floatZoomRight 2.5s ease-out forwards; }


/* ORTA VE ALT KALIPLAR (YUKARI UÇARLAR) */
@keyframes floatUpRight {
    0% { transform: translate(0, -120px) scale(0); opacity: 0; }
    20% { transform: translate(30px, -150px) scale(1.1); opacity: 1; }
    40% { transform: translate(50px, -170px) scale(1); opacity: 1; }
    100% { transform: translate(90px, -230px) scale(0.8); opacity: 0; }
}
@keyframes floatUpLeft {
    0% { transform: translate(0, -120px) scale(0); opacity: 0; }
    20% { transform: translate(-30px, -150px) scale(1.1); opacity: 1; }
    40% { transform: translate(-50px, -170px) scale(1); opacity: 1; }
    100% { transform: translate(-90px, -230px) scale(0.8); opacity: 0; }
}

/* ÜST KALIPLAR (AŞAĞI UÇARLAR) */
@keyframes floatDownRight {
    0% { transform: translate(0, 30px) scale(0); opacity: 0; }
    20% { transform: translate(30px, 70px) scale(1.1); opacity: 1; }
    40% { transform: translate(50px, 90px) scale(1); opacity: 1; }
    100% { transform: translate(90px, 140px) scale(0.8); opacity: 0; }
}
@keyframes floatDownLeft {
    0% { transform: translate(0, 30px) scale(0); opacity: 0; }
    20% { transform: translate(-30px, 70px) scale(1.1); opacity: 1; }
    40% { transform: translate(-50px, 90px) scale(1); opacity: 1; }
    100% { transform: translate(-90px, 140px) scale(0.8); opacity: 0; }
}

/* BÜYÜME (ZOOM) KLONU ÖZEL: DAHA SAĞDA, DAHA AŞAĞIDA VE ÇOK DAHA BÜYÜK
   - X Ekseni: +280px ile sağdan başlar
   - Y Ekseni: +60px yapılarak merkezin daha aşağısından başlatıldı
   - Boyut: scale() 1.7'ye çıkartılarak devasa boyuta getirildi! */
@keyframes floatZoomRight {
    0% { transform: translate(280px, 60px) scale(0); opacity: 0; }
    20% { transform: translate(320px, 40px) scale(1.7); opacity: 1; }
    40% { transform: translate(340px, 20px) scale(1.6); opacity: 1; }
    100% { transform: translate(420px, -20px) scale(1.2); opacity: 0; }
}

.ornek-box {
    margin-top: 20px; 
    padding: 25px; 
    background: #f0f8ff; 
    border-radius: 12px; 
    border-right: 6px solid #2B88D9; 
    text-align: center !important; 
    display: flex;
    flex-direction: column; 
    align-items: center; 
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Örnek kutusu içindeki Arapça yazının devasa boyutu */
.ornek-box .easter-egg-ar {
    font-size: 85px !important; 
    margin-bottom: 20px !important;
}

/* Örnek kutusu içindeki Türkçe yazının devasa boyutu */
.ornek-box .easter-egg-tr {
    font-size: 55px !important; 
}

body.matrix-active { overflow: hidden !important; }



/* HAZIR KÖK İKONU YÖNLENDİRME ANİMASYONU */
@keyframes bookWavePulse {
    0% { box-shadow: 0 0 0 0 rgba(43, 136, 217, 0.6); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(43, 136, 217, 0); transform: scale(1.15); }
    100% { box-shadow: 0 0 0 0 rgba(43, 136, 217, 0); transform: scale(1); }
}

.ready-root-hint {
    animation: bookWavePulse 1.5s infinite ease-out !important;
    color: #2B88D9 !important; 
    border-radius: 50% !important; 
    display: inline-block; 
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}

.siga-tr-text {
    display: block; font-family: 'Arakom', sans-serif !important; font-size: 16px; color: #555555; margin-top: 8px; font-weight: normal;
}

/* =============================================================== */
/* 3D PREMIUM BUTON TASARIMI (Mekanik Tuş Hissi) */
/* =============================================================== */
.suffix-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #f2f2f7 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 1000;
    transition: transform, background-color, color, opacity, box-shadow 0.1s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'Arakom', sans-serif;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    
    /* 3D KATMANLARI: İç Işık + Alt Kalınlık Zırhı + Yumuşak Zemin Gölgesi */
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.9),  /* Tuşun üst kenarındaki ışık yansıması */
        0 4px 0 #d1d1d6,                         /* 3D tuşun fiziksel alt kalınlığı */
        0 5px 8px rgba(0, 0, 0, 0.1);            /* Tuşun panele düşen dış gölgesi */
        
    transform: translateY(0);
}

.suffix-btn:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #e5e5ea 100%);
    /* Üzerine gelince gölge ve kalınlık çok hafif belirginleşir */
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 1), 
        0 4px 0 #c7c7cc, 
        0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.suffix-btn:active {
    background: #e5e5ea;
    /* Tuşa basıldığı an fiziksel kalınlık (4px) yok olur, tuş aşağı çöker */
    transform: translateY(4px); 
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.1),      /* İçeri göçme hissi veren iç gölge */
        0 0 0 #c7c7cc,                           /* Alt kalınlık sıfırlandı */
        0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ========================================================= */
/* ÖNERİLEN EKLER İÇİN ALTIN SARI VURGU (İPUCU SİSTEMİ)      */
/* ========================================================= */
.suffix-btn.suggested-suffix {
    background-color: #FFD700 !important; /* Altın Sarısı */
    border-color: #D4AF37 !important;
    color: #000 !important;
    font-weight: 900 !important;
    transform: scale(1.05) !important; /* Öğrenci görsün diye hafifçe büyütür */
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8) !important;
    animation: ipucuParla 1.5s infinite !important; /* Tatlı bir yanıp sönme efekti */
}

@keyframes ipucuParla {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
}

.suffix-menu-grid {
    display: grid; /* !important TAKISI KALDIRILDI */
    grid-template-columns: 1fr 1fr; 
    gap: 12px !important;            
    padding: 20px !important;       
    background: rgba(255, 255, 255, 0.98) !important;
    /* backdrop-filter removed for performance */
    border: 2px solid rgba(0, 0, 0, 0.1); 
    border-radius: 24px;            
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    width: 220px !important;        
    min-width: 220px !important;
    direction: rtl;
    z-index: 9999;                  
    position: absolute;
}

.menu-divider {
    grid-column: span 2; 
    height: 3px;                     /* Çizgiyi biraz kalınlaştırdık */
    background: #FF3B30 !important; 
    margin: 8px 0;                   /* Çizgi etrafındaki boşluğu artırdık */
    border-radius: 2px;
    opacity: 0.8;
}




.suffix-btn:active {
    background-color: #f3f4f6;
    transform: scale(0.92);         /* Basıldığında gözle görülür tepki */
}

/* =========================================================
   BAB BİLGİ (INFO) OVERLAY SİSTEMİ (EXTRA GENİŞ & KIRMIZI BUTON)
========================================================= */
.bab-info-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); /* Arka planı hafif daha koyulaştırdık ki kutu öne çıksın */
    /* backdrop-filter removed for performance */ 
    z-index: 999999; 
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bab-info-overlay.active {
    opacity: 1;
}

/* Kutunun Kendisi - ÇOK DAHA GENİŞ */
.bab-info-content {
    background: linear-gradient(145deg, #ffffff, #f8fafc); 
    padding: 50px 60px; /* İçeriden biraz daha boşluk verdik */
    border-radius: 32px; 
    width: 95%;
    max-width: 1100px; /* 800px'den 1100px'e çıkardık! Artık devasa. */
    max-height: 90vh; 
    display: flex;
    flex-direction: column; 
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5), 0 0 0 1px rgba(226,232,240,0.5); 
    position: relative;
    transform: translateY(20px) scale(0.95); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    direction: ltr; 
}

.bab-info-overlay.active .bab-info-content {
    transform: translateY(0) scale(1); 
}

/* Kapatma Butonu (Sağ Köşe, Kırmızı Tasarım) */
.close-info-btn {
    position: absolute;
    top: 25px; right: 25px; /* Tam sağ üst köşeye milimetrik hizalandı */
    background: #ef4444; /* Dikkat çekici, canlı kırmızı renk */
    border: none;
    width: 50px; height: 50px; /* Biraz daha büyüttük */
    border-radius: 50%;
    font-size: 24px;
    color: #ffffff; /* İçi bembeyaz çarpı/ikon */
    cursor: pointer;
    z-index: 1000;
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); /* Etrafına kırmızımsı parlama efekti */
    z-index: 10;
}

.close-info-btn:hover {
    background: #dc2626; /* Üzerine gelince daha koyu, tok bir kırmızı */
    transform: rotate(90deg) scale(1.15); /* Hem dönüp hem büyüyerek harika bir his verir */
}

/* Başlık */
.bab-info-title {
    font-family: 'Arakom', sans-serif;
    font-size: 46px; /* 40px'den 46px'e çıkarıldı */
    color: #0f172a; 
    margin-top: 0; 
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
    border-bottom: 3px solid #e2e8f0; 
    padding-bottom: 20px;
    flex-shrink: 0; 
}

/* Bilgi Metni ve SCROLL Özelliği - DAHA BÜYÜK YAZI */
.bab-info-text {
    font-family: 'Arakom', sans-serif;
    font-size: 34px; /* 30px'den 34px'e çıkarıldı, artık daha da okunaklı */
    color: #334155; 
    line-height: 1.75; 
    font-weight: 500; 
    text-align: left;
    
    /* SCROLL MOTORU */
    overflow-y: auto; 
    max-height: 65vh; /* Yazı alanı sınırını biraz daha artırdık */
    padding-right: 25px; 
}

/* Şık Kaydırma Çubuğu (Scrollbar) Tasarımı */
.bab-info-text::-webkit-scrollbar {
    width: 10px;
}
.bab-info-text::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.bab-info-text::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.bab-info-text::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tablodaki Bilgi (i) İkonu - SAĞ ÜST KÖŞEYE SABİTLENDİ */
.info-icon {
    position: absolute; /* Kutu içinden bağımsız hareket etmesini sağlar */
    top: 8px; /* Yukarıdan boşluk */
    right: 8px; /* Sağdan boşluk */
    color: #94a3b8;
    font-size: 1.2em; 
    cursor: pointer;
    z-index: 1000;
    transition: transform, background-color, color, opacity, box-shadow 0.2s ease;
    z-index: 10;
}

.info-icon:hover {
    color: #ef4444; /* Üzerine gelince ikon da çarpı butonu gibi kırmızı olsun */
    transform: scale(1.3);
}

/* Arapça Örnek Kelimeler ve Paragraf Stilleri */
.arabic-sample {
    font-family: 'Arakom', serif;
    color: #3b82f6; 
    font-weight: normal;
    font-size: 1.45em; /* Arapça kelimeler 34px'e göre oranlandı */
    direction: rtl;
    display: inline-block;
    padding: 0 6px;
}

.bab-info-text p {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px dashed #e2e8f0; 
}

.bab-info-text p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


/* =========================================================
   MARATON TELAFFUZ MODU (ORİJİNAL AYDINLIK TEMA)
========================================================= */
.marathon-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #f1f2f6; z-index: 9999999;
    display: none; flex-direction: column; overflow: hidden;
    font-family: 'Arakom', sans-serif;
    
    /* İŞTE KESİN ÇÖZÜM: Tüm sistemi soldan sağa (Türkçe) düzenine zorlar */
    direction: ltr !important; 
}
.marathon-overlay.active { display: flex; }

#game-wrapper {
    flex: 1; background: white; margin: 10px; border-radius: 20px;
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#top-bar-panel {
    background: #f8f9fa; border-bottom: 3px solid #eee;
    display: grid; grid-template-columns: repeat(6, 1fr);
    align-items: center; justify-items: center;
    height: 70px; flex-shrink: 0; padding: 0 10px;
}

.header-item { display: flex; flex-direction: column; align-items: center; width: 100%; }
.ui-hidden { visibility: hidden; opacity: 0; transition: 0.3s; }
.ui-visible { visibility: visible !important; opacity: 1 !important; }

.back-nav { 
    font-size: 1.1rem; border: 2px solid #6c5ce7; 
    background: white; color: #6c5ce7; padding: 8px 15px;
    border-radius: 12px; cursor: pointer;
    z-index: 1000; font-weight: normal; transition: 0.2s;
}
.back-nav:hover { background: #6c5ce7; color: white; }

.chrono-btn { font-size: 2.2rem; background: none; border: none; filter: grayscale(1); transition: 0.3s; }
.chrono-btn.active { filter: grayscale(0); transform: scale(1.1); }
.pause-circle { width: 45px; height: 45px; border-radius: 50%; border: none; background: #636e72; color: white; cursor: pointer;
    z-index: 1000; font-size: 1.2rem; }
.stage-badge { background: #6c5ce7; color: white; padding: 5px 15px; border-radius: 10px; font-size: 1.1rem; font-weight: normal; }
.timer-val { font-size: 2.2rem; font-weight: normal; color: #ff7675; font-family: monospace; }
.score-val { font-size: 2.2rem; font-weight: normal; color: #6c5ce7; }

.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 75px; height: 110px; background: rgba(108, 92, 231, 0.1);
    border: none; border-radius: 15px; cursor: pointer;
    z-index: 1000;
    font-size: 3rem; color: #6c5ce7; z-index: 50; display: flex;
    transition: 0.3s;
}
.nav-arrow:disabled { opacity: 0.1; cursor: not-allowed; }
.arrow-right.finish-ready { background: #ff7675; color: white; }

.marathon-screen { display: none; flex: 1; flex-direction: column; padding: 5px 20px; width: 100%; }
.marathon-screen.active { display: flex; }

.verb-table { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; direction: rtl; margin: 0 110px; }
.marathon-cell { 
    display: flex; align-items: center; justify-content: center; border-radius: 18px; 
    font-family: 'Arakom', serif; font-size: clamp(2.8rem, 9.5vh, 7.5rem); 
    font-weight: normal; border: 2px solid rgba(0,0,0,0.03); cursor: pointer;
    z-index: 1000;
}
.muez-row { background-color: #e3f2fd; color: #1565c0; }
.mue-row { background-color: #fce4ec; color: #c2185b; }
.marathon-cell.error-active { background-color: #ff7675 !important; color: white !important; }

#error-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; direction: rtl; }
.error-item { font-family: 'Arakom', serif; font-size: 2.5rem; background: #fee2e2; padding: 8px 20px; border-radius: 12px; color: #ff7675; border: 2px solid #ff7675; }

/* KAHVERENGİ KÖK KUTULARINA EKLENECEK KRONOMETRE BUTONU (LAZER KAZIMA EFEKTİ) */
.kutu-timer-btn {
    position: absolute; 
    top: 2px; /* Daha da köşeye yaslandı */
    right: 4px; /* Daha da köşeye yaslandı */
    left: auto;
    transform: none; 
    background: transparent; 
    border: none; 
    width: 36px; 
    height: 36px; 
    cursor: pointer;
    z-index: 1000;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: none; 
    z-index: 99999; 
    transition: transform 0.2s ease;
}

.kutu-timer-btn:hover { 
    transform: scale(1.1); 
}

.kutu-timer-btn svg {
    stroke: rgba(0, 0, 0, 0.85); 
    transition: transform, background-color, color, opacity, box-shadow 0.2s ease;
}

.kutu-timer-btn:hover svg {
    stroke: #000000; 
}

/* TAŞINABİLİR (SÜRÜKLENEBİLİR) KUTU İÇİN ÖZEL BOYUT VE KONUM */
.draggable-root-clone .kutu-timer-btn {
    width: 30px;
    height: 30px;
    top: 2px; /* Daha da köşeye yaslandı */
    right: 4px; /* Daha da köşeye yaslandı */
}
.draggable-root-clone .kutu-timer-btn svg {
    width: 18px; 
    height: 18px;
}


/* ==========================================================================
   FİİL ÇEKİMİ VE MARATON CİNSİYET (ERİL/DİŞİL) RENK EŞİTLEMESİ
   ========================================================================== */

/* 1. MARATON (KRONOMETRE) CİNSİYET RENKLERİ */
#table-view .marathon-cell.muez-row { 
    background-color: #e3f2fd !important; 
    color: #1565c0 !important; 
    border: 2px solid #bbdefb !important;
}
#table-view .marathon-cell.mue-row { 
    background-color: #fce4ec !important; 
    color: #c2185b !important; 
    border: 2px solid #f8bbd0 !important;
}
/* Ben/Biz (Mütekellim) Özel Sınıfı - Nötr Gri */
#table-view .marathon-cell.mutekellim-row {
    background-color: #f8fafc !important; 
    color: #334155 !important;
    border: 2px solid #cbd5e1 !important;
}

/* 2. POPUP (ÇEKİM TABLOSU) CİNSİYET RENKLERİ EŞİTLEMESİ */
.conjugation-table tbody tr:nth-child(1) td,
.conjugation-table tbody tr:nth-child(3) td {
    background-color: #e3f2fd !important; 
    color: #1565c0 !important;
    border: 2px solid #bbdefb !important;
}
.conjugation-table tbody tr:nth-child(2) td,
.conjugation-table tbody tr:nth-child(4) td {
    background-color: #fce4ec !important; 
    color: #c2185b !important;
    border: 2px solid #f8bbd0 !important;
}

/* ÖNEMLİ KORUMA: Maraton ekranında yanlış kelimeye tıklandığında yanan KIRMIZI hata rengini korur */
#table-view .marathon-cell.error-active {
    background-color: #fee2e2 !important; 
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

/* ==========================================================================
   ANA KLAVYE: TAHMİN ÇİPLERİ (YAZILAN KUTUNUN ÜZERİNDE)
   ========================================================================== */

#main-keyboard-predictions {
    /* display handled by js */
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 15px !important; /* Yazılan kutu ile arasına tatlı bir boşluk bırakır */
    min-height: 60px !important; 
    flex-wrap: wrap !important;
    width: 100% !important;
}

.prediction-chip {
    background-color: #ffffff !important; 
    color: #0f172a !important; 
    font-size: 2.2rem !important; 
    font-family: 'Arakom', sans-serif !important; 
    font-weight: normal !important;
    padding: 10px 25px !important; 
    border-radius: 20px !important; 
    border: 2px solid #cbd5e1 !important; 
    box-shadow: 0 6px 12px rgba(0,0,0,0.1) !important; 
    cursor: pointer !important; 
    text-align: center !important;
    transition: transform 0.1s ease, background-color 0.2s ease !important;
    /* display handled by js */
    align-items: center !important;
    justify-content: center !important;
}

.prediction-chip:active {
    transform: scale(0.92) !important; 
    background-color: #f1f5f9 !important;
}

/* ==========================================================================
   HAZIR KÖKLER EKRANI: GEREKSİZ BOŞLUĞU SIFIRLAMA VE ÇARPIYI HİZALAMA
   ========================================================================== */

/* Kapatma butonunu köklerle aynı hizaya (sol köşeye) alır */
.root-header {
    position: absolute !important;
    top: 20px !important; /* Köklerle aynı üst hiza */
    right: 15px !important; /* Kökler sağdan dizildiği için çarpıyı sola çektik (çakışmaz) */
    right: auto !important; 
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 50 !important;
    display: block !important;
}

/* Üstteki 50px'lik gereksiz boşluğu tamamen sıfırlar, içeriği en tepeye çeker */
.new-verb-layout {
    padding-top: 10px !important; 
    position: relative !important;
}


/* ==========================================================================
   HAZIR KÖKLER: SÜTUNLARIN EKRAN DIŞINA TAŞMASINI ENGELLEYEN KESİN ÇÖZÜM
   ========================================================================== */

/* 1. Ana taşıyıcıyı ekranın kendisine milimetrik olarak kilitler ve altından 25px boşluk bırakır */
.new-verb-layout {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important; 
    max-height: none !important;
    /* display handled by js */
    flex-direction: column !important;
    box-sizing: border-box !important;
    padding-bottom: 0px !important; /* Ekranın altından bırakılan nefes boşluğu */
}

/* 2. Orta bölüm (Önemli kökler + Alfabe) kalan alanı doldurur */
.roots-main-content {
    flex: 1 !important; 
    /* display handled by js */
    flex-direction: column !important;
    min-height: 0 !important; /* İtme gücünü sıfırlar */
    gap: 5px !important; 
}

/* 3. Alfabe listesi taşıyıcısına "sınırlarını çizme" emri verir */
.letters-grid-wrapper {
    flex: 1 !important;
    min-height: 0 !important;
    position: relative !important; /* Mutlak ızgara için zemin hazırlar */
}

/* 4. İŞTE KESİN ÇÖZÜM: Izgarayı (Grid) dış çerçevenin içine hapseder. 1 piksel bile dışarı çıkamaz! */
.letters-grid {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: auto !important;
}

/* 5. Gri Sütunların kendisi (Kaydırma motoru içeride kalır) */
.letter-column {
    height: auto !important; 
    min-height: 0 !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-bottom: 15px !important; /* Sütunun içindeki son kelimenin yapışmasını önler */
}

/* ==========================================================================
   MOBİL MOTORU: DİKEY UYARI, YATAY MİNİ MOD VE YAMALAR (SON TEMİZ VERSİYON)
   ========================================================================== */

/* 1. TELEFON DÖNDÜRME ANİMASYONU (Klas ve Pürüzsüz Geçiş) */
@keyframes smoothRotatePhone { 
    0% { transform: rotate(0deg); } 
    40%, 60% { transform: rotate(-90deg); } 
    100% { transform: rotate(0deg); } 
}

#mobile-portrait-warning { display: none; }

/* 2. MOBİL DİKEY MOD (PORTRAIT) UYARI EKRANI (Aralıklı ve Sade Tasarım) */
@media screen and (max-width: 1024px) and (orientation: portrait) {
    #mobile-portrait-warning {
        /* display handled by js */ 
        position: fixed !important; 
        top: 0; left: 0; width: 100vw; height: 100vh;
        background-color: #fafafc !important; /* Temiz kırık beyaz */
        z-index: 9999999 !important; 
        justify-content: center !important; 
        align-items: center !important;
        text-align: center !important; 
        padding: 40px !important; 
        box-sizing: border-box !important;
        font-family: 'Arakom', sans-serif;
    }
    
    body > div:not(#mobile-portrait-warning) { display: none !important; }
    
    .warning-animation-box { 
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 55px; /* Elemanlar büyüdüğü için boşluğu da biraz artırdık */
    }
    
    .phone-icon-wrapper { 
        position: relative; 
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .portrait-phone-svg { 
        /* Çizdiğimiz yeni SVG'nin animasyonu */
        animation: smoothRotatePhone 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite; 
        transform-origin: center center;
    }
    
    #mobile-portrait-warning h3 { 
        font-size: 75px; /* Yazı çok daha büyük hale getirildi */
        font-weight: 500; 
        letter-spacing: 0.5px;
        margin: 0; 
        color: #1d1d1f; 
    }
}

/* 3. TABLO DAVRANIŞI: MASAÜSTÜNDE SIĞDIR, MOBİLDE KAYDIR */
.window-pencere { overflow: hidden !important; width: 100% !important; box-sizing: border-box !important; }
.tab-content { width: 50% !important; flex-shrink: 0 !important; overflow-y: visible !important; overflow-x: hidden !important; padding-bottom: 0px !important; box-sizing: border-box !important; }
.tab-content .container { width: 100% !important; min-width: 0 !important; margin: 0 auto !important; white-space: normal !important; box-sizing: border-box !important; min-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.tab-content .container > table { flex: 1; }
@media screen and (max-width: 1024px) {
    .tab-content { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
    .tab-content .container { min-width: 900px !important; }
}

/* 4. MOBİL YATAY MOD (LANDSCAPE) MİKRO TASARIM VE KAHVERENGİ KUTU */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    html, body {
    font-family: 'Arakom', sans-serif; overflow: auto !important; -webkit-text-size-adjust: 100% !important; padding: 10px !important; background-color: #ffffff !important; }
    .top-bar { gap: 6px !important; margin-bottom: 8px !important; }
    #root-display-box, .switch-btn, .segmented-switch, .zoom-toggle-area, .back-link { height: 30px !important; min-height: 30px !important; font-size: 12px !important; padding: 0 6px !important; }
    .temp-root-display { font-size: 2.5rem !important; height: 60px !important; }
    
    .ar, #tab1 .ar, #tab2 .ar { font-size: 28px !important; line-height: 1 !important; }
    .ar-small, #tab1 .ar-small, #tab2 .ar-small { font-size: 20px !important; line-height: 1 !important; }
    .siga-text { font-size: 18px !important; }
    
    .glass-box { width: auto !important; min-width: 50px !important; max-width: 95% !important; padding: 10px 8px 4px 8px !important; margin: 2px auto !important; display: inline-block !important; box-sizing: border-box !important; }
    .ref { font-size: 11px !important; top: 1px !important; right: 2px !important; padding: 1px 4px !important; }
    
    .verb-table { transform-origin: top right; width: 100% !important; }
    table { table-layout: fixed !important; width: 100% !important; }
    th { font-size: 14px !important; padding: 4px 2px !important; }
    td { padding: 2px 1px !important; border-width: 2px !important; text-align: center !important; font-size: 11px !important; }
    .verb-table td b { font-size: 14px !important; }
    
    .tab-content { padding-bottom: 30px !important; }
    #tab1 .container { width: 100% !important; min-width: 600px !important; margin: 0 auto !important; }
    #tab2 .container { width: 100% !important; min-width: 950px !important; margin: 0 auto !important; }
    
    .keyboard-overlay { padding: 5px !important; }
    .keyboard-inner { gap: 4px !important; max-width: 100% !important; }
    .kb-row { gap: 4px !important; margin-bottom: 4px !important; }
    .key, .search-key, .var-key { height: 30px !important; width: 45px !important; font-size: 16px !important; border-radius: 4px !important; }
    .key-special { min-width: 50px !important; }
    #main-keyboard-predictions { min-height: 45px !important; margin-bottom: 8px !important; gap: 8px !important; }
    .prediction-chip { font-size: 1.2rem !important; padding: 6px 12px !important; border-radius: 12px !important; height: 30px !important; min-height: 30px !important; }
    .suffix-btn { height: 35px !important; font-size: 14px !important; }
    
    .new-verb-layout { padding: 5px !important; }
    .root-header { top: 5px !important; right: 5px !important; margin-bottom: 5px !important; }
    .verb-close-btn { width: 32px !important; height: 32px !important; font-size: 14px !important; border-width: 1px !important; }
    #root-search { height: 35px !important; font-size: 16px !important; padding: 0 10px !important; border-radius: 8px !important; }
    
    .important-roots-wrapper { margin-bottom: 5px !important; }
    #important-roots-list { gap: 6px !important; padding: 5px 0 5px 0 !important; }
    .flat-root-item { padding: 4px 10px !important; font-size: 16px !important; border-bottom-width: 2px !important; border-radius: 6px !important; }
    .letters-grid { gap: 5px !important; }
    .letter-column { flex: 0 0 100% !important; scroll-snap-align: center !important; overflow-y: auto !important; height: auto !important; border-width: 2px !important; border-radius: 8px !important; gap: 4px !important; padding-right: 2px !important; padding-bottom: 80px !important; box-sizing: border-box !important; }
    .col-range-header { padding: 4px !important; font-size: 11px !important; margin-top: -2px !important; margin-left: -2px !important; margin-right: -2px !important; border-radius: 6px 6px 0 0 !important; border-bottom-width: 2px !important; }
    .letter-column .glass-box { min-height: 30px !important; margin: 0 auto !important; width: 95% !important; padding: 8px 2px 2px 2px !important; }
    
    /* Kahverengi Kök Kutusu Yaması */
    .draggable-root-clone { display: block !important; visibility: visible !important; opacity: 1 !important; z-index: 999999 !important; font-size: 2rem !important; min-width: 140px !important; padding: 6px 12px 10px 0px !important; }
    .draggable-root-clone .kutu-timer-btn { width: 26px !important; height: 26px !important; top: 2px !important; right: 2px !important; }
    .draggable-root-clone .kutu-timer-btn svg { width: 15px !important; height: 15px !important; }
}

/* 5. MARATON SEÇİM EKRANI KAYDIRMA YAMASI */
#marathon-selection-area { justify-content: flex-start !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; padding-bottom: 80px !important; }
#marathon-verb-buttons { justify-content: flex-start !important; height: auto !important; min-height: max-content !important; padding-bottom: 40px !important; margin-top: 20px !important; }

/* Tablo iskeletinin ve metinlerin seçilmesini engeller */
#table-view, .verb-table {
    -webkit-user-select: none; 
    -moz-user-select: none;    
    -ms-user-select: none;     
    user-select: none;         
    pointer-events: auto; /* Tıklama ve sürükleme işlevlerinin bozulmaması için */
}

.keyboard-overlay {
    justify-content: flex-start !important;
    padding-bottom: 0px !important; 
    padding-top: 0px !important; 
}

/* Dinamik Uretilen Kok (Sihirli Cip) Animasyon ve Stili */
@keyframes showLoading {
    0%, 90% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes countdownTimer {
    0% { content: "Kök Oluşturuluyor... 3"; }
    33% { content: "Kök Oluşturuluyor... 2"; }
    66% { content: "Kök Oluşturuluyor... 1"; }
    95% { content: "Kök Hazır!"; color: #00ff00; }
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 80%; }
}

@keyframes rightToLeftScan {
    0% { clip-path: inset(0 0 0 100%); opacity: 0; transform: scale(0.95); }
    5% { opacity: 1; }
    100% { clip-path: inset(0 0 0 0); opacity: 1; transform: scale(1); }
}

@keyframes weldMove {
    0% { right: -5%; opacity: 1; }
    95% { right: 105%; opacity: 1; }
    100% { right: 105%; opacity: 0; visibility: hidden; }
}

@keyframes weldSparks {
    0% {
        box-shadow: 0 0 10px 5px #ffee00, -5px -10px 5px 2px #ffcc00, 10px 5px 8px 1px #ffff00, -15px 15px 5px 2px #ffee00;
        transform: translate(0, -5px) scale(1);
    }
    50% {
        box-shadow: 0 0 15px 8px #ffffff, 5px -15px 4px 1px #ffee00, -10px 10px 10px 2px #ffcc00, 15px -5px 6px 3px #ffff00;
        transform: translate(-3px, 8px) scale(1.5);
    }
    100% {
        box-shadow: 0 0 5px 3px #ffff00, 10px 15px 4px 1px #ffdd00, -10px -10px 8px 2px #ffcc00, -5px 10px 5px 2px #ffee00;
        transform: translate(3px, -3px) scale(0.8);
    }
}

@keyframes fuseSettle {
    0%   { border-color: rgba(255, 238, 0, 1); box-shadow: 0 0 30px rgba(255, 238, 0, 1), inset 0 0 15px rgba(255, 238, 0, 0.8); }
    40%  { border-color: rgba(255, 238, 0, 0.6); box-shadow: 0 0 15px rgba(255, 238, 0, 0.6), inset 0 0 8px rgba(255, 238, 0, 0.4); }
    100% { border-color: rgba(255, 238, 0, 0); box-shadow: none; }
}
@keyframes textGlowSettle {
    0%   { text-shadow: 0 0 20px rgba(255, 238, 0, 1), 0 0 30px rgba(255, 238, 0, 1); }
    100% { text-shadow: 0 0 8px rgba(255, 238, 0, 0.4); }
}

.dynamic-root-chip {
    position: relative;
    margin-top: 25px !important; 
    border: 2px dashed rgba(255, 238, 0, 0) !important;
    background: rgba(0, 0, 0, 0.75) !important;
    animation: fuseSettle 2.5s 3.2s ease-out forwards; /* Vurgu yavasca azalip biter */
}

.dynamic-root-loading {
    position: absolute;
    top: -25px; 
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #8b5a2b;
    font-family: 'Arakom', sans-serif;
    font-weight: normal;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(139, 90, 43, 0.6);
    opacity: 0;
    visibility: hidden;
    animation: showLoading 1.5s forwards;
}

.dynamic-root-countdown::after {
    content: "Kök Oluşturuluyor... 3";
    animation: countdownTimer 1.5s step-end forwards;
}

.dynamic-root-progress {
    position: absolute;
    top: -10px; /* Cizgi ile kutu arasinda daha cok bosluk */
    left: 10%; /* Soldan saga ilerlemesi icin left kullanildi */
    height: 3px;
    background: #8b5a2b;
    border-radius: 2px;
    box-shadow: 0 0 8px #8b5a2b;
    opacity: 0;
    visibility: hidden;
    animation: fillProgress 1.5s linear forwards, showLoading 1.5s forwards;
}

.dynamic-root-text {
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(255, 238, 0, 1), 0 0 30px rgba(255, 238, 0, 1);
    opacity: 0;
    display: inline-block;
    animation: rightToLeftScan 1.7s 1.5s ease-out forwards, textGlowSettle 2.5s 3.2s ease-out forwards;
}

.welding-spark-emitter {
    position: absolute;
    top: 50%;
    right: -5%;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    animation: 
        weldMove 1.7s 1.5s ease-out forwards, 
        weldSparks 0.05s 1.5s infinite;
}

.dynamic-root-chip:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(255, 238, 0, 0.5) !important;
    box-shadow: 0 0 10px rgba(255, 238, 0, 0.4);
}

/* Scrollbar Gizleme */
.hide-scrollbars {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbars::-webkit-scrollbar {
    display: flex;
}

.keyboard-bottom-area {
    background: #f4f6f9; /* Solid light color to prevent eye strain */
    width: calc(100% - 10px);
    max-width: 1000px;
    margin: 0 auto 5px auto;
    padding: 15px 0 5px 0;
    border: 3px solid #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


/* Kokleri maksimum 2 sutun yapma */
#dynamic-root-display .prediction-chip {
    flex: 0 0 calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
    box-sizing: border-box !important;
    text-align: center !important;
    justify-content: center !important;
}

/* Tanimli olmayan köklerde numaranın (ref) kırmızı olmasını ve tıklanabilir görünmesini engeller */
html body .glass-box.tanimsiz-kok.kok-turendi .ref,
html body .glass-box.tanimsiz-kok .ref {
    background-color: transparent !important;
    color: #FF3B30 !important;
    animation: none !important;
    box-shadow: none !important;
    cursor: default !important;
    transform: none !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* MEZİD TAB ALT ÇİZGİ DALGASI (BORDER SWEEP) ANİMASYONU */
@keyframes borderSweep {
    0% { transform: scaleX(0); transform-origin: left; opacity: 0; }
    21% { transform: scaleX(1); transform-origin: left; opacity: 1; }
    23% { transform-origin: right; }
    44% { transform: scaleX(0); transform-origin: right; opacity: 0; }
    100% { transform: scaleX(0); transform-origin: right; opacity: 0; }
}

.mezid-btn.heartbeat-active {
    position: relative !important;
    background: #f1f5f9 !important;
    animation: none !important;
}

.mezid-btn.heartbeat-active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #FF3B30;
    border-radius: 2px;
    animation: borderSweep 4s infinite ease-in-out;
}


/* --- CHOICE MENU LAYOUT --- */
.choice-menu-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.choice-card {
    flex: 1;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* backdrop-filter removed for performance */
}

.choice-card:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.choice-card.choice-roots:hover .choice-icon {
    color: #f39c12;
}

.choice-card.choice-words:hover .choice-icon {
    color: #3498db;
}

.choice-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.choice-title {
    font-size: 3.5rem;
    font-weight: normal;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Arakom', sans-serif;
}

/* --- THEMATIC ACCORDION --- */
.thematic-accordion-item {
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

.thematic-accordion-header {
    padding: 25px 30px;
    cursor: pointer;
    z-index: 1000;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-radius 0.3s ease;
    border-radius: 15px;
}

.thematic-accordion-item.active .thematic-accordion-header {
    padding: 25px 30px;
    cursor: pointer;
    z-index: 1000;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-radius 0.3s ease;
    border-radius: 15px;
}

.thematic-accordion-header:hover {
    background: rgba(255, 255, 255, 0.4);
}

.thematic-accordion-title {
    font-size: 2.2rem;
    font-family: 'Arakom', sans-serif;
    color: #000;
    margin: 0;
}

.thematic-accordion-icon {
    font-size: 2rem;
    color: #000;
    transition: transform 0.3s ease;
}

.thematic-accordion-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.thematic-accordion-item.active .thematic-accordion-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.thematic-accordion-item.active .thematic-accordion-icon {
    font-size: 2rem;
    color: #000;
    transition: transform 0.3s ease;
}

.thematic-words-grid {
    display: grid;
    /* Masaüstünde 5 sütun, tablette 3, mobilde 2 veya 1 */
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}


/* Kökler Tablosu (Gizlemek İçin Helper) */
.roots-main-content.hidden {
    display: none !important;
}


/* --- FLIP CARDS --- */
.thematic-word-card {
    background-color: transparent;
    perspective: 1000px;
    height: 130px;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
    border: none;
}

.thematic-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.thematic-word-card.flipped .thematic-flip-inner {
    transform: rotateY(180deg);
}

.thematic-flip-front, .thematic-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.thematic-flip-front {
    background: rgba(255, 255, 255, 0.1);
}

.thematic-flip-back {
    background: rgba(255, 255, 255, 0.15);
    transform: rotateY(180deg);
}

.thematic-word-card:hover .thematic-flip-front {
    background: rgba(255, 255, 255, 0.2);
}

.thematic-word-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.thematic-word-ar {
    font-family: 'Arakom', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.thematic-word-tr {
    font-size: 1.2rem;
    color: #bdc3c7;
}

.thematic-words-content.hidden {
    display: none !important;
}

/* --- HAFIZA OYUNU EKLENTILERI --- */
.score-board {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Kutuların boyunu uzatır */
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: 100%; /* 4K'da tam yayılma için */
     /* Header dışında kalan alanın çoğu */
    margin: 0 auto;
}
.score-board { flex-direction: column; align-items: center; }
.player-box {
    flex: 0 0 80px; /* Kutuların genişliğini sabitledik */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: var(--shadow);
    transition: transform, background-color, color, opacity, box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid transparent;
    margin: 10px 0; /* Animasyon ve nefes alma payı */
}
.player-box { flex-direction: row; flex: none; width: 90%; height: 45px; gap: 5px; margin: 5px 0; }
.active-p { 
    background: #fff; 
    border-color: currentColor; 
    transform: scale(1.05); /* Hafif büyüme animasyonu */
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
}
.p-label { font-size: 1.1rem; font-weight: normal; opacity: 0.6; }
.p-label { font-size: 0.8rem; }
.p-score { font-size: 2.5rem; font-weight: 900; margin-top: 5px; }
.p-score { font-size: 1.4rem; margin-top: 0; }


.thematic-words-grid.memory-mode[data-total="12"] { grid-template-columns: repeat(4, 1fr); }
.thematic-words-grid.memory-mode[data-total="18"] { grid-template-columns: repeat(6, 1fr); }
.thematic-words-grid.memory-mode[data-total="20"] { grid-template-columns: repeat(5, 1fr); }
.thematic-words-grid.memory-mode[data-total="24"] { grid-template-columns: repeat(6, 1fr); }
.matched { opacity: 0; pointer-events: none; transition: 0.6s; transform: scale(0.8); }
.slider:before {
            position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
            background-color: white; transition: .4s; border-radius: 50%;
        }
input:checked + .slider { background-color: var(--p2) !important; }
input:checked + 
.memory-game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
}

.memory-btn {
    border: none; padding: 8px 14px; border-radius: 10px; cursor: pointer;
    z-index: 1000;
    font-family: 'Arakom', sans-serif; background: #e9ecef; box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: 0.3s; font-size: 0.9rem; color: #333;
}
.memory-btn.active { background: #ff922b; color: white; }

.memory-card { perspective: 1000px; cursor: pointer;
    z-index: 1000; width: 100%; height: 100%; min-height: 180px; }
.memory-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; }
.memory-card.flipped .memory-card-inner { transform: rotateY(180deg); }

.memory-card-face {
    position: absolute; 
    width: 100%; 
    height: 100%; 
    backface-visibility: hidden; 
    border-radius: 15px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    border: 3px solid rgba(255,255,255,0.3); 
    box-sizing: border-box; 
    text-align: center; 
    padding: 10px;
    word-break: break-word;
    font-size: 1.5rem;
}

.memory-card-front { background: rgba(255,255,255,0.1); color: white; }
.memory-mode .memory-card-front::after { content: "؟"; font-size: 3rem; opacity: 0.3; position: absolute; }
.memory-card-back { transform: rotateY(180deg); background: #ffffff; color: #333; }
.memory-card.matched { opacity: 0; pointer-events: none; transition: 0.6s; transform: scale(0.8); }

.score-board {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto 20px auto;
}

.player-box {
    flex: 0 0 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform, background-color, color, opacity, box-shadow 0.4s;
    border: 4px solid transparent;
    padding: 10px;
}

.active-p { 
    background: #fff; 
    border-color: currentColor; 
    transform: scale(1.05); 
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.p-label { font-size: 1.1rem; font-weight: normal; opacity: 0.6; }
.p-score { font-size: 2.5rem; font-weight: 900; margin-top: 5px; }


/* Tam Ekran Modu (Hafıza Oyunu) */
.fullscreen-accordion {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    box-sizing: border-box !important;
    background: #f1f2f6 !important;
    z-index: 9999999;
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    overflow-y: auto !important;
}

.fullscreen-accordion .thematic-accordion-header {
    padding: 25px 30px;
    cursor: pointer;
    z-index: 1000;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-radius 0.3s ease;
    border-radius: 15px;
}
.fullscreen-accordion .thematic-accordion-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.fullscreen-accordion .thematic-words-grid.memory-mode {
    flex: 1;
}
.fullscreen-accordion .thematic-words-grid:not(.memory-mode) {
    flex: 1;
    align-content: start;
    grid-template-columns: repeat(3, 1fr) !important;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling for the fullscreen grid */
.fullscreen-accordion .thematic-words-grid:not(.memory-mode)::-webkit-scrollbar {
    width: 8px;
}
.fullscreen-accordion .thematic-words-grid:not(.memory-mode)::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}
.fullscreen-accordion .thematic-words-grid:not(.memory-mode)::-webkit-scrollbar-track {
    background: transparent;
}

/* Make fonts larger in fullscreen study cards */
.fullscreen-accordion .thematic-words-grid:not(.memory-mode) .lang-ar {
    font-size: 4rem !important;
}
.fullscreen-accordion .thematic-words-grid:not(.memory-mode) .lang-tr {
    font-size: 2rem !important;
}
.fullscreen-accordion .thematic-words-grid:not(.memory-mode) .memory-card-front div {
    font-size: 4rem !important;
}

/* --- FULLSCREEN HIDING RULES --- */
.fullscreen-accordion .hide-in-fullscreen {
    display: none !important;
}

/* Enforce 5 columns specifically for desktop. It falls back to 2 or 1 on mobile */
.thematic-words-grid:not(.memory-mode) {
    grid-template-columns: repeat(5, 1fr) !important;
}

@media screen and (max-width: 768px) {
    .thematic-words-grid:not(.memory-mode) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- YENİ İSTEKLER: 
   1. Kapalıyken butonları gizle
   2. RTL sorununu çözüp başlığı sola sabitle
--- */

.thematic-accordion-item:not(.active) .memory-game-controls {
    display: none !important;
}

.thematic-accordion-item {
    margin-bottom: 20px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

/* Sadece içerikteki tablolar RTL olarak kalsın istenirse (kartların içinde Arapça varsa vs.)
   ızgara (grid) içi RTL olabilir ama dış konteyner LTR oldu. */
.thematic-words-grid {
    direction: rtl; 
}

/* Fullscreen UI Shrinking & Light Theme Enhancements */
.fullscreen-accordion .thematic-accordion-header {
    padding: 25px 30px;
    cursor: pointer;
    z-index: 1000;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, border-radius 0.3s ease;
    border-radius: 15px;
}
.fullscreen-accordion .thematic-accordion-title {
    font-size: 2.2rem;
    font-family: 'Arakom', sans-serif;
    color: #000;
    margin: 0;
}
.fullscreen-accordion button[title="Tam Ekran"] {
    font-size: 1rem !important;
    padding: 2px 8px !important;
    color: #333 !important;
    border-color: rgba(0,0,0,0.2) !important;
}
.fullscreen-accordion .memory-card-front {
    background: #ffffff !important;
    color: #333 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- YENİ İSTEKLER: Kart Kelimeleri Büyük ve Arakom --- */
.memory-card-face .lang-ar,
.memory-card-face.lang-ar,
.memory-card-face .lang-tr,
.memory-card-face.lang-tr {
    font-family: 'Arakom', sans-serif !important;
}

/* ÇALIŞMA KARTLARI (Küçük) */
.thematic-words-grid:not(.memory-mode):not(.list-mode-grid) .memory-card-face .lang-ar, 
.thematic-words-grid:not(.memory-mode):not(.list-mode-grid) .memory-card-face.lang-ar { font-size: 4rem !important; }
.thematic-words-grid:not(.memory-mode):not(.list-mode-grid) .memory-card-face .lang-tr, 
.thematic-words-grid:not(.memory-mode):not(.list-mode-grid) .memory-card-face.lang-tr { font-size: 2.8rem !important; }

/* LİSTE MODU */
.thematic-words-grid.list-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    direction: ltr; /* İçerik manuel yönlendirilecek */
}

.list-mode-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-mode-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.list-mode-tr {
    font-size: 1.4rem;
    font-weight: normal;
    color: #495057;
    flex: 1;
    text-align: left;
}

.list-mode-emoji {
    font-size: 2.2rem;
    margin: 0 15px;
    flex: 0 0 auto;
}

.list-mode-ar {
    font-size: 2.4rem;
    font-family: 'Arakom', sans-serif;
    color: #000;
    flex: 1;
    text-align: right;
}


/* HAFIZA OYUNU (Büyük) */
.thematic-words-grid.memory-mode .memory-card-face .lang-ar,
.thematic-words-grid.memory-mode .memory-card-face.lang-ar { font-size: 4rem !important; }
.thematic-words-grid.memory-mode .memory-card-face .lang-tr,
.thematic-words-grid.memory-mode .memory-card-face.lang-tr { font-size: 2.5rem !important; }

/* Hafıza oyunu arka yüzünde Türkçe kelime rengi bazen sarı oluyordu, açık temaya uygun olsun diye koyulaştırıldı */
.fullscreen-accordion .memory-card-back .lang-tr {
    color: #333 !important;
}


#thematic-accordion-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
    direction: ltr;
    position: relative;
}

/* KESİNTİSİZ DİKEY ÇİZGİLER KALDIRILDI (Tasarım Bağımsızlığı) */


.thematic-accordion-item {
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

/* Çizgiler için sözde elementler (sadece aktif değilken ve son sütun değilken sağa çizgi ekler) */


/* Başlıklar artık genişlemiyor, yerinde sabit kalıyor */
.thematic-accordion-item.active {
    background: rgba(92, 124, 250, 0.4); /* Aktif sekme rengi */
    border-color: rgba(92, 124, 250, 0.8) !important;
    overflow: visible !important; /* Ok işaretinin görünmesi için */
    z-index: 20; /* Panelin (z-index:5) üzerinde kalsın diye */
    margin-bottom: 0 !important; /* Konteynerla aradaki fazlalık boşluğu kapatıp okun tam birleşmesini sağlar */
}

/* Bütünlük (Continuity) Ok İşareti: Aktif başlığın altından, altta açılan panele işaret eder */
.thematic-accordion-item.active::before {
    content: "";
    position: absolute;
    bottom: -15px; /* Grid'in gap boşluğuna doğru sarkar */
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0 15px;
    border-style: solid;
    border-color: #5c7cfa transparent transparent transparent;
    z-index: 10;
}


@media screen and (max-width: 768px) {
    #thematic-accordion-container {
        grid-template-columns: 1fr;
    }
}


/* KÖKLER LİSTESİ YÖNLENDİRME ANİMASYONU (SİTEMAP) */
@keyframes sitemapWavePulse {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.6); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(243, 156, 18, 0); transform: scale(1.15); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); transform: scale(1); }
}

.sitemap-wave-hint {
    animation: sitemapWavePulse 1.5s infinite ease-out !important;
    color: #f39c12 !important; 
    border-radius: 50% !important; 
    display: inline-block; 
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}

.svg-wave-active {
    animation: sitemapWavePulse 1.5s infinite ease-out !important;
    color: #f39c12 !important; 
    border-radius: 50% !important; 
    display: flex;
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease;
}


.score-board.active-score { /* display handled by js */ }

.thematic-accordion-panel {
    position: relative;
    z-index: 5;
    background: #f8f9fa !important; /* Opak renk çizgiyi tam örter */
}

.fullscreen-accordion .thematic-words-grid.memory-mode .memory-card {
    min-height: 0 !important;
}
.fullscreen-accordion:has(.memory-mode) {
    overflow-y: hidden !important;
}
.fullscreen-accordion .thematic-words-grid.memory-mode {
    min-height: 0 !important;
    height: auto !important;
}

/* Tüm flex dikey silsilede büzülmeye (shrink) izin ver */
.fullscreen-accordion .thematic-accordion-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.fullscreen-accordion .thematic-words-grid.memory-mode {
    min-height: 0 !important;
    height: auto !important;
}
.fullscreen-accordion {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important; /* height yerine bottom/top ile viewporta oturtalım */
}

/* Tam ekranda iç boşlukları (padding) ve dış boşlukları (margin) optimize edelim ki alt kısım taşmasın */

.fullscreen-accordion .score-board {
    margin-bottom: 10px !important;
}
.fullscreen-accordion .thematic-words-grid.memory-mode {
    margin-bottom: 0 !important;
    padding-bottom: 5px !important;
}

/* Çift sayısına göre dinamik font küçültme (Hafıza Kartları için) */
/* 8 Çift */
.thematic-words-grid.memory-mode.pairs-8 .memory-card-face.lang-ar { font-size: 3.5rem !important; }
.thematic-words-grid.memory-mode.pairs-8 .memory-card-face.lang-tr { font-size: 2rem !important; }

/* 10 Çift */
.thematic-words-grid.memory-mode.pairs-10 .memory-card-face.lang-ar { font-size: 2.2rem !important; }
.thematic-words-grid.memory-mode.pairs-10 .memory-card-face.lang-tr { font-size: 1.6rem !important; }

/* 12 Çift */
.thematic-words-grid.memory-mode.pairs-12 .memory-card-face.lang-ar { font-size: 2.1rem !important; }
.thematic-words-grid.memory-mode.pairs-12 .memory-card-face.lang-tr { font-size: 1.5rem !important; }

/* Çalışma kartları HER ZAMAN 3 sütun olsun */
.thematic-words-grid:not(.memory-mode) {
    grid-template-columns: repeat(3, 1fr) !important;
}
@media screen and (max-width: 768px) {
    /* Mobilde 3 sütun çok sıkışık olursa diye 1'e düşür, ama kullanıcı ısrarla 3 istiyorsa yorum satırı yapabiliriz. Kullanıcı "her zaman 3 sütun" dediği için burada 1fr'yi kaldırmıyorum. */
    .thematic-words-grid:not(.memory-mode) {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Hafıza ve Çalışma Kartlarının arkasındaki yazılar her zaman tam siyah olsun */
.memory-card-back {
    color: #000000 !important;
}
.memory-card-back .lang-ar {
    color: #000000 !important;
}
.memory-card-back .lang-tr {
    color: #000000 !important;
}

/* Scoreboard Fixes */
.score-board {
    display: flex;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 15px auto !important;
    padding: 10px !important;
    height: auto !important; /* NOT 85vh */
}
.player-box {
    flex: 0 1 150px !important; /* Auto size */
    padding: 10px 20px !important;
    border-radius: 15px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    border: 2px solid transparent !important;
    text-align: center;
}
.player-box.active-p {
    border: 2px solid #5c7cfa !important;
    transform: scale(1.05) !important;
    background: #eef2ff !important;
}
.p-label {
    font-size: 1.2rem !important;
    font-weight: normal; !important;
    color: inherit !important;
}
.p-score {
    font-size: 1.8rem !important;
    font-weight: normal; !important;
    color: inherit !important;
}

/* Toggles Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  margin: 0;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
    z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #4dabf7;
}
input:checked + .slider:before {
  transform: translateX(22px);
}

/* Çalışma Kartları Ön Yüz (Arapça) metni de siyah olsun */
.memory-card-front { color: #000000 !important; }
.memory-card-front .lang-ar { color: #000000 !important; }

/* Switch kısmının RTL'den etkilenip ters çalışmasını engelle */
.switch-wrapper {
    direction: ltr !important;
}

/* Çalışma kartlarındaki emojileri büyüt */
.thematic-words-grid:not(.memory-mode) .memory-card-front div[style*="font-size: 2.5rem;"] {
    font-size: 4rem !important;
}
.thematic-words-grid:not(.memory-mode) .memory-card-back div[style*="font-size: 2rem;"] {
    font-size: 3.5rem !important;
}

/* Compact Scoreboard in settings bar */
.mem-settings .score-board {
    /* display handled by js */ /* Javascript will toggle none/flex inline, but when flex, use these rules */
    flex-direction: row !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.mem-settings .player-box {
    flex: 0 1 auto !important;
    /* display handled by js */
    flex-direction: row !important; /* Horizontal layout for label and score */
    align-items: center !important;
    padding: 4px 12px !important;
    border-radius: 50px !important; /* Pill shape */
    background: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    border: 2px solid transparent !important;
}
.mem-settings .player-box.active-p {
    border: 2px solid #5c7cfa !important;
    transform: scale(1.05) !important;
    background: #eef2ff !important;
}
/* Override any lingering CSS for score-board inside mem-settings */
.mem-settings .score-board.active-score { /* display handled by js */ }

/* Emoji ile metin arası boşluğu azalt */
.thematic-words-grid:not(.memory-mode) .memory-card-face div[style*="margin-bottom: 10px;"] {
    margin-bottom: 0px !important;
}

/* Yeni yatay Piller için CSS */
.memory-game-controls .p-score-box {
    /* display handled by js */
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 20px !important; font-size: 1.2rem !important; min-height: 44px !important; box-sizing: border-box !important;
    border-radius: 50px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    border: 2px solid transparent !important;
    transition: transform, background-color, color, opacity, box-shadow 0.3s ease !important;
    min-width: 80px;
}
.memory-game-controls .p-score-box.active-p {
    transform: scale(1.1) !important;
    background: #fdfdfd !important;
}
/* Renk vurgusu */
[id^="p1-box-"].active-p { border: 3px solid #4dabf7 !important; background: #eef2ff !important; }
[id^="p2-box-"].active-p { border: 3px solid #ff8787 !important; background: #fff5f5 !important; }

/* Inactive player opacity */
.memory-game-controls .p-score-box:not(.active-p) {
    opacity: 0.5 !important;
    transform: scale(0.9) !important;
}

/* RTL Override for controls container so visual layout matches DOM layout */
.memory-game-controls {
    direction: ltr !important;
}

.memory-game-controls .p-score-box[style*="display: flex"] {
    display: flex !important;
}


/* Hafıza Oyunu Switch Override */
.switch-wrapper .switch {
    width: 44px !important;
    height: 22px !important;
}
.switch-wrapper .switch .slider {
    background-color: #ffffff !important;
    border: 2px solid #4dabf7 !important;
}
.switch-wrapper .switch input:checked + .slider {
    background-color: #ffffff !important;
}
.switch-wrapper .switch .slider:before {
    background-color: #4dabf7 !important;
    height: 14px !important;
    width: 14px !important;
    bottom: 2px !important;
    left: 2px !important;
}
.switch-wrapper .switch input:checked + .slider:before {
    transform: translateX(22px) !important;
    background-color: #4dabf7 !important;
}


/* Prevent study cards from overlapping by forcing row height */
.thematic-words-grid:not(.memory-mode) {
    grid-auto-rows: minmax(200px, auto) !important;
    gap: 15px !important;
}
.thematic-words-grid:not(.memory-mode) .memory-card-wrapper {
    min-height: 200px !important;
}

/* GUARANTEE FULLSCREEN MEMORY GRID FILLS THE SCREEN PROPERLY */
.fullscreen-accordion .thematic-accordion-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.fullscreen-accordion .thematic-words-grid.memory-mode {
    display: grid !important;
    flex: 1 1 0 !important; /* Forces it to fit exactly within flex container without expanding */
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 10px !important;
    align-content: stretch !important;
    grid-auto-rows: minmax(0, 1fr) !important; /* Forces rows to shrink and fit exactly */
    box-sizing: border-box !important;
}
.thematic-words-grid.memory-mode .memory-card-wrapper {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important; /* Do not force aspect ratio in memory mode */
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}
.thematic-words-grid.memory-mode .memory-card {
    height: auto !important;
    width: 100% !important;
}

/* Fix Turkish punctuation rendering in RTL grid context */
.lang-tr, 
.memory-card-face.lang-tr {
    direction: ltr !important;
    unicode-bidi: isolate !important;
    text-align: center !important;
}

@keyframes pulseWave {
    0% { box-shadow: 0 0 0 0 rgba(77, 171, 247, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(77, 171, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(77, 171, 247, 0); }
}
.wave-btn {
    animation: pulseWave 1.5s infinite;
}

@keyframes quickPulse {
    0% { transform: scale(1.05); filter: brightness(1); }
    50% { transform: scale(1.2); filter: brightness(1.3); }
    100% { transform: scale(1.05); filter: brightness(1); }
}
.pulse-anim {
    animation: quickPulse 0.4s ease-out;
}

.thematic-words-grid.active-p1-grid {
    box-sizing: border-box !important;
    border: 4px solid #4dabf7 !important;
    box-shadow: 0 0 25px rgba(77, 171, 247, 0.5) !important;
    border-radius: 15px;
    padding: 10px;
    transition: transform, background-color, color, opacity, box-shadow 0.4s ease;
}

.thematic-words-grid.active-p2-grid {
    box-sizing: border-box !important;
    border: 4px solid #ff8787 !important;
    box-shadow: 0 0 25px rgba(255, 135, 135, 0.5) !important;
    border-radius: 15px;
    padding: 10px;
    transition: transform, background-color, color, opacity, box-shadow 0.4s ease;
}

.roots-main-content:not(.hidden) {
    display: flex !important;
}

/* MEMORY GRID ROW FIX: Izgara satırlarını matematiksel olarak bölerek taşmayı %100 engelliyoruz */
.thematic-words-grid.memory-mode.pairs-6 { grid-template-rows: repeat(3, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-8 { grid-template-rows: repeat(4, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-10 { grid-template-rows: repeat(4, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-12 { grid-template-rows: repeat(4, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-18 { grid-template-rows: repeat(6, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-20 { grid-template-rows: repeat(8, minmax(0, 1fr)) !important; }
.thematic-words-grid.memory-mode.pairs-24 { grid-template-rows: repeat(8, minmax(0, 1fr)) !important; }

.thematic-words-grid.memory-mode .memory-card-wrapper,
.thematic-words-grid.memory-mode .memory-card,
.thematic-words-grid.memory-mode .memory-card-face {
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Fullscreen modundayken grid çizgilerini ve sütunları kaldır */
.fullscreen-accordion #thematic-accordion-container {
    border: none !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
}

.fullscreen-accordion .thematic-accordion-item {
    margin-bottom: 20px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

/* 3D Buton Başlık Efekti */
.th-3d-btn {
    cursor: pointer !important;
    position: relative;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.4) !important;
    transform: translateY(0);
    transition: transform, background-color, color, opacity, box-shadow 0.1s ease !important;
    user-select: none;
    z-index: 2;
}

.th-3d-btn:active {
    box-shadow: 0 0px 0 rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2) !important;
    transform: translateY(4px) !important;
}

.th-3d-btn:hover {
    filter: brightness(1.1);
}



/* Guarantee full width in fullscreen mode */
body.fullscreen-accordion .new-verb-layout {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

body.fullscreen-accordion #thematic-words-content {
    padding: 20px !important;
}

body.fullscreen-accordion .thematic-accordion-item {
    border: none !important;
    margin: 0 !important;
}

body.fullscreen-accordion .thematic-accordion-content.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

body.fullscreen-accordion #thematic-accordion-container {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Disabled toggle appearance */
input:disabled + .slider {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.5;
}
input:disabled ~ span {
    opacity: 0.5;
    cursor: not-allowed !important;
}
.switch-wrapper:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* GUARANTEE UNBROKEN FLEX CHAIN FOR FULLSCREEN MEMORY GAME */
body.fullscreen-accordion #thematic-words-content {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    flex: 1 1 auto !important;
    overflow: hidden !important; /* Prevent scroll so grid fits exactly */
}

body.fullscreen-accordion #thematic-accordion-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

body.fullscreen-accordion .thematic-accordion-item {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

body.fullscreen-accordion .thematic-accordion-content.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

body.fullscreen-accordion .thematic-words-grid.memory-mode {
    display: grid !important;
    flex: 1 1 auto !important;
    height: auto !important;
    width: 100% !important;
}

/* The missing link in the flex chain */
.fullscreen-accordion .thematic-accordion-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

/* Disabled toggle switch styling */
.switch input:disabled + .slider {
    background-color: #ccc !important;
    cursor: not-allowed !important;
}
.switch input:disabled + .slider:before {
    background-color: #999 !important;
}
.switch-wrapper:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}
.switch-wrapper:has(input:disabled) span {
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Disabled pair count select styling */
select.memory-btn:disabled {
    background-color: #e9ecef !important;
    color: #adb5bd !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Hide underlying elements when fullscreen accordion is active */
body.has-fullscreen-accordion .verb-close-btn {
    display: none !important;
}
body.has-fullscreen-accordion .thematic-accordion-item {
    display: none !important; /* Hafıza oyununda başlıkların görünmesini engeller */
}
body.has-fullscreen-accordion .thematic-words-content {
    overflow: hidden !important;
}

/* Vezinlere Bak Arama Kısmı Öneri Kökleri (Sabit Boyut, Yanyana İkili, Büyük Yazı) */
#root-predictions-box .prediction-chip.dynamic-root-chip {
    margin-top: 35px !important; 
    overflow: visible !important;
}

#root-predictions-box .prediction-chip {
    flex: 0 0 calc(50% - 5px) !important;
    max-width: calc(50% - 5px) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    height: 85px !important;
    font-size: 2.8rem !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media screen and (max-width: 768px) {
    #root-predictions-box .prediction-chip {
        height: 65px !important;
        min-height: 65px !important;
        font-size: 1.8rem !important;
    }
}

/* KAHVERENGİ KÖK KUTULARINA EKLENECEK LİSTE BUTONU (FDM İÇİN) */
.kutu-list-btn {
    position: absolute; 
    top: 40px; /* Timer'ın altına */
    right: 4px; 
    left: auto;
    transform: none; 
    background: transparent; 
    border: none; 
    width: 36px; 
    height: 36px; 
    cursor: pointer;
    z-index: 1000;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0; 
    box-shadow: none; 
    z-index: 99999; 
    transition: transform 0.2s ease;
}

.kutu-list-btn:hover { 
    transform: scale(1.1); 
}

.kutu-list-btn svg {
    stroke: rgba(0, 0, 0, 0.85); 
    transition: transform, background-color, color, opacity, box-shadow 0.2s ease;
    width: 20px;
    height: 20px;
}

.kutu-list-btn:hover svg {
    stroke: #000000; 
}

.draggable-root-clone .kutu-list-btn {
    width: 30px;
    height: 30px;
    top: 34px; 
    right: 4px; 
}
.draggable-root-clone .kutu-list-btn svg {
    width: 18px; 
    height: 18px;
}

@media (max-width: 768px) {
    .draggable-root-clone .kutu-list-btn { width: 26px !important; height: 26px !important; top: 30px !important; right: 2px !important; }
    .draggable-root-clone .kutu-list-btn svg { width: 15px !important; height: 15px !important; }
}


/* TAŞINABİLİR (SÜRÜKLENEBİLİR) KUTU İÇİN ÖZEL BOYUT VE KONUM */
.draggable-root-clone {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Kök yazısı ile butonlar arası mesafe */
    padding: 10px 15px !important; 
    box-sizing: border-box;
}

.draggable-root-clone .root-text-content {
    flex: 1;
    text-align: center;
}

.draggable-root-clone .root-clone-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.draggable-root-clone .kutu-timer-btn,
.draggable-root-clone .kutu-list-btn {
    position: static !important; /* absolute'ı eziyoruz */
    width: 30px !important;
    height: 30px !important;
    top: auto !important;
    right: auto !important;
    margin: 0 !important;
}

.draggable-root-clone .kutu-timer-btn svg,
.draggable-root-clone .kutu-list-btn svg {
    width: 18px !important; 
    height: 18px !important;
}

/* FDM Kök Levhasındaki SVG Butonlarını Daha Büyük Yap */
.fdm-root-plate .kutu-timer-btn {
    width: 40px !important;
    height: 40px !important;
}
.fdm-root-plate .kutu-list-btn {
    width: 40px !important;
    height: 40px !important;
}
.fdm-root-plate .kutu-timer-btn svg,
.fdm-root-plate .kutu-list-btn svg {
    width: 24px !important;
    height: 24px !important;
}


/* BULUNAN EN SON CSS TASARIMI (list-mode-paper vb.) */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

/* LİSTE MODU */
.thematic-words-grid.list-mode-grid {
    display: block !important;
    direction: ltr;
}

.list-mode-paper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 30px 40px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Caveat', 'Comic Sans MS', cursive;
}

.list-mode-title {
    font-size: 3rem;
    font-weight: normal !important;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #e0e0e0;
}

.list-mode-columns {
    column-count: 2;
    column-gap: 50px;
    column-rule: 1px solid #e0e0e0; /* Ortadaki çizgi */
}

.list-mode-item {
    break-inside: avoid-column;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Sadece hafif bir alt çizgi */
    transition: background 0.2s ease;
}

.list-mode-item:hover {
    background: rgba(0,0,0,0.02); /* Üzerine gelince çok hafif belirginlik */
}

.list-mode.aksam-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.list-mode-num {
    font-size: 1.4rem;
    font-weight: normal !important;
    color: #adb5bd;
    margin-right: 15px;
    flex: 0 0 auto;
}

.list-mode-tr {
    font-size: 1.4rem;
    font-weight: normal !important;
    color: #495057;
    flex: 1;
    text-align: left;
    margin-right: 10px;
}

.list-mode-ar {
    font-size: 2.4rem;
    font-family: 'Arakom', sans-serif !important;
    color: #000;
    flex: 1;
    text-align: right;
    margin-left: 10px;
}

/* TELAFFUZ FILTRE CSS */
.t-filter-chip {
    padding: 8px 16px;
    background: transparent;
    color: #2ecc71;
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid #2ecc71;
    transition: all 0.2s ease;
    font-weight: 600;
}
.desktop-chip {
    padding: 10px 25px !important;
    font-size: 1.5rem !important;
    border-radius: 30px !important;
}
.t-filter-chip.active {
    background: transparent;
    color: #e74c3c !important;
    border-color: #e74c3c !important;
    box-shadow: none;
}
.desktop-chip.active {
    background: #eff6ff;
    color: #3498db;
    border-color: #3498db;
    box-shadow: none;
}
.aksam-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 25px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 12px;
    box-shadow: none !important;
    gap: 10px;
    height: 100%;
}
.aksam-chip::after {
    content: '';
    display: block;
    width: 90px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 8px;
    margin-top: 6px;
    transition: background-color 0.2s ease;
}
.aksam-chip.active {
    background: transparent !important;
    box-shadow: none !important;
}
.aksam-chip.active::after {
    background-color: #e74c3c !important;
}
.aksam-chip.active .aksam-name {
    /* Kept original colors intact for highlighting */
}
.aksam-chip.active .aksam-visual {
    /* Kept original colors intact for highlighting */
}
.aksam-chip .aksam-name {
    font-size: 1.5rem;
    font-weight: 600;
}
.aksam-chip .aksam-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: center;
}
.t-result-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    cursor: pointer;
}
.t-result-ar {
    font-family: 'Arakom', sans-serif;
    font-size: 2rem;
    color: #000;
}
.t-result-tag {
    font-size: 0.8rem;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 5px;
}
