:root {
            --primary: #2980b9;
            --active-btn: #3498db;
            --inactive-btn: #ecf0f1;
            --success: #27ae60;
            --error: #c0392b;
            --text: #2c3e50;
            --bg: #fdfdfd;
            --gap-bg: #f1f2f6;
        }

        body {
            font-family: 'Nunito', sans-serif;
            background-color: var(--bg);
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow-y: auto;
        }

       /* Header ana taşıyıcı */
.header {
    background: #fff;
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    align-items: center; /* Tüm satırı dikeyde ortalar */
    justify-content: space-between;
    height: 70px; /* Header yüksekliğini sabitledik */
    box-sizing: border-box;
}


/* Geri tuşu ve seviye butonları için ortak dikey hizalama */
.back-button-container, .level-nav {
    display: flex;
    align-items: center; /* İçindeki her şeyi dikey ortalar */
    height: 100%;
}

.back-button {
    background: #f1f2f6;
    color: #555;
    border: none;
    border-radius: 12px;
    width: 45px;
    height: 45px;
    text-decoration: none;
    display: flex;
    align-items: center;    /* İkonu dikey ortalar */
    justify-content: center; /* İkonu yatay ortalar */
}
.back-button:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}
/* Sağ tarafta denge sağlamak için görünmez boşluk */
.header-spacer {
    width: 45px;
}

.back-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Seviye butonlarının ortalanmış kalması için ek ayar */
.level-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center; /* Dikeyde tam orta */
    gap: 8px;
    flex-grow: 1;
    height: 100%;
    margin: 0; /* Mevcut margin-bottom: 15px silindi */
    padding: 0 10px;
}

/* Progress bar'ı tüm genişliğe yaymak için */
.header-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}
        

      .nav-btn {
    flex: 1;
    max-width: 170px;
    min-width: 140px;
    height: 45px; /* Geri tuşuyla aynı yükseklik */
    border: none;
    border-radius: 20px;
    background-color: var(--inactive-btn);
    color: #7f8c8d;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;

    /* YAZIYI TAM DİKEY ORTALAYAN KISIM */
    display: flex;
    align-items: center;    /* Dikey ortalama */
    justify-content: center; /* Yatay ortalama */
    line-height: normal;     /* Satır yüksekliği kaymasını önler */
    padding: 15px 25px; 
}


        /* Aktif Seviye Butonu */
        .nav-btn.active {
            background-color: var(--active-btn);
            color: white;
            transform: scale(1.05);
            box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
        }

        .progress-container {
            width: 100%;
            height: 5px;
            background: #eee;
        }

        .progress-bar {
            height: 100%;
            width: 0%;
            background: var(--success);
            transition: width 0.3s ease;
        }

        /* --- SORU ALANI --- */
        .question-area {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            text-align: center;
            overflow-y: auto;
        }

        .arabic-sentence {
            font-family: 'Scheherazade New', serif;
            font-size: clamp(4vh, 6vw, 8vh);
            color: var(--text);
            direction: rtl;
            line-height: 2.2;
            margin-bottom: 4vh;
        }

        .gap-box {
            display: inline-block;
            min-width: 60px;
            background-color: var(--gap-bg);
            color: #95a5a6;
            border-radius: 8px;
            text-align: center;
            padding: 0 10px;
            font-weight: bold;
            transition: all 0.3s;
            cursor: default;
            border: 2px solid transparent; 
        }

        .gap-box.filled {
            background-color: #e8f8f5;
            color: var(--success);
            border: 2px solid var(--success);
            transform: scale(1.1);
        }

        .gap-box.wrong {
            background-color: #fdeaea;
            color: var(--error);
            border: 2px solid var(--error);
            animation: shake 0.4s;
        }

        .turkish-meaning {
            font-size: 4.5vh;
            font-weight: 800;
            color: #34495e;
            background: #fff;
            padding: 20px;
            border-radius: 15px;
            border: 2px solid #eee;
            width: 90%;
            max-width: 1000px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.03);
        }

        /* --- SEÇENEKLER --- */
        .options-wrapper {
            background: #fff;
            border-top: 1px solid #eee;
            padding: 3vh 2vh;
            display: flex;
            justify-content: center;
            padding-bottom: 4vh; /* Buton için alt boşluk */
        }

        .options-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            width: 100%;
            max-width: 500px;
        }

        .opt-btn {
            background: #fff;
            border: 2px solid #e0e0e0;
            border-radius: 15px;
            padding: 10px;
            font-family: 'Scheherazade New', serif;
            font-size: 4.5vh;
            color: var(--text);
            cursor: pointer;
            transition: transform 0.1s, background 0.2s;
            box-shadow: 0 4px 0 #e0e0e0;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .opt-btn:active {
            transform: translateY(4px);
            box-shadow: none;
        }

        /* --- SIRADAKİ BUTONU (SAĞ ALT) --- */
        .next-btn {
            position: fixed;
            bottom: 30px; /* Alttan mesafe */
            right: 30px;  /* Sağdan mesafe */
            transform: scale(0); /* Başlangıçta gizli */
            background: #2c3e50;
            color: #fff;
            padding: 15px 30px;
            border-radius: 50px;
            font-size: 1.2rem;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 100;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .next-btn.show { 
            transform: scale(1); /* Görünür olunca büyür */
        }

        /* Bitiş Ekranı */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(44, 62, 80, 0.98);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: white;
            z-index: 200;
            padding: 20px;
        }
        .modal-overlay.active { display: flex; }
        
        .modal-content {
            text-align: center;
            width: 100%;
            max-width: 400px;
        }

        .modal-btn {
            display: block;
            width: 100%;
            padding: 15px;
            margin: 10px 0;
            background: var(--success);
            border: none;
            color: white;
            font-size: 1.2rem;
            border-radius: 50px;
            cursor: pointer;
        }

        @keyframes shake {
            0% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            50% { transform: translateX(10px); }
            75% { transform: translateX(-10px); }
            100% { transform: translateX(0); }
        }