﻿.page-title {
    margin-top: 100px;
    text-align: center;
    font-size: 28px;
    color: #6a1b9a;
    font-family: 'Cairo', sans-serif;
    margin-bottom: 30px;
}

/* ✅ أزرار التبديل */
.toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.toggle-btn {
    padding: 12px 24px;
    background-color: #ffe082;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

    .toggle-btn.active {
        background-color: #ff9800;
        color: white;
    }

.basics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 0 20px;
    max-width: 1000px;
    margin: auto;
}


.basic-card {
    background-color: #fff8e1;
    border: 2px dashed #ffcc80;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    cursor: pointer;
}


    .basic-card:hover {
        transform: scale(1.05);
    }

.symbol-text {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.basic-image {
    max-width: 80px;
    height: auto;
    margin: 12px auto;
}


.type-text {
    font-size: 14px;
    color: #555;
}


.motivation-popup {
    margin-top: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #388e3c;
    background-color: #e8f5e9;
    border: 2px solid #66bb6a;
    padding: 12px 18px;
    border-radius: 12px;
    animation: fadeInOut 2.5s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    20% {
        opacity: 1;
        transform: scale(1);
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

.symbol-display {
    font-size: 2.8rem;
    font-weight: bold;
    color: #6a1b9a;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
}

    .symbol-display .lower {
        font-size: 1.4rem;
        color: #555;
        margin-left: 8px;
    }

.word-text {
    font-size: 1.2rem;
    color: #444;
    font-weight: bold;
    margin-top: 10px;
}

.symbol-pair {
    font-size: 2.5rem;
    font-weight: bold;
    color: #6a1b9a;
    text-align: center;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
}

.sound-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    margin-left: 10px;
    cursor: pointer;
    color: #2196f3;
    transition: transform 0.2s ease;
}

    .sound-btn:hover {
        transform: scale(1.2);
    }

.word-text .highlight-letter {
    color: red;
}

.basic-card.animate {
    animation: pulseCard 0.6s ease;
}

@keyframes pulseCard {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}


.fullscreen-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.8);
    z-index: 9999;
    background-color: #fff8e1;
    border: 4px solid #ffcc80;
    border-radius: 20px;
    padding: 20px;
    width: 90vw; /* مناسب للهاتف */
    max-width: 320px; /* لا يتجاوز هذا العرض */
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
}


.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px); /* ✅ هذا هو التأثير المطلوب */
    z-index: 9998;
}


.scale-in {
    animation: zoomInOnly 0.4s forwards;
}

.scale-out {
    animation: zoomOutOnly 0.4s forwards;
}

@keyframes zoomInOnly {
    from {
        transform: translate(-50%, -50%) scale(0.7);
    }

    to {
        transform: translate(-50%, -50%) scale(1.8);
    }
}

@keyframes zoomOutOnly {
    from {
        transform: translate(-50%, -50%) scale(1.8);
    }

    to {
        transform: translate(-50%, -50%) scale(1.4);
    }
}

@keyframes shakeLight {
    0% {
        transform: translate(-50%, -50%) scale(1.8) rotate(0deg);
    }

    20% {
        transform: translate(-50%, -50%) scale(1.8) rotate(1deg);
    }

    40% {
        transform: translate(-50%, -50%) scale(1.8) rotate(-1deg);
    }

    60% {
        transform: translate(-50%, -50%) scale(1.8) rotate(1deg);
    }

    80% {
        transform: translate(-50%, -50%) scale(1.8) rotate(-1deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8) rotate(0deg);
    }
}

.shake-light {
    animation: shakeLight 0.6s ease-in-out;
}


.scale-out-smooth {
    animation: zoomOutSmooth 0.6s forwards;
}

.fade-out-smooth {
    animation: fadeOutSmooth 0.6s forwards;
}

@keyframes zoomOutSmooth {
    from {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

@keyframes fadeOutSmooth {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


/* ... باقي التنسيقات الحالية ... */

.symbol-number {
    font-size: 3.5rem;
    font-weight: bold;
    color: #0288d1; /* أزرق ممتع */
    background-color: #e1f5fe; /* خلفية خفيفة زرقاء */
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: inline-block;
    transition: transform 0.3s ease;
}

    .symbol-number:hover {
        transform: scale(1.05);
        background-color: #b3e5fc;
        color: #01579b;
    }



.number-activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1000px;
    margin: auto;
}

.activity-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff; /* خلفية أساسية */
    height: 200px;
}

    .activity-card:hover {
        transform: scale(1.04);
    }

.activity-image {
    width: 300%;
    height: 300%;
    object-fit: contain; /* ✅ مناسب لصورة شفافة PNG */
    display: block;
    padding: 10px; /* ✅ عشان تبعد عن الحواف قليلاً */
}

.activity-label {
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #6a1b9a;
    font-family: 'Cairo', sans-serif;
    text-align: center;
}


/* ✅ النص يظهر فوق الصورة */
.activity-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    text-align: center;
    padding: 8px 0;
}


/* ===== زر عائم لفتح الدرج ===== */
.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
    }

.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;
}

@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
}

/* ===== رسائل الحالة (لو حاب نفس الستايل) ===== */
.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.15rem;
    font-weight: 600;
}

/* موبايل */
@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;
    }
}
