:root {
    --primary-color: #6c63ff;
    --secondary-color: #ff6584;
    --correct-color: #4caf50;
    --wrong-color: #f44336;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #2d3748;
    --bg-gradient: linear-gradient(135deg, #6c63ff 0%, #ff6584 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image:
            radial-gradient(circle at 10% 20%, rgba(108, 99, 255, 0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 80%, rgba(255, 101, 132, 0.1) 0%, transparent 20%);
}

.quiz-container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quiz-header {
    padding: 25px;
    background: var(--bg-gradient);
    color: white;
    text-align: center;
    position: relative;
}

.quiz-header h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.quiz-header i {
    margin-left: 10px;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    background-color: white;
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-body {
    padding: 30px;
}

#question {
    font-size: 1.4rem;
    margin-bottom: 30px;
    line-height: 1.5;
    color: var(--dark-color);
    font-weight: 600;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.answer-btn {
    background-color: var(--light-color);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    color: var(--text-color);
}

.answer-btn:hover {
    background-color: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.answer-btn.correct {
    background-color: var(--correct-color);
    color: white;
    border-color: var(--correct-color);
}

.answer-btn.wrong {
    background-color: var(--wrong-color);
    color: white;
    border-color: var(--wrong-color);
}

.feedback {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-right: 4px solid var(--primary-color);
}

.feedback i {
    margin-left: 10px;
    color: var(--primary-color);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #e2e8f0;
}

.next-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.next-btn:hover {
    background-color: #5a52e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.next-btn i {
    margin-right: 8px;
}

.score {
    font-weight: 600;
    color: var(--dark-color);
}

.score span {
    color: var(--primary-color);
    font-weight: 700;
}

@media (max-width: 480px) {
    .quiz-header h1 {
        font-size: 1.4rem;
    }

    #question {
        font-size: 1.2rem;
    }

    .answer-btn {
        padding: 12px;
        font-size: 1rem;
    }
}


/* تأثيرات الاحتفال */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    display: none;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0;
    animation: confetti-fall 3s ease-in-out forwards;
}

.flower {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    animation: flower-fall 4s ease-in forwards, flower-rotate 4s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes flower-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes flower-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* أنماط شاشة اختيار الصعوبة */
.difficulty-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6c63ff 0%, #ff6584 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.difficulty-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
}

.difficulty-container h1 {
    color: #6c63ff;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.difficulty-btn {
    background: white;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c63ff;
    font-weight: 600;
    border: 2px solid #6c63ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.difficulty-btn:hover {
    background: #6c63ff;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.difficulty-btn i {
    font-size: 1.2rem;
}

.difficulty-display {
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #6c63ff;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

/* إضافة أنماط جديدة */
.difficulty-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.difficulty-selector h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

.difficulty-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.difficulty-btn {
    background-color: #edf2f7;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.difficulty-btn:hover {
    background-color: #e2e8f0;
}

.difficulty-btn.active {
    background-color: #6c63ff;
    color: white;
    border-color: #6c63ff;
}

.continue-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.continue-btn:hover {
    background-color: #3e8e41;
    transform: translateY(-2px);
}

.answer-btn.selected {
    transform: scale(1.03);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.5);
}

.answer-btn.disabled {
    opacity: 0.7;
    pointer-events: none;
}