:root {
    --primary: #4834d4;
    --accent: #686de0;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #2f3542;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--bg);
    margin: 0; padding: 0;
    color: var(--text);
    direction: rtl;
}

.container {
    max-width: 500px; margin: 0 auto;
    min-height: 100vh; padding: 20px; box-sizing: border-box;
}

/* التنقل */
.top-nav {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 20px; animation: fadeIn 0.3s;
}

.back-circle-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--card); border: 1px solid #ddd;
    color: var(--primary); cursor: pointer;
}

/* القائمة */
.main-header { text-align: center; margin-bottom: 25px; }
.question-item {
    background: var(--card); padding: 15px; border-radius: 12px;
    margin-bottom: 10px; display: flex; align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.fab-btn {
    position: fixed; bottom: 30px; left: 30px;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--primary); color: white; border: none;
    font-size: 1.5rem; cursor: pointer; box-shadow: 0 5px 15px rgba(72,52,212,0.4);
}

/* الخانات */
.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: bold; color: var(--primary); }
input, textarea {
    width: 100%; padding: 12px; border: 2px solid #edeff2;
    border-radius: 10px; box-sizing: border-box; font-size: 1rem;
}

/* واجهة التمرين */
.full-text-display {
    background: #fff; padding: 20px; border-radius: 15px;
    line-height: 2.5; font-size: 1.1rem; text-align: justify;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.word-gap {
    display: inline-block; min-width: 60px;
    border-bottom: 2px solid var(--primary); margin: 0 5px;
    text-align: center; color: transparent;
}

.word-gap.filled { color: var(--primary); font-weight: bold; border-bottom-color: #27ae60; }

.words-pool {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin-top: 25px;
}

.word-card {
    padding: 10px 15px; background: #fff; border: 2px solid var(--primary);
    border-radius: 8px; cursor: pointer; font-weight: bold;
}

.primary-btn {
    width: 100%; padding: 15px; background: var(--primary);
    color: white; border: none; border-radius: 12px; cursor: pointer;
}

.hidden { display: none !important; }

.modal {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center;
}
.modal-content { background: #fff; padding: 30px; border-radius: 20px; text-align: center; }
