/* Custom styles for the game to enhance aesthetics and ensure responsiveness */
body {
    font-family: 'Inter', sans-serif;
    background-color: #1a202c; /* Dark background for a rich feel */
    color: #e2e8f0; /* Light text for contrast */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal scroll on small screens */
}
.m-game-container-main { /* Unique ID for main container */
    background-color: #2d3748; /* Slightly lighter dark background for the container */
    border-radius: 1.5rem; /* Rounded corners for a modern look */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4); /* Deep shadow for depth */
    
    width: 100%;
     /* Max width for larger screens to keep content readable */
	overflow-x: hidden;overflow-y: scroll;
    height: 65%;
    border: 2px solid #ecc94b; /* Gold border for a premium feel */
}
.m-game-header-title { /* Unique ID for header */
    font-size: 2.5rem; /* Large and prominent title */
    font-weight: bold;
    color: #ecc94b; /* Gold color for the title */
    text-shadow: 0 0 10px rgba(236, 201, 75, 0.7); /* Glow effect for the title */
    text-align: center;
    margin-bottom: 1rem;
}
.m-game-button-primary { /* Unique ID for buttons */
    background-color: #ecc94b; /* Gold button background */
    color: #2d3748; /* Dark text on gold buttons */
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Button shadow */
    border: none;
    cursor: pointer;
    display: inline-flex; /* For better alignment of text */
    justify-content: center;
    align-items: center;
    /* Ensure sufficient touch target size for mobile */
    min-height: 48px;
    min-width: 120px;
}
.m-game-button-primary:hover {
    background-color: #d69e2e; /* Darker gold on hover */
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}
.m-question-option-button { /* Unique ID for option buttons */
    background-color: #4a5568; /* Darker grey for options */
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    text-align: right; /* Right align for Arabic text */
    width: 100%;
    transition: all 0.2s ease; /* Smooth transition for answer feedback */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #6b7280;
    cursor: pointer;
    /* Ensure sufficient touch target size for mobile */
    min-height: 48px;
}
.m-question-option-button:hover {
    background-color: #6b7280;
    transform: translateY(-1px);
}
.m-question-option-button.m-correct-answer-feedback { /* Unique ID for correct answer feedback */
    background-color: #48bb78; /* Green for correct answer */
    border-color: #38a169;
}
.m-question-option-button.m-incorrect-answer-feedback { /* Unique ID for incorrect answer feedback */
    background-color: #f56565; /* Red for incorrect answer */
    border-color: #e53e3e;
}
/* Styling for the custom message box */
.m-modal-overlay-custom { /* Unique ID for modal overlay */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dim background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999; /* Below modal box */
}
.m-modal-box-custom { /* Unique ID for modal box */
    background-color: #2d3748;
    border: 2px solid #ecc94b;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative; /* Changed from fixed to relative within overlay */
    z-index: 1000; /* Ensure it's on top of other content */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 90%;
    width: 400px;
    display: flex; /* Use flex for internal layout */
    flex-direction: column;
    gap: 1rem;
}
.m-modal-box-custom h3 {
    font-size: 1.5rem;
    color: #ecc94b;
    margin-bottom: 0.5rem;
}
.m-modal-box-custom p {
    margin-bottom: 1rem;
    color: #e2e8f0;
}
.m-modal-box-custom button {
    background-color: #ecc94b;
    color: #2d3748;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: center; /* Center the button within the flex container */
}
.m-modal-box-custom button:hover {
    background-color: #d69e2e;
}
.hidden {
    display: none !important; /* Utility class to hide elements */
}
/* Styling for the progress bar */
.m-progress-bar-container-game { /* Unique ID for progress bar container */
    width: 100%;
    background-color: #4a5568; /* Dark grey background for the bar */
    border-radius: 0.75rem; /* Rounded corners */
    height: 0.75rem; /* Height of the bar */
    overflow: hidden; /* Hide overflow of the inner bar */
    margin-top: 1rem; /* Space below level/prize */
    border: 1px solid #6b7280; /* Subtle border */
}
.m-progress-bar-fill-game { /* Unique ID for progress bar fill */
    height: 100%;
    width: 0%; /* Initial width */
    background-color: #48bb78; /* Green fill color */
    border-radius: 0.75rem; /* Inherit rounded corners */
    transition: width 0.5s ease-in-out; /* Smooth transition for width changes */
}

/* Styling for the detailed summary section */
.m-summary-question-card-result { /* Unique ID for summary card */
    background-color: #4a5568;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #6b7280;
    text-align: right; /* Right align for Arabic text */
}
.m-summary-question-card-result.m-weak-point-highlight { /* Unique ID for weak point highlight */
    border-color: #f56565; /* Red border for weak points */
    background-color: #4a3748; /* Slightly different background */
}
.m-summary-question-card-result h4 {
    font-weight: bold;
    color: #ecc94b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.m-summary-question-card-result p {
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}
.m-summary-question-card-result .m-explanation-text { /* Unique ID for explanation text */
    font-style: italic;
    color: #a0aec0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #6b7280;
}


/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    .m-game-header-title {
        font-size: 2rem;
    }
    .m-game-container-main {
        padding: 1rem;
    }
    .m-question-option-button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}