@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;700&display=swap');
:root {
    --background-color: #121212; --surface-color: #1e1e1e; --primary-text: #FFFFFF; --secondary-text: #b0b0b0;
    --accent-color: #007BFF; --correct-color: #28a745; --wrong-color: #dc3545;
    --purple-accent: #8A2BE2; --green-accent: #28a745;
}
body {
    font-family: 'Noto Kufi Arabic', sans-serif; background-color: var(--background-color); color: var(--primary-text);
    display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; margin: 0; direction: rtl;
}
.quiz-container {
    background-color: var(--surface-color); width: 100%; max-width: 600px; border-radius: 20px;
    padding: 30px 40px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); text-align: center; position: relative; overflow: hidden;
}
.screen { display: none; animation: fadeIn 0.5s; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
h1 { font-size: 2.2em; color: var(--accent-color); margin-bottom: 10px; }
.description { font-size: 1.2em; color: var(--secondary-text); margin-bottom: 30px; }
.btn { background-color: var(--accent-color); color: white; border: none; padding: 15px 30px; font-size: 1.1em; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; width: 100%; margin-top: 10px; }
.btn:hover { background-color: #0056b3; transform: translateY(-3px); }
.btn.secondary-btn { background-color: #444; }
.btn.secondary-btn:hover { background-color: #555; }
.btn.wrong-btn { background-color: var(--wrong-color); }
.btn.wrong-btn:hover { background-color: #b21f2d; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 1.1em; color: var(--secondary-text); }
#question-text { font-weight: 700; margin-bottom: 30px; line-height: 1.3; transition: font-size 0.3s ease; }
.font-large { font-size: 2.5em; }
.font-medium { font-size: 1.8em; }
.font-small { font-size: 1.3em; }
.options-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.option { background-color: #2c2c2c; border: 2px solid #444; color: var(--primary-text); padding: 15px; font-size: 1.1em; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; }
.option:hover:not([disabled]) { background-color: #3a3a3a; border-color: var(--accent-color); }
.option.correct { background-color: var(--correct-color) !important; border-color: #1e7e34 !important; color: white; }
.option.wrong { background-color: var(--wrong-color); border-color: #b21f2d; color: white; }
.option:disabled { cursor: not-allowed; }
.hide { display: none; }
.final-score-text { font-size: 1.4em; color: var(--secondary-text); }
.final-score-value { font-size: 4em; font-weight: 700; color: var(--accent-color); margin: 10px 0; }
.feedback { font-size: 1.2em; margin-top: 15px; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background-color: var(--surface-color); padding: 30px; border-radius: 15px; width: 90%; max-width: 600px; box-shadow: 0 5px 20px rgba(0,0,0,0.5); border-top: 5px solid var(--accent-color); }
.modal-header { margin-top: 0; margin-bottom: 25px; }
.question-list { margin: 20px 0; max-height: 50vh; overflow-y: auto; padding-right: 10px; text-align: right; }
.question-manage-item { display: flex; justify-content: space-between; align-items: center; background-color: #2c2c2c; padding: 15px; border-radius: 8px; margin-bottom: 10px; }
.question-manage-item p { margin: 0; font-size: 1.1em; }
.question-manage-item .actions { display: flex; gap: 15px; }
.question-manage-item .actions i { cursor: pointer; font-size: 1.2em; transition: color 0.2s; }
.edit-icon:hover { color: var(--accent-color); }
.delete-icon:hover { color: var(--wrong-color); }
.form-group { margin-bottom: 15px; text-align: right; }
.form-group label { display: block; margin-bottom: 8px; font-size: 1em; }
.form-group input, .form-group select { width: 100%; padding: 12px; box-sizing: border-box; border-radius: 8px; border: 1px solid #444; background-color: #2a2a2a; color: var(--primary-text); }
.options-edit-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.form-actions { margin-top: 25px; display: flex; gap: 10px; }
.form-actions button { flex: 1; }
.admin-only { display: none !important; }
body.admin-mode .admin-only { display: block !important; }
.error-text { color: var(--wrong-color); margin-top: 10px; min-height: 1.2em; display: none; }
#paste-area { width: 100%; height: 200px; background-color: #2a2a2a; color: var(--primary-text); border: 1px solid #444; border-radius: 8px; padding: 10px; font-size: 1em; direction: ltr; text-align: left; margin-bottom: 15px; box-sizing: border-box; }
.upload-log { background-color: #111; color: #ccc; height: 100px; overflow-y: auto; border-radius: 5px; padding: 10px; font-size: 0.8em; text-align: left; direction: ltr; display: none; margin-bottom: 15px; box-sizing: border-box; }