﻿/* العنوان */
.game-title {
    text-align: center;
    font-size: 2.8rem;
    color: #7b1fa2;
    margin-bottom: 25px;
    font-weight: bold;
}

/* الحاوية الرئيسية للمعلومات */
.word-info-box {
    background-color: #fff8dc;
    padding: 20px 25px;
    margin: auto;
    margin-bottom: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
}

/* التعليمات */
.instruction {
    font-size: 1.6rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* الحرف */
.target-letter {
    display: inline-block;
    background-color: #fff7ed;
    padding: 14px 22px;
    font-size: 2.6rem;
    font-weight: bold;
    color: #e91e63;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
}

/* الوقت والمستوى */
.stats {
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #4b5563;
    margin-bottom: 20px;
}

    .stats strong {
        color: #dc2626;
        font-size: 1.6rem;
        font-weight: bold;
    }

/* شبكة الصور */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

/* كرت الصورة */
.option-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: bounceIn 0.5s ease;
}

    .option-card:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

/* الصور */
.option-image {
    width: 160px;
    height: auto;
    border-radius: 12px;
    border: 4px solid #fbbf24;
}

/* البوب أب */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    animation: popupFade 0.3s ease-in-out;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.popup-correct {
    border: 3px solid #4caf50;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.popup-wrong {
    border: 3px solid #f44336;
    background-color: #ffebee;
    color: #c62828;
}

.popup-image {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}



/* زر التالي */
.close-popup {
    background-color: #2196f3;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .close-popup:hover {
        background-color: #1976d2;
    }

/* تأثيرات */
@keyframes popupFade {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* وميض عند اقتراب الوقت من الانتهاء */
.blink {
    animation: blinkEffect 0.7s infinite alternate;
}

@keyframes blinkEffect {
    0% {
        background-color: #fff7ed;
        color: #dc2626;
    }

    100% {
        background-color: #dc2626;
        color: #ffffff;
    }
}

/* ميديا للجوال */
@media (max-width: 600px) {
    .option-image {
        width: 120px;
    }

    .target-letter {
        font-size: 2.2rem;
    }

    .instruction {
        font-size: 1.6rem;
        font-weight: bold;
        color: #333;
        margin-bottom: 10px;
        text-align: center; /* ✅ هذه تضبط النص في المنتصف */
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }


    .stats {
        font-size: 1.2rem;
    }

    .close-popup {
        font-size: 1rem;
        padding: 8px 18px;
    }
}

.instruction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.instruction-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center;
}


.letter-box-container {
    text-align: center;
    margin-bottom: 25px;
}

.letter-instruction {
    font-size: 1.7rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 12px;
}

.letter-box {
    display: inline-block;
    background-color: #ffcc80; /* ✅ أخضر فاتح */
    color: limegreen; /* ✅ أخضر غامق للحرف */
    font-size: 3.5rem;
    font-weight: bold;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}
