/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f, #4CAF50, #2196F3, #9c27b0);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    z-index: 1;
}

/* الشاشات */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* شاشة الترحيب */
.welcome-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px 20px;
    margin: 50px auto;
    max-width: 800px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

memory/* تنسيق صورة الغلاف */
.cover-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
}

.cover-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ff6b35;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #333;
    margin-bottom: 20px;
}

.description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* العناصر العائمة */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    50% { transform: translateY(-30px) rotate(-5deg); }
    75% { transform: translateY(-15px) rotate(3deg); }
}

/* الأزرار */
.start-btn, .back-btn, .play-again-btn, .next-level-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-transform: none;
}

.start-btn:hover, .play-again-btn:hover, .next-level-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.back-btn {
    background: linear-gradient(45deg, #ff6b35, #e55a2b);
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

/* شاشة اختيار المستوى */
.level-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px 20px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #333;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.level-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
    margin-bottom: 30px;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.level-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 20px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f, #4CAF50, #2196F3, #9c27b0);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.level-card:hover::before {
    opacity: 0.1;
}

.level-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: #4CAF50;
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.level-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 8px;
}

.level-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.level-topics {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.4;
    background: rgba(76, 175, 80, 0.1);
    padding: 10px;
    border-radius: 10px;
}

/* شاشة اللعبة */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.level-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.level-info span {
    font-weight: bold;
    color: #333;
}

#current-level {
    font-size: 1.2rem;
    color: #4CAF50;
}

#current-game {
    font-size: 1rem;
    color: #666;
}

.progress-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    margin: 0 20px;
}

.progress-container {
    width: 100%;
    max-width: 300px;
    height: 12px;
    background: #f1f1f1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

#score-display {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.home-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.home-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.game-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    min-height: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* شاشة النتائج */
.results-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px 20px;
    margin: 50px auto;
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#results-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #4CAF50;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.results-stars {
    font-size: 3rem;
    margin: 20px 0;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.results-details {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}

.score-item:last-child {
    border-bottom: none;
}

.encouragement-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin: 20px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* أنماط الألعاب */
.question-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.question-image {
    max-width: 300px;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
}

.question-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #333;
    margin: 15px 0;
    font-weight: bold;
}

.question-text-en {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #666;
    margin: 10px 0;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-style: normal;
}

.speak-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.speak-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.speak-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.speak-btn.speaking {
    animation: pulse 1s infinite;
    background: linear-gradient(45deg, #ff6b35, #e55a2b);
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 30px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.option-btn {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: #4CAF50;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.option-btn:disabled {
    cursor: not-allowed;
    transform: none;
}

.letter-option {
    font-size: 3rem;
    font-weight: bold;
    min-height: 100px;
}

.color-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.number-option {
    font-size: 1.4rem;
}

.progress-text {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin: 20px 0;
    font-weight: bold;
}

.visual-count {
    background: #f0f8ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    border: 2px solid #e3f2fd;
    text-align: center;
    word-wrap: break-word;
    line-height: 1.2;
}

.color-display {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.color-display:hover {
    transform: scale(1.05);
}

.emoji-display {
    animation: bounce 2s infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.emoji-display:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* أنماط خاصة بكل لعبة */
.alphabet-game h2,
.colors-game h2,
.numbers-game h2,
.generic-game h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #333;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* تأثيرات الإجابة الصحيحة والخاطئة */
.correct-answer {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    color: white !important;
    border-color: #4CAF50 !important;
    animation: correctPulse 0.6s ease;
}

.wrong-answer {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
    color: white !important;
    border-color: #f44336 !important;
    animation: wrongShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* تجاوب الشاشات الصغيرة */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }

    .screen {
        padding: 10px;
    }

    .welcome-content, .level-content, .results-content {
        margin: 10px auto;
        padding: 20px 15px;
    }

    .levels-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .progress-info {
        margin: 10px 0;
    }

    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    .start-btn, .back-btn, .play-again-btn, .next-level-btn {
        width: 100%;
        max-width: 300px;
    }

    .options-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .question-image {
        max-width: 250px;
        height: 150px;
    }

    .speak-container {
        flex-direction: column;
        align-items: center;
    }

    .speak-btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .floating-element {
        font-size: 1.5rem;
    }

    .level-card {
        padding: 20px 15px;
    }

    .level-icon {
        font-size: 2.5rem;
    }

    .game-content {
        padding: 20px 15px;
    }

    .question-container {
        padding: 15px;
    }

    .question-image {
        max-width: 200px;
        height: 120px;
    }

    .letter-option {
        font-size: 2rem;
        min-height: 80px;
    }

    .visual-count {
        font-size: 1.8rem;
        padding: 15px;
        max-width: 300px;
        line-height: 1.1;
    }

    .emoji-display {
        font-size: 3rem !important;
    }

    .question-text {
        font-size: 1.3rem !important;
    }

    .question-text-en {
        font-size: 1.1rem !important;
    }
}

/* أنماط لعبة التوصيل */
.matching-game {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.matching-game * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.game-instruction {
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    margin: 10px 0;
    font-weight: bold;
}

.game-instruction-en {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.matching-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
    min-height: 400px;
}

.words-column, .images-column {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.words-column h3, .images-column h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.clickable-words {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.clickable-word {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.clickable-word:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.clickable-word:active {
    transform: translateY(-1px);
}

.clickable-word.selected {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.word-en {
    font-size: 1.1rem;
    font-weight: bold;
}

.word-ar {
    font-size: 1rem;
    opacity: 0.9;
}



.click-zones {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.click-zone {
    background: rgba(255, 255, 255, 0.9);
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 15px;
    min-height: 120px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.click-zone:hover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.02);
}

.click-zone.correct-match {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(69, 160, 73, 0.2));
    animation: correctMatch 0.6s ease;
}

@keyframes correctMatch {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.family-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.family-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
}

.image-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}



.clickable-word.matched {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    cursor: default;
    transform: none;
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 8px 12px;
    border: none;
}

.game-progress {
    text-align: center;
    margin-top: 30px;
}

.progress-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 10px;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 400px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.shake-animation {
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* تجاوب مع الشاشات الصغيرة للعبة التوصيل */
@media (max-width: 768px) {
    .matching-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .clickable-word {
        padding: 12px;
        font-size: 0.9rem;
    }

    .click-zone {
        min-height: 100px;
        padding: 10px;
    }

    .family-image {
        width: 50px;
        height: 50px;
    }
}

/* أنماط لعبة التلوين */
.coloring-game {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.coloring-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
    align-items: start;
}

.shape-info {
    text-align: center;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.shape-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
}

.shape-name {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.coloring-area {
    text-align: center;
}

.image-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.coloring-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coloring-image:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.clickable-image {
    cursor: pointer;
}

.shape-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

#coloring-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 3px solid #dee2e6;
    border-radius: 15px;
    cursor: default;
    transition: all 0.3s ease;
    background: white;
}

#coloring-image.clickable-image {
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#coloring-image:hover {
    border-color: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

@keyframes coloringSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

.coloring-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

.color-palette {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.color-palette h4 {
    text-align: center;
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.colors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.color-btn {
    width: 100%;
    height: 60px;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.color-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #4CAF50;
}

.color-btn.selected {
    border-color: #4CAF50;
    border-width: 4px;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.color-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.color-name {
    font-size: 0.9rem;
    text-align: center;
}

.coloring-progress {
    text-align: center;
    margin-top: 30px;
}

/* تجاوب مع الشاشات الصغيرة للعبة التلوين */
@media (max-width: 768px) {
    .coloring-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #coloring-image {
        max-width: 250px;
    }

    .colors-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .color-btn {
        height: 50px;
        font-size: 0.8rem;
    }

    .shape-emoji {
        font-size: 3rem;
    }
}

/* أنماط لعبة ترتيب الأرقام */
.sequence-game {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.sequence-game * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.sequence-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin: 30px 0;
}

.numbers-pool {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.numbers-pool h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.clickable-numbers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.clickable-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.clickable-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.clickable-number:active {
    transform: translateY(-1px);
}

.clickable-number.selected {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.number-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.number-word {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 5px;
}



.sequence-line {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.sequence-line h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.sequence-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.sequence-slot {
    background: rgba(255, 255, 255, 0.9);
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 15px;
    min-height: 80px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.sequence-slot:hover {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.02);
}



.sequence-slot.correct-position {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    animation: correctPosition 0.6s ease;
}

.sequence-slot.incorrect-position {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.2);
    animation: incorrectPosition 0.6s ease;
}

.sequence-slot.final-correct {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(69, 160, 73, 0.3));
}

.sequence-slot.final-incorrect {
    border-color: #f44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3), rgba(211, 47, 47, 0.3));
}

@keyframes correctPosition {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectPosition {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.slot-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 5px;
}



.placed-number {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    cursor: default;
    transform: none;
    margin: 0;
    padding: 8px;
    font-size: 0.9rem;
}

.sequence-progress {
    text-align: center;
    margin-top: 30px;
}

.check-sequence-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.check-sequence-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.check-sequence-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* تجاوب مع الشاشات الصغيرة للعبة ترتيب الأرقام */
@media (max-width: 768px) {
    .sequence-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sequence-slots {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }

    .sequence-slot {
        min-height: 60px;
        padding: 8px;
    }

    .clickable-numbers {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }

    .clickable-number {
        padding: 8px;
        font-size: 0.8rem;
    }

    .number-value {
        font-size: 1.2rem;
    }
}

/* أنماط لعبة الذاكرة */
.memory-game {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.memory-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 15px;
    border: 2px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 1rem;
    color: #6c757d;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
}

.stat-total {
    font-size: 1.2rem;
    color: #6c757d;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
    perspective: 1000px;
}

.memory-card {
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.memory-card:hover {
    transform: scale(1.05);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 12px;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
    padding: 10px;
}

.card-question {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-emoji {
    font-size: 2.5rem;
}

.card-image img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.card-word {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.word-en {
    font-size: 1.2rem;
    font-weight: bold;
}

.word-ar {
    font-size: 1rem;
    opacity: 0.9;
}

.card-speak-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.card-speak-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.memory-card.matched .card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .card-back {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    animation: matchSuccess 0.8s ease;
}

.memory-card.game-complete {
    animation: gameComplete 1s ease infinite alternate;
}

@keyframes matchSuccess {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(180deg) scale(1); }
}

@keyframes gameComplete {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.memory-progress {
    text-align: center;
    margin-top: 30px;
}

/* أنماط زر مستعد للعب */
.memory-controls {
    text-align: center;
    margin: 20px 0;
}

.start-game-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.start-game-btn:active {
    transform: translateY(-1px);
}

/* تجاوب مع الشاشات الصغيرة للعبة الذاكرة */
@media (max-width: 768px) {
    .memory-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .memory-stats {
        gap: 20px;
        padding: 10px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .card-question {
        font-size: 2rem;
    }

    .card-emoji {
        font-size: 2rem;
    }

    .card-image img {
        width: 40px;
        height: 40px;
    }

    .word-en {
        font-size: 1rem;
    }

    .word-ar {
        font-size: 0.9rem;
    }
}

/* أنماط لعبة البحث عن الكلمة */
.word-search-game {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.word-search-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin: 30px 0;
}

.words-list {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.words-list h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.words-to-find {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.word-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.word-item.word-found {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(69, 160, 73, 0.2));
    border-color: #4CAF50;
    text-decoration: line-through;
    opacity: 0.8;
}

.word-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.word-emoji {
    font-size: 1.5rem;
}

.word-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.word-en {
    font-size: 1rem;
    font-weight: bold;
    color: #495057;
}

.word-ar {
    font-size: 0.9rem;
    color: #6c757d;
}

.search-grid-container {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.grid-cell {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.grid-cell:hover {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    transform: scale(1.05);
}

.grid-cell.selected {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

.grid-cell.found {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    animation: foundWord 0.6s ease;
}

.grid-cell.game-complete {
    animation: gameCompleteCell 1s ease infinite alternate;
}

@keyframes foundWord {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes gameCompleteCell {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.word-search-progress {
    text-align: center;
    margin-top: 30px;
}

/* تجاوب مع الشاشات الصغيرة للعبة البحث عن الكلمة */
@media (max-width: 768px) {
    .word-search-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 1px;
        padding: 5px;
    }

    .grid-cell {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }

    .word-info {
        gap: 8px;
    }

    .word-emoji {
        font-size: 1.2rem;
    }

    .word-en {
        font-size: 0.9rem;
    }

    .word-ar {
        font-size: 0.8rem;
    }
}

/* أنماط لعبة التصنيف */
.categorization-game {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
}

.categorization-game * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.categorization-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin: 30px 0;
}

.items-pool {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.items-pool h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.clickable-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clickable-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.clickable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.clickable-item:active {
    transform: translateY(-1px);
}

.clickable-item.selected {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.item-emoji {
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-en {
    font-size: 1rem;
    font-weight: bold;
}

.item-ar {
    font-size: 0.9rem;
    opacity: 0.9;
}



.categories-area {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.categories-area h3 {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.category-containers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    border: 3px solid;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-container.game-complete {
    animation: categoryComplete 1s ease infinite alternate;
}

@keyframes categoryComplete {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

.category-header {
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-emoji {
    font-size: 1.5rem;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.category-name-en {
    font-size: 0.9rem;
    opacity: 0.9;
}



.category-click-zone {
    padding: 15px;
    min-height: 80px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.category-click-zone:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: scale(1.02);
}

.category-click-zone.correct-categorization {
    background: rgba(76, 175, 80, 0.2);
    animation: correctCategorization 0.6s ease;
}

@keyframes correctCategorization {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.drop-hint {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.categorized-item {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    cursor: default;
    transform: none;
    font-size: 0.8rem;
    padding: 8px;
    animation: itemCategorized 0.6s ease;
}

@keyframes itemCategorized {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.categorization-progress {
    text-align: center;
    margin-top: 30px;
}

/* تجاوب مع الشاشات الصغيرة للعبة التصنيف */
@media (max-width: 768px) {
    .categorization-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .clickable-item {
        padding: 10px;
        gap: 8px;
    }

    .item-emoji {
        font-size: 1.2rem;
    }

    .item-en {
        font-size: 0.9rem;
    }

    .item-ar {
        font-size: 0.8rem;
    }

    .category-header {
        padding: 10px 12px;
    }

    .category-emoji {
        font-size: 1.2rem;
    }

    .category-name {
        font-size: 1rem;
    }

    .category-name-en {
        font-size: 0.8rem;
    }

    .category-click-zone {
        padding: 12px;
        min-height: 60px;
    }
}

/* لعبة أين الجزء؟ - أجزاء الجسم */
.body-parts-pointing-game {
    text-align: center;
    padding: 20px;
}

.pointing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.question-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.target-part {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #ff6b35, #ffa726);
    border-radius: 15px;
    color: white;
}

.part-emoji {
    font-size: 3em;
    animation: bounce 2s ease-in-out infinite;
}

.part-names {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.part-ar {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.part-en {
    font-size: 1.2em;
    opacity: 0.9;
}

.part-speak-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.part-speak-btn:hover {
    background: white;
    color: #ff6b35;
    transform: scale(1.1);
}

.body-diagram {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    max-width: 350px;
    width: 100%;
}

.body-image {
    width: 100%;
    height: auto;
    max-width: 350px;
    margin: 0 auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.number-buttons {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.number-buttons h3 {
    text-align: center;
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.number-btn {
    background: linear-gradient(135deg, #ff6b35, #ffa726);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
}

.number-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.number-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.body-svg {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.body-part.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.body-part.clickable:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.help-hints {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #ff6b35;
}

.hint {
    color: #666;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pointing-progress {
    margin-top: 30px;
    text-align: center;
}

.pointing-progress .progress-text {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.pointing-progress .progress-bar {
    background: #e9ecef;
    border-radius: 25px;
    height: 25px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.pointing-progress .progress-fill {
    background: linear-gradient(90deg, #ff6b35, #4CAF50);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 25px;
    position: relative;
}

.pointing-progress .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* تحسينات للأجهزة المحمولة - لعبة أين الجزء؟ */
@media (max-width: 768px) {
    .pointing-container {
        gap: 20px;
    }

    .question-info {
        padding: 15px;
        margin: 0 10px;
    }

    .target-part {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }

    .part-emoji {
        font-size: 2.5em;
    }

    .part-ar {
        font-size: 1.3em;
    }

    .part-en {
        font-size: 1.1em;
    }

    .part-speak-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }

    .body-diagram {
        padding: 20px;
        margin: 0 10px;
    }

    .body-svg {
        max-width: 250px;
    }

    .help-hints {
        margin: 15px 10px 0;
        padding: 12px;
    }

    .hint {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .target-part {
        padding: 15px;
    }

    .part-emoji {
        font-size: 2em;
    }

    .part-ar {
        font-size: 1.2em;
    }

    .part-en {
        font-size: 1em;
    }

    .body-image {
        max-width: 220px;
    }

    .numbers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .number-btn {
        padding: 12px;
        font-size: 1.3em;
        min-height: 50px;
    }

    .body-svg {
        max-width: 220px;
    }

    /* تحسينات إضافية للألعاب الأخرى */
    .start-game-btn {
        padding: 12px 25px;
        font-size: 1.1em;
    }

    .memory-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .memory-card {
        height: 80px;
    }

    .coloring-hint {
        font-size: 0.85em;
        padding: 8px;
    }

    .color-btn {
        width: 50px;
        height: 50px;
    }

    .color-name {
        font-size: 0.7em;
    }

    .question-image {
        max-width: 180px;
        height: 100px;
    }

    .option-btn {
        padding: 12px;
        font-size: 1.1em;
    }
}

/* تنسيق لعبة الضمائر */
.pronouns-game .game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.pronouns-game .game-header {
    text-align: center;
    margin-bottom: 30px;
}

.pronouns-game .game-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.pronouns-game .progress-bar {
    width: 100%;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pronouns-game .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.pronouns-game .progress-text {
    font-size: 1.2em;
    color: #7f8c8d;
    margin: 0;
}

.pronouns-game .question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid #3498db;
}

.pronouns-game .image-container {
    text-align: center;
    margin-bottom: 25px;
}

.pronouns-game .question-image {
    max-width: 300px;
    max-height: 200px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    object-fit: cover;
}

.pronouns-game .sentence-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.pronouns-game .arabic-section,
.pronouns-game .english-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.pronouns-game .section-title {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.pronouns-game .arabic-sentence {
    font-size: 1.6em;
    color: #34495e;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.5;
}

.pronouns-game .english-sentence {
    font-size: 1.5em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.5;
}

.pronouns-game .instruction {
    font-size: 1.1em;
    color: #7f8c8d;
    text-align: center;
    margin: 0;
    font-style: italic;
}

.pronouns-game .audio-btn {
    display: block;
    margin: 0 auto;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.pronouns-game .audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.pronouns-game .options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    justify-items: center;
}

.pronouns-game .option-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 25px;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    min-width: 120px;
}

.pronouns-game .option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.pronouns-game .option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.pronouns-game .option-btn.correct {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    animation: correctPulse 0.6s ease;
}

.pronouns-game .option-btn.incorrect {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: incorrectShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* تنسيق متجاوب للعبة الضمائر */
@media (max-width: 768px) {
    .pronouns-game .sentence-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pronouns-game .game-title {
        font-size: 2em;
    }
    
    .pronouns-game .arabic-sentence,
    .pronouns-game .english-sentence {
        font-size: 1.3em;
    }
    
    .pronouns-game .options-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pronouns-game .option-btn {
        font-size: 1.2em;
        padding: 12px 20px;
    }
    
    .pronouns-game .question-image {
        max-width: 250px;
        max-height: 150px;
    }
}

/* تأثيرات الاحتفال والنجوم */
@keyframes celebrationAnimation {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1) rotate(10deg);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.1) rotate(-10deg);
    }
    80% {
        transform: translate(-50%, -50%) scale(1) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
    }
}

.star {
    display: inline-block;
    font-size: 2rem;
    margin: 0 5px;
    animation: starPulse 1s ease-in-out infinite alternate;
}

@keyframes starPulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    100% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}
