﻿.title {
    text-align: center;
    font-size: 2.8rem;
    color: #7b1fa2;
    margin-bottom: 25px;
    font-weight: bold;
}

/* الحاوية الرئيسية */
.choose-container {
    max-width: 800px;
    margin: auto;
    padding: 30px 20px;
    text-align: center;
    background-color: #fffdf0;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

/* الكلمة */
.target-word {
    font-size: 4rem; /* ⬅️ أكبر */
    font-weight: bold;
    color: #f97316;
    background-color: #fff7ed;
    padding: 16px 30px;
    border-radius: 20px;
    display: inline-block;
    margin: 15px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* تأثير بسيط لجذب الانتباه */
}


/* التعليمات */
.instruction {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

/* زر الصوت */
.btn-sound {
    background-color: #3b82f6;
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease;
}

    .btn-sound:hover {
        background-color: #2563eb;
    }

/* شبكة الصور */
.images-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.image-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

    .image-card:hover {
        transform: scale(1.1);
    }

.image-option {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border: 4px solid #f59e0b;
    border-radius: 20px;
    background-color: #fff8e1;
    padding: 10px;
}

/* الكلمة تحت الصورة */
.word-label {
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #444;
}

/* الإحصائيات */
.stats {
    margin-top: 30px;
    font-size: 1.2rem;
    color: #4b5563;
}

/* النافذة المنبثقة */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    animation: popupFade 0.3s ease-in-out;
}

.popup-correct {
    border: 3px solid #4caf50;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.popup-wrong {
    border: 3px solid #f44336;
    background-color: #ffebee;
    color: #c62828;
}

.popup-image {
    width: 100px;
    margin: 15px 0;
    animation: pulse 1s infinite;
}

.close-popup {
    background-color: #3b82f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

    .close-popup:hover {
        background-color: #2563eb;
    }

/* رسالة لا توجد واجبات */
.no-data {
    display: block; /* يخليها عنصر بلوك */
    text-align: center; /* يوسّط النص */
    margin: 30px auto; /* يوسّطها أفقياً */
    padding: 14px 20px;
    background: #fff5f5;
    color: #b91c1c;
    border: 1px dashed #ef4444;
    border-radius: 12px;
    max-width: 400px; /* حجم مناسب في النص */
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== زر عائم لفتح الدرج ===== */
.filters-fab {
    position: fixed;
    right: 16px;
    top: 120px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: #7b1fa2;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
    cursor: pointer;
    z-index: 60;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

    .filters-fab:hover {
        transform: translateY(-2px);
        background: #6a1b9a;
        box-shadow: 0 14px 26px rgba(0,0,0,.22);
    }

/* ===== درج جانبي ===== */
.filters-drawer {
    position: fixed;
    top: 90px;
    right: 16px;
    width: 300px;
    max-width: calc(100% - 32px);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(0,0,0,.12);
    padding: 14px;
    transform: translateX(120%);
    transition: transform .25s ease;
    z-index: 70;
}

    .filters-drawer.open {
        transform: translateX(0);
    }

/* رأس الدرج */
.filters-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filters-panel__title {
    font-weight: 800;
    color: #6b21a8;
    font-size: 1.05rem;
}

.filters-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #9ca3af;
}

    .filters-close:hover {
        color: #6b7280;
    }

/* select */
.filters-drawer select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fafafa;
    padding: 8px 10px;
    font-size: .98rem;
    outline: none;
    direction: rtl;
}

    .filters-drawer select:focus {
        border-color: #7b1fa2;
        box-shadow: 0 0 0 3px rgba(123,31,162,.12);
    }

/* طبقة تعتيم */
.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.25);
    z-index: 65;
}

/* Hint */
.filters-hint {
    position: fixed;
    right: 76px;
    top: 115px;
    background: #111827;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,.22);
    z-index: 61;
    cursor: pointer;
    animation: hint-pop .2s ease-out, hint-pulse 1.4s ease-in-out infinite .15s;
}

.filters-hint__text {
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
}

.filters-hint__arrow {
    position: absolute;
    right: -8px;
    top: 14px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #111827;
}

/* Animations */
@keyframes hint-pop {
    from {
        transform: scale(.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes hint-pulse {
    0%,100% {
        box-shadow: 0 12px 24px rgba(0,0,0,.22);
    }

    50% {
        box-shadow: 0 16px 28px rgba(0,0,0,.28);
    }
}

/* موبايل */
@media (max-width:768px) {
    .filters-fab {
        bottom: 18px;
        top: auto;
        right: 18px;
    }

    .filters-drawer {
        right: 12px;
        left: 12px;
        width: auto;
        top: auto;
        bottom: 84px;
    }

    .filters-hint {
        right: 20px;
        bottom: 148px;
        top: auto;
    }

    .filters-hint__arrow {
        right: 14px;
        bottom: -8px;
        top: auto;
        border-left-color: transparent;
        border-top: 8px solid #111827;
        border-right: 8px solid transparent;
        border-bottom: 0;
    }
}


/* ===== Overlay تحميل في المنتصف ===== */
.page-loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17,24,39,.08); /* تعتيم خفيف */
    backdrop-filter: blur(2px);
    z-index: 120; /* أعلى من الدرج/الـoverlay */
}

.loader-box {
    background: #fff;
    padding: 18px 22px;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    text-align: center;
    min-width: 260px;
}

/* السبنّر */
.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #7b1fa2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    from {
        transform: rotate(0)
    }

    to {
        transform: rotate(360deg)
    }
}

/* نص التحميل */
.loading-text {
    margin: 0;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.98rem;
}


/* اختياري: يقرّبها من منتصف الشاشة عموديًا شوية */
@media (min-height: 700px) {
    .no-data {
        margin: 12vh auto;
    }
}


@keyframes popupFade {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}
