/* الإعدادات العامة */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f8ff; /* لون أزرق فاتح مريح للعين */
    color: #333;
}

/* تنسيقات شريط التنقل (Navbar) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar h2 {
    margin: 0;
    color: #2c3e50;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar a:hover, .navbar a.active {
    background-color: #007bff;
    color: white;
}

/* تنسيقات المحتوى الرئيسي */
main {
    padding: 30px;
    max-width: 1000px;
    margin: 20px auto;
}

.intro-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    line-height: 1.8;
}

/* تنسيقات منطقة اللعب في المرحلة الثانية */
#game-header {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    color: #2c3e50;
}

#score {
    color: #28a745;
    font-size: 26px;
}

#current-question {
    color: #d35400;
    font-size: 26px;
}

#abacus-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
}

#check-answer-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#check-answer-btn:hover {
    background-color: #218838;
}

/* تأثير حركة النجمة */
#star-icon {
    position: fixed;
    bottom: 20%;
    left: 50%;
    font-size: 80px;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.hidden {
    display: none;
}

.animate-star {
    animation: flyUp 1.5s ease-out forwards;
    display: block !important;
}

@keyframes flyUp {
    0% { transform: translate(-50%, 0) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -200px) scale(1.5); opacity: 1; }
    100% { transform: translate(-50%, -400px) scale(0.5); opacity: 0; }
}