:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --danger: #ff7675;
    --bg: #f0f3f7;
    --text: #2d3436;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg);
    margin: 0; padding: 15px;
    display: flex; justify-content: center;
    color: var(--text);
}

.container {
    max-width: 500px; width: 100%;
    background: #fff; padding: 25px;
    border-radius: 25px; box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.screen { transition: 0.3s; }
.hidden { display: none !important; }

h1, h2 { text-align: center; color: var(--primary); }

/* قائمة الأسئلة */
.question-item {
    background: #fdfdfd; border: 1px solid #eee;
    padding: 15px; border-radius: 15px; margin-bottom: 12px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.question-text { cursor: pointer; font-weight: 600; flex: 1; margin-left: 10px; }

/* الأزرار */
.primary-btn {
    width: 100%; padding: 15px; background: var(--primary);
    color: white; border: none; border-radius: 12px;
    font-size: 1.1rem; cursor: pointer; transition: 0.2s;
}

.secondary-btn {
    width: 100%; padding: 10px; background: none;
    border: 2px solid #ddd; border-radius: 12px;
    margin-top: 10px; cursor: pointer;
}

.delete-btn { color: var(--danger); background: none; border: none; cursor: pointer; font-size: 1.1rem; }

/* منطقة الكلمات */
.answer-box {
    min-height: 100px; border: 2px dashed var(--secondary);
    border-radius: 15px; margin: 20px 0; padding: 10px;
    display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
}

.words-container {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}

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

.correct-tag {
    background: #e8eaf6; color: var(--primary);
    padding: 8px 12px; border-radius: 8px; animation: pop 0.3s ease;
}

@keyframes pop { 0% {transform: scale(0.8);} 100% {transform: scale(1);} }

/* Modal */
.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; z-index: 1000;
}

.modal-content { background: #fff; padding: 30px; border-radius: 25px; text-align: center; max-width: 80%; }
.success-icon { font-size: 4rem; margin-bottom: 10px; }
