﻿/* 🟣 عنوان */
.flash-title {
    text-align: center;
    font-size: 2.6rem;
    color: #7b1fa2;
    margin: 20px 0 30px;
    font-weight: 800;
    letter-spacing: .5px
}

/* الحاوية */
.card-container {
    background: #fffdf6;
    padding: 30px 25px;
    border-radius: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    max-width: 700px;
    margin: auto;
    transition: .3s ease;
    text-align: center
}

/* ✅ تكديس المحتوى عمودياً ومركزي */
.flash-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px
}

/* الصورة */
.flash-image {
    display: block;
    width: min(340px,80vw);
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 18px;
    border: 5px solid #fbc02d;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    margin: 0 auto 6px
}

    .flash-image.placeholder {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 52px;
        background: #fff7ed;
        color: #f59e0b
    }

/* الكلمة الإنجليزية (LTR) */
.flash-word {
    direction: ltr;
    font-size: 2.4rem;
    font-weight: 800;
    color: #f97316;
    background: #fff7ed;
    padding: 10px 22px;
    border-radius: 18px;
    display: inline-block;
    margin: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,.05);
    letter-spacing: .5px
}

/* الترجمة العربية (RTL) */
.flash-translation {
    direction: rtl;
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    padding: 8px 18px;
    border-radius: 12px;
    display: inline-block;
    margin: 2px 0 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05)
}

/* أزرار */
.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px
}

.flash-btn {
    padding: 12px 22px;
    font-size: 1.05rem;
    font-weight: 700;
    border: 0;
    border-radius: 50px;
    cursor: pointer;
    transition: all .25s;
    color: #fff
}

    .flash-btn.sound {
        background: #3b82f6
    }

        .flash-btn.sound:hover {
            background: #2563eb
        }

    .flash-btn.translate {
        background: #ec4899
    }

        .flash-btn.translate:hover {
            background: #db2777
        }

    .flash-btn.next {
        background: #22c55e
    }

        .flash-btn.next:hover {
            background: #16a34a
        }

    .flash-btn.random {
        background: #f59e0b
    }

        .flash-btn.random:hover {
            background: #d97706
        }

/* التقدم */
.progress {
    margin-top: 18px;
    font-size: 1rem;
    color: #4b5563;
    background: #f3f4f6;
    padding: 8px 14px;
    border-radius: 12px;
    display: inline-block
}

/* لا يوجد بيانات */
.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: 420px;
    font-size: 1.05rem;
    font-weight: 700
}

/* زر عائم + درج + Hint + Overlay تحميل (كما هي) */
.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,box-shadow .2s,background .2s
}

    .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;
    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
    }

.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
}

.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-right: 8px solid transparent;
    border-left: 8px solid #111827
}

@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)
    }
}

/* 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
}

.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: .98rem
}

/* موبايل */
@media (max-width:768px) {
    .flash-word {
        font-size: 2rem
    }

    .flash-translation {
        font-size: 1.25rem
    }

    .filters-fab {
        bottom: 18px;
        top: auto;
        right: 18px
    }

    .filters-drawer {
        right: 12px;
        left: 12px;
        width: auto;
        top: auto;
        bottom: 84px
    }
}
