/* =================================================================== */
/* === ملف CSS الموحد (نسخة الإصلاح) - يحافظ على التصميم الأصلي === */
/* =================================================================== */
/* تم دمج الملفات بالترتيب التالي للحفاظ على التصميم الأصلي:
    1. style.css
    2. faculty-page.css
    3. status-bar.css
    4. quiz-styles.css
    5. style2.css (مع تعديل بسيط لإصلاح الإيموجي)
    6. الأنماط المدمجة من صفحات HTML
    7. التعديلات النهائية لحل المشاكل
*/

/* --- General and Base Styles --- */
:root {
    --primary-color: #006633;
    --primary-dark: #004422;
    --secondary-color: #fdd835;
    --light-bg: #e6f3ee;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
    --info-color: #17a2b8;
    --font-family: 'Cairo', sans-serif;
    --text-dark: #333;
    --text-light: #555;
    --white-color: #fff;
    --border-radius-main: 15px;
    --quiz-bg: #f0f4f8;
    --quiz-card-bg: #ffffff;
    --quiz-primary: #006633;
    --quiz-primary-dark: #004d25;
    --quiz-secondary: #ffcc00;
    --quiz-text-main: #374151;
    --quiz-text-light: #6b7280;
    --quiz-correct: #28a745;
    --quiz-incorrect: #dc3545;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius-large: 20px;
    --border-radius-medium: 12px;
    --icon-glow: 0 0 15px rgba(0, 102, 51, 0.5);
    
    /* ألوان الكليات المميزة */
    --medicine-color: #c0392b;
    --health-color: #e74c3c;
    --nursing-color: #8e44ad;
    --engineering-color: #3498db;
    --science-color: #16a085;
    --it-color: #9b59b6;
    --humanities-color: #e67e22;
    --economics-color: #f39c12;
    --education-color: #2c3e50;
    --sharia-color: #8b4513;
    --religion-color: #27ae60;
}

body {
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text-dark);
    padding: 10px;
    box-sizing: border-box;
    background-image: url('../images/Ferst.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding-top: 70px; /* Adjust for fixed status bar */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(240, 244, 248, 0.85);
    z-index: -1;
}

.game-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}


/* ================== General Components ================== */
.action-button {
    width: 100%;
    max-width: 350px;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 18px;
    font-weight: bold;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.action-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}

.action-button:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    transform: scaleX(-1);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 5px;
}

/* ================== Modal Styles ================== */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
}
/* progress bar inside feedback popup */
.feedback-progress-bar { height: 8px; width: 92%; background: rgba(0,0,0,0.06); border-radius: 999px; margin: 6px auto 16px; overflow: hidden; }
.feedback-progress-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #0bb96b, #07824f); border-radius: 999px; transition: transform 5000ms linear; transform-origin: left center; transform: scaleX(1); will-change: transform; }
.feedback-popup-content.incorrect .feedback-progress-fill { background: linear-gradient(90deg, #f28b7a, #e04a3a); }
.feedback-popup-container.visible .feedback-progress-bar { opacity: 1; transform: none; }

.modal-content {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius-main);
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slide-down 0.4s ease-out;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.modal-actions .action-button {
    width: auto;
    max-width: none;
    padding: 12px 30px;
    flex-grow: 1;
}

.modal-actions .action-button.danger {
    background-color: var(--incorrect-color);
}
.modal-actions .action-button.danger:hover {
    background-color: #a71d2a;
}
.modal-actions .action-button.secondary {
    background-color: #6c757d;
}
.modal-actions .action-button.secondary:hover {
    background-color: #5a6268;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.modal-content p {
    color: var(--text-light);
    font-size: 16px;
}

/* ================== Landing Screen ================== */


.logo {
    max-width: 150px;
    margin-bottom: 20px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 32px;
    line-height: 1.4;
    font-weight: 700;
}

.subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.features-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    background-color: var(--white-color);
    padding: 25px;
    border-radius: var(--border-radius-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: calc(33.33% - 20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card .icon {
    font-size: 48px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

.reset-link-container {
    margin-top: 20px;
    font-size: 14px;
}
.reset-link-container a {
    color: var(--text-light);
    text-decoration: none;
}
.reset-link-container a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* ================== Start/Register Screen ================== */
#start-screen {
    background-color: var(--white-color);
    padding: 30px 40px;
    border-radius: var(--border-radius-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-dark);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: var(--font-family);
}

/* ================== Guide Selection Screen (MODIFIED) ================== */
#guide-selection-screen .scene-content {
    background-color: transparent;
    box-shadow: none;
    padding-top: 0;
}
.guides-container {
    display: grid;
    /* Changed to create a 2-column layout on mobile */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px; /* Reduced gap for a tighter layout */
    max-width: 700px;
    margin: 20px auto 0 auto;
}
.guide-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softened shadow */
    text-align: center;
    padding: 20px 15px; /* Reduced padding */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; /* Added border-color to transition */
    border: 2px solid transparent; /* Added transparent border for smooth hover transition */
    position: relative; /* Needed for the checkmark */
}
.guide-card:hover {
    transform: translateY(-5px); /* More subtle hover effect */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--secondary-color); /* Highlight with border on hover */
}
.guide-card.selected {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 77, 37, 0.2);
    border-color: var(--primary-color); /* Stronger border for selected state */
}
.guide-card.selected::after {
    content: '✔';
    position: absolute;
    top: 8px; /* Adjusted position */
    right: 8px;
    background-color: var(--primary-color);
    color: var(--white-color); /* Changed color for better contrast */
    font-weight: bold;
    border-radius: 50%;
    width: 24px; /* Resized checkmark */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}
.guide-icon {
    font-size: 48px; /* Reduced icon size */
    margin-bottom: 10px; /* Reduced margin */
    line-height: 1;
}
/* Hide the long description to simplify the card */
.guide-card p {
    display: none;
}
/* Adjust font size for better fit */
.guide-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}
.guide-card span {
    font-size: 13px;
    color: var(--text-light);
}

/* ================== Game Stages General ================== */
.game-stage {
    background-color: var(--white-color);
    padding: 0;
    border-radius: var(--border-radius-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.scene-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ----------------- Touch & Mobile enhancements ----------------- */
/* Improve tap targets, focus visibility and active feedback for touch devices */
/* These rules aim to be non-invasive and target common interactive classes used
   across the site: .action-button, .feature-card, .guide-card, .option-btn */

:root {
    --touch-hit-size: 56px; /* recommended minimum touch target */
}

/* Make primary interactive elements easy to tap */
.action-button,
.feature-card,
.guide-card,
.option-btn {
    -webkit-tap-highlight-color: transparent; /* remove ugly highlight on older webviews */
    touch-action: manipulation; /* prefer immediate taps */
    min-height: var(--touch-hit-size);
    padding-top: 14px;
    padding-bottom: 14px;
    transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
    will-change: transform, box-shadow;
    position: relative; /* for ripples */
    overflow: hidden; /* contain ripple */
}

/* Slightly larger font and spacing for inputs on touch devices */
input[type="text"],
input[type="tel"],
input[type="number"],
select,
textarea {
    font-size: 17px;
    padding: 14px 12px;
    -webkit-tap-highlight-color: transparent;
}

/* Active state for touch (use scale down instead of heavy shadow) */
.action-button:active,
.feature-card:active,
.guide-card:active,
.option-btn:active {
    transform: scale(0.995);
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

/* Focus-visible for keyboard and accessibility users */
.action-button:focus-visible,
.feature-card:focus-visible,
.guide-card:focus-visible,
.option-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,102,51,0.12), 0 6px 18px rgba(0,0,0,0.06);
    border-radius: 12px;
}

/* Small-screen tweaks */
@media (max-width: 900px), (pointer: coarse) {
    .action-button { font-size: 18px; padding: 16px 18px; border-radius: 28px; }
    .feature-card, .guide-card { padding: 18px; border-radius: 18px; }
    .features-grid { gap: 14px; }
    .game-container { padding: 16px; }
}

/* Ensure ripple spans don't overflow their parent */
.touch-ripple { pointer-events: none; }

/* Gentle visual accent for important buttons on mobile */
@media (max-width: 480px) {
    .action-button { box-shadow: var(--shadow-light); }
}


/* ================== Touch & Mobile Enhancements ================== */
/* Improve tap targets, touch feedback and spacing for mobile/touch devices */
html, body {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Prefer direct manipulation for interactive controls */
button, a, [role="button"], .option-btn, .guide-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* Slight active feedback on tap */
.action-button, .option-btn, .guide-card, .feature-card {
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    will-change: transform;
}
.action-button:active, .option-btn:active, .guide-card:active, .feature-card:active {
    transform: scale(0.985) translateY(0.5px);
    filter: brightness(0.985);
}

/* ripple element styling - kept minimal and non-intrusive */
.touch-ripple { position: absolute; pointer-events: none; opacity: 0.9; mix-blend-mode: screen; }
.action-button .touch-ripple { background: rgba(255,255,255,0.18); }
.guide-card .touch-ripple { background: rgba(0,0,0,0.06); }

/* Make interactive blocks easier to press */
.guide-card, .feature-card, .option-wrap, .option-btn {
    min-height: 56px;
    padding: 14px 16px;
    border-radius: var(--border-radius-medium);
}

/* Focus-visible for keyboard and accessibility */
.action-button:focus-visible, .option-btn:focus-visible, .guide-card:focus-visible, [role="button"]:focus-visible {
    outline: 3px solid rgba(0,102,51,0.14);
    outline-offset: 3px;
}

/* Larger touch UI on small screens */
@media (max-width: 600px) {
    .action-button {
        padding: 18px 22px;
        font-size: 20px;
        border-radius: 28px;
    }
    .feature-card {
        width: 100%;
        padding: 18px;
    }
    .guide-card {
        padding: 18px 16px;
        border-radius: 18px;
    }
    .badge-card {
        min-width: 72px;
        min-height: 72px;
        padding: 10px;
    }
    .modal-content {
        max-width: 95%;
        padding: 20px;
    }
    .feedback-progress-bar { height: 10px; }
}

/* Badge overlay (centered) */
#badge-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 99999;
}

.badge-card-overlay {
    pointer-events: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), #fff);
    border-radius: 18px;
    padding: 22px 24px;
    min-width: 260px;
    max-width: 92%;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0,0,0,0.25);
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 420ms cubic-bezier(.2,.9,.25,1), opacity 300ms ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#badge-overlay.show .badge-card-overlay {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.badge-overlay-icon {
    font-size: 48px;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--quiz-primary-dark));
    color: #fff;
    box-shadow: var(--icon-glow);
}
.badge-overlay-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-dark);
}
.badge-overlay-desc {
    font-size: 14px;
    color: var(--text-light);
}

@media (max-width: 480px) {
    .badge-card-overlay { padding: 18px; min-width: 200px; }
    .badge-overlay-icon { font-size: 42px; width: 72px; height: 72px; }
}

/* Reduce hover-only effects on touch devices */
@media (hover: none) {
    .feature-card:hover, .guide-card:hover { transform: none; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
}

.scene-content {
    padding: 25px;
}

.scene-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

/* --- Image sizing for specific scenes --- */
img[src*="all_q"],
img[src*="library_question"],
img[src*="hares"],
img[src*="first_faculties_q"] {
    width: 400px !important;
    height: 400px !important;
    object-fit: contain !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ================== Question/Quiz Scene Specifics ================== */
.power-ups-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.guide-help-button {
    background-color: var(--info-color);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-family: var(--font-family);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.power-up-btn {
    background-color: #ffc107;
    color: var(--text-dark);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.power-up-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}
.power-up-counter {
    background-color: rgba(0,0,0,0.2);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.option-btn {
    padding: 15px 10px;
    border: 2px solid var(--primary-color);
    background-color: var(--white-color);
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.option-btn:hover {
    background-color: var(--light-bg);
    transform: translateY(-2px);
}

.option-btn.correct {
    background-color: var(--correct-color);
    color: var(--white-color);
    border-color: var(--correct-color);
}
.option-btn.incorrect {
    background-color: var(--incorrect-color);
    color: var(--white-color);
    border-color: var(--incorrect-color);
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 95%;
    margin: 10px auto 20px;
}
.progress-bar-container {
    flex-grow: 1;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    height: 12px;
}
.progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}
.question-counter {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
}
.timer-container {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-dark);
    background-color: var(--light-bg);
    border: 2px solid var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.timer-container.low-time {
    border-color: var(--incorrect-color);
    color: var(--incorrect-color);
    animation: pulse 1s infinite;
}

/* ================== Map & Menu Scenes ================== */
#map-scene .options-container .option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    padding: 25px 15px;
}

.map-icon {
    font-size: 36px;
    margin-bottom: 5px;
}

#faculties-scene .options-container,
#exchange-scene .options-container,
#admission-scene .options-container,
#studentaffairs-scene .options-container {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 25px auto 0;
}

#faculties-scene .option-btn,
#exchange-scene .option-btn,
#admission-scene .option-btn,
#studentaffairs-scene .option-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    font-size: 20px;
}
#faculties-scene .option-btn span,
#exchange-scene .option-btn span,
#admission-scene .option-btn span,
#studentaffairs-scene .option-btn span {
    font-size: 30px;
}

/* ================== Info Scenes (Faculties list, etc.) ================== */
.info-header {
    padding: 25px 25px 20px 25px;
    border-bottom: 1px solid #eee;
}
.info-scene-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px 25px;
    text-align: right;
}
.info-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex; /* إضافة Flexbox لترتيب العناصر */
    flex-direction: column; /* ترتيب العناصر عمودياً */
    align-items: center; /* توسيط العناصر أفقياً */
    gap: 15px; /* إضافة مسافة بين الأزرار */
}

#faculties-list-scene .info-scene-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.college-info-card {
    background-color: #f9f9f9;
    border-right: 5px solid var(--primary-color);
    border-radius: var(--border-radius-main);
    padding: 25px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.college-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-right-color: var(--secondary-color);
}
.college-info-card h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: var(--primary-dark);
}
.college-info-card p {
    font-size: 15px;
    color: var(--text-light);
    margin: 0;
}

/* ================== IFrame / Website Viewer ================== */
#college-website-scene .scene-content {
    padding: 20px;
    height: 85vh;
    display: flex;
    flex-direction: column;
}
.website-view-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}
.loader-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
#college-website-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
}

/* ================== Stadium & Memory Game ================== */
#stadium-selection-scene .scene-content {
    background-color: var(--light-bg);
    border-radius: var(--border-radius-main);
    padding: 30px;
}
.game-choices-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 20px 0 30px 0;
}
.game-choice-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius-main);
    padding: 25px;
    text-align: center;
    border-bottom: 5px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.game-choice-card:hover {
    transform: translateY(-8px);
    border-bottom-color: var(--secondary-color);
}
.game-choice-card .icon {
    font-size: 50px;
    display: block;
    margin-bottom: 15px;
}

#memory-game-scene .scene-content {
    background-color: #e6f3ee;
}
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    perspective: 1000px;
}
.memory-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}
.memory-card.flipped {
    transform: rotateY(180deg);
}
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.card-front {
    background-color: var(--primary-color);
    background-image: url('../images/logo.webp');
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
}
.card-back {
    background-color: var(--white-color);
    transform: rotateY(180deg);
    font-size: 2.5em;
}

/* ================== Video & Ad Modals ================== */
#video-overlay {
    flex-direction: column;
    gap: 20px;
}
#welcome-video {
  width: 90%;
  max-width: 400px;
  border-radius: 15px;
}

/* ================== Animations ================== */
@keyframes slide-down {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.1); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes bounceIn {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}
/* === Poll the Audience Chart Styles === */
#poll-results-area {
    margin-bottom: 20px;
    padding: 0 15px;
    display: none; /* يبدأ مخفياً */
    animation: fadeInPoll 0.5s ease-out;
}

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

.poll-chart-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9eef3;
    box-shadow: var(--shadow-light);
}

.poll-chart-container h3 {
    text-align: center;
    color: var(--quiz-primary-dark);
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.poll-chart-container h3 i {
    margin-left: 8px;
}

.poll-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    gap: 10px;
}

.poll-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

.poll-percentage {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--quiz-text-main);
    margin-bottom: 5px;
}

.poll-bar {
    width: 80%;
    max-width: 50px;
    background: linear-gradient(to top, var(--quiz-primary), #008a4c);
    border-radius: 5px 5px 0 0;
    transition: height 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    animation: riseUp 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes riseUp {
    from { height: 0; }
}

.poll-label {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--quiz-text-light);
    background-color: #e9eef3;
    padding: 4px 10px;
    border-radius: 5px;
    width: 100%;
}
/* Add this code to the end of style.css */

/* Professional Confirmation Modal Styles */
.modal-content {
    background-color: var(--white-color);
    padding: 35px 40px;
    border-radius: var(--border-radius-main);
    text-align: center;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slide-down 0.4s ease-out;
    border-top: 5px solid var(--primary-color);
}

.modal-content .modal-icon {
    font-size: 50px;
    color: #f8bb86; /* A softer warning color */
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease-out;
}

.modal-content h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
}

.modal-content p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions .action-button {
    width: auto;
    max-width: none;
    padding: 12px 30px;
    flex-grow: 1;
    font-size: 16px;
    border-radius: 8px;
}

.modal-actions .action-button.danger {
    background: #dc3545; /* Red color for danger */
    color: white;
}
.modal-actions .action-button.danger:hover {
    background: #c82333;
}

.modal-actions .action-button.secondary {
    background: #f0f4f8;
    color: var(--text-main);
    border: 1px solid #d1d9e6;
}
.modal-actions .action-button.secondary:hover {
    background: #e2e6ea;
}

/* Re-using an existing animation */
@keyframes bounceIn {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
/* ================== Responsive Design for Mobile ================== */
@media (max-width: 768px) {
    
    /* تعديل الحاوية الرئيسية لتقليل الهوامش على الجوال */
    #landing-screen {
        padding: 20px 15px;
    }

    /* جعل البطاقات تترتب فوق بعضها البعض (عمودياً) */
    .features-grid {
        flex-direction: column;
        gap: 15px; /* تقليل المسافة بين البطاقات */
    }

    /* جعل كل بطاقة تأخذ العرض الكامل للشاشة */
    .feature-card {
        width: 100%;
        padding: 20px;
    }

    /* تصغير حجم الخطوط لتناسب شاشة الجوال */
    h1 {
        font-size: 26px; /* تصغير العنوان الرئيسي */
    }

    .subtitle {
        font-size: 16px; /* تصغير النص الفرعي */
    }
    
    .action-button {
        padding: 12px;
        font-size: 16px;
    }
}

/* --- From: faculty-page.css --- */
/* =================================================================== */
/* ملف التصميم الموحد للصفحات (النسخة الاحترافية النهائية والمحسّنة) */
/* =================================================================== */

/* --- الحاوية الرئيسية (القالب الزجاجي) --- */
.faculty-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-main);
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 30, 15, 0.1);
    width: 100%;
    max-width: 1200px; /* تم زيادة القيمة */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* إضافة هذا السطر */
    margin: 0 auto;
}

/* --- ترويسة الكلية مع حركة دخول --- */
.faculty-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding-bottom: 25px;
    margin-bottom: 40px;
    position: relative;
    border-bottom: none;
}
.faculty-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    animation: draw-line 0.8s 0.2s ease-out forwards;
}
.faculty-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    border: 3px solid #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.faculty-header h1 {
    color: var(--primary-dark);
    font-size: 38px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- قائمة التنقل الداخلية (الأيقونات) مع تأثير التوهج --- */
.nav-grid {
    display: grid;
    /* Force two columns on desktop/laptop for consistent layout */
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 25px;
}
.nav-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 30px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: fadeIn-up 0.6s ease-out forwards;
    opacity: 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}
.nav-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px 0 rgba(0, 77, 64, 0.2);
}
.nav-item .icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary-color), #004d28);
    font-size: 36px;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 102, 51, 0.3);
}
.nav-item:hover .icon-wrapper {
    transform: scale(1.15) rotate(10deg);
}
.nav-item .nav-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
}
.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }

/* --- أقسام المحتوى الداخلي --- */
.content-section {
    display: none;
    animation: fadeIn 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    margin-top: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: none;
}
.back-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.back-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- لمسات بصرية متقدمة للعناوين (H2) --- */
.content-section h2 {
    font-size: 32px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color), var(--primary-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin: 0;
    transition: background-position 0.5s ease;
}
.content-section h2:hover {
    animation: gradientShift 3s ease infinite;
}
.content-section h2::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 5px;
    background: linear-gradient(to left, var(--primary-color), #00a786);
    border-radius: 5px;
    animation: draw-line 0.6s 0.2s ease-out forwards;
}

/* --- لمسات بصرية متقدمة للعناوين الفرعية (H3) --- */
.content-section h3 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-top: 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}
.content-section h3::before {
    content: '';
    display: block;
    width: 8px;
    height: 28px;
    background: linear-gradient(to top, var(--secondary-color), #ffe066);
    border-radius: 5px;
    transition: background 0.3s ease;
}
.content-section h3:hover {
    color: var(--primary-color);
}
.content-section h3:hover::before {
    background: linear-gradient(to top, var(--primary-color), #00a786);
}

/* --- لمسة بصرية متقدمة للفقرات الهامة --- */
.highlight-phrase {
    position: relative;
    background: linear-gradient(105deg, #ffffff 0%, var(--light-bg) 100%);
    border-right: 5px solid;
    border-image: linear-gradient(to top, var(--secondary-color), #ffeb3b) 1;
    padding: 20px 65px 20px 20px;
    border-radius: 8px;
    margin: 15px 0;
    color: var(--primary-dark);
    box-shadow: 0 4px 25px rgba(0, 77, 64, 0.08);
    font-size: 1.1em;
    font-weight: 600;
}
.highlight-phrase::before {
    content: 'i';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Times New Roman', serif;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.highlight-phrase:hover::before {
    box-shadow: 0 0 15px var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* --- لمسات بصرية متقدمة لعناصر القوائم --- */
.content-section p, .content-section li {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-main);
}
.content-section ul {
    list-style: none;
    padding-right: 0;
}
.content-section ul li {
    position: relative;
    padding: 8px 40px 8px 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border-radius: 8px;
}
.content-section ul li:hover {
    transform: translateX(-5px);
    background-color: var(--light-bg);
}
.content-section ul li::before {
    content: '✔';
    color: var(--primary-color);
    background: var(--light-bg);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    text-align: center;
    font-size: 14px;
    line-height: 25px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 5px rgba(0, 77, 64, 0.2);
    transition: all 0.3s ease;
}
.content-section ul li:hover::before {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

/* --- الجداول والبطاقات (محسّنة) --- */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 16px;
    box-shadow: var(--shadow-light);
    border-radius: var(--border-radius-main);
    overflow: hidden;
}
.styled-table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: right;
    font-weight: bold;
}
.styled-table th, .styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dddddd;
}
.styled-table tbody tr {
    background-color: #f9f9f9;
}
.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}
.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}
.styled-table tbody tr:hover {
    background-color: var(--light-bg);
    color: var(--primary-dark);
}

.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.job-card {
    background-color: #f9fafb;
    border-radius: var(--border-radius-main);
    padding: 25px;
    box-shadow: var(--shadow-light);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}
.job-card h3 {
    margin-top: 0;
    border-bottom: none;
}
.job-card h3::before {
    background-color: var(--primary-color);
}
.job-card ol {
    padding-right: 20px;
    margin: 0;
    color: var(--text-main);
}
.job-card li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* --- الحركات والتصميم المتجاوب (Responsive) --- */
@media (max-width: 768px) {
    .faculty-container {
        padding: 20px;
        border-radius: 16px;
    }
    .faculty-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .faculty-header img {
        width: 80px;
        height: 80px;
    }
    .faculty-header h1 {
        font-size: 30px;
    }
    .nav-grid {
        grid-template-columns: 1fr 1fr;
    }
    .nav-item {
        padding: 20px 15px;
        gap: 10px;
    }
    .nav-item .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    .nav-item .nav-text {
        font-size: 16px;
    }
    .content-section {
        padding: 25px;
    }
    .content-section h2 {
        font-size: 26px;
    }
    .content-section h3 {
        font-size: 20px;
    }
    .content-section p, .content-section li {
        font-size: 16px;
    }
    .job-cards-grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 769px) and (max-width: 1200px) {
    .faculty-container {
        padding: 40px;
        border-radius: 24px;
        max-width: 90%; /* Adjust to fill more of the screen */
        margin: 0 auto;
    }
}


@keyframes fadeIn-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes draw-line {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === From: status-bar.css === */
/* ======================================================= */
/* 🎨 شريط الحالة - تصميم احترافي ومحسن بصريًا (الإصدار 2) */
/* ======================================================= */

/* NOTE: This :root block was originally global and overrode variables defined earlier.
    To avoid accidental global overrides we add a scoped version for the status bar below.
    The original :root values remain earlier in the file; this scoped block defines
    component-specific variables for #status-bar only (non-destructive).
*/

#status-bar {
  /* Scoped CSS variables for the status bar only. Use var(--status-*) inside #status-bar rules. */
  --status-primary-color: #1a5e20;        /* أخضر داكن عميق */
  --status-secondary-color: #2e7d32;      /* أخضر متوسط */
  --status-tertiary-color: #4caf50;       /* أخضر زاهي */
  --status-accent-color: #a5d6a7;         /* أخضر فاتح للمسات */
  --status-text-color: #ffffff;           /* نص أبيض نقي */
  --status-shadow-color: rgba(0, 0, 0, 0.25); /* ظل أعمق قليلًا */
  --status-highlight-color: rgba(255, 255, 255, 0.15); /* لمعان أكثر وضوحًا */
  --status-light-glow: rgba(165, 214, 167, 0.4); /* توهج خفيف للأيقونات */
  --status-glass-bg: rgba(255, 255, 255, 0.08); /* خلفية زجاجية شفافة */
  /* Keep font-family global; scoped variables only for colors/shadows */
}

/* To migrate styles: replace usages like var(--primary-color) within #status-bar rules
    to var(--status-primary-color) where appropriate. This patch doesn't replace usages
    automatically; it provides a safe scoped variables block and explanatory note. */

/* ---------------- الشريط الرئيسي (scoped variables) ---------------- */
#status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* زيادة الارتفاع قليلًا */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px; /* زيادة التباعد الأفقي */
    box-sizing: border-box;

    /* تدرج لوني باستخدام المتغيرات المخصصة للشريط (scoped) */
    background: linear-gradient(135deg, var(--status-primary-color) 0%, var(--status-secondary-color) 60%, var(--status-tertiary-color) 100%);
    color: var(--status-text-color);
    font-family: var(--font-family);

    box-shadow: 0 6px 16px var(--status-shadow-color); /* ظل أكثر بروزًا */
    z-index: 1000;
    transition: all 0.4s ease-in-out; /* انتقال أبطأ قليلًا */
    backdrop-filter: blur(5px); /* تأثير ضبابية خفيف لخلفية زجاجية */
    -webkit-backdrop-filter: blur(5px); /* دعم سفاري */
}

/* ---------------- أقسام الشريط ---------------- */
.status-section {
  display: flex;
  align-items: center;
  gap: 25px; /* زيادة التباعد بين العناصر */
}

/* ---------------- معلومات اللاعب (شكل كبسولة) ---------------- */
#player-name-display, #player-score-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px; /* حجم خط أكبر قليلًا */
  font-weight: 700; /* خط أثقل */
  
    /* خلفية زجاجية خفيفة (scoped variable) */
    background-color: var(--status-glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.2); /* حدود شفافة */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  padding: 10px 18px; /* زيادة Padding */
  border-radius: 30px; /* شكل كبسولة مستديرة جدًا */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: default; /* منع مؤشر اليد */
}

#player-name-display .icon, #player-score-display .icon {
    color: var(--status-accent-color);
    font-size: 20px; /* أيقونات أكبر قليلًا */
    text-shadow: 0 0 8px var(--status-light-glow); /* توهج خفيف للأيقونات */
}

/* ---------------- أزرار التحكم (أكثر بروزًا وتفاعلية) ---------------- */
.status-bar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px; /* زيادة Padding */
  text-decoration: none;
    color: var(--status-text-color);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px; /* حواف مستديرة أكثر */
  
  background-color: transparent; /* خلفية شفافة في الحالة العادية */
  border: 1px solid rgba(255, 255, 255, 0.1); /* حدود خفيفة */
  
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* انتقال أكثر سلاسة */
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-bar-btn .icon {
  font-size: 20px; /* أيقونات أكبر */
  width: 22px;
  text-align: center;
    text-shadow: 0 0 6px var(--status-light-glow);
}

/* تأثيرات التفاعل */
.status-bar-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1); /* تأثير لمعان من اليسار لليمين */
  transform: skewX(-20deg);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.status-bar-btn:hover::before {
  left: 100%;
}

.status-bar-btn:hover {
    background-color: var(--status-glass-bg); /* خلفية زجاجية عند التحويم (scoped) */
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.status-bar-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  background-color: rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---------------- التجاوب مع الشاشات الصغيرة ---------------- */
@media (max-width: 768px) {
  #status-bar {
    padding: 0 15px;
    height: 60px;
  }
   .status-bar-btn .btn-text, #player-name-display span:not(.icon) {
    display: none;
  }

  .status-section {
    gap: 10px;
  }

  /* إخفاء نصوص الأزرار وترك الأيقونات فقط */
  .status-bar-btn .btn-text, #player-name-display span:not(.icon) {
    display: none;
  }
  
  #player-name-display {
    padding: 8px;
    border-radius: 50%; /* تحويل حاوية اسم اللاعب إلى دائرة للأيقونة فقط */
    width: 40px; /* ضمان أبعاد مربعة */
    height: 40px;
    justify-content: center;
  }

  #player-score-display {
    padding: 8px 12px;
    font-size: 15px;
  }
  
  #player-score-display .icon {
      font-size: 16px;
  }

  .status-bar-btn {
    padding: 10px;
    font-size: 20px; /* لتكبير الأيقونة عند إخفاء النص */
    width: 45px;
    height: 45px;
    justify-content: center;
  }
}

/* لمنع المحتوى من الاختفاء خلف الشريط (Note: body padding-top appears multiple times in this file) */
body {
    padding-top: 70px; /* نفس ارتفاع الشريط الجديد */
}

/* --- الكود المضاف --- */
@keyframes score-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #ffcc00; }
    100% { transform: scale(1); }
}

/* DEDUPLICATED: only one #player-score-display.score-updated rule is needed */
#player-score-display.score-updated {
    animation: score-pop 0.6s ease-out;
}

/* === Quiz Modal Styles V3 (Self-Contained & Fixed, scoped) === */
/* Scoped to #quiz-modal so these variables don't override global :root values. */
#quiz-modal {
    --quiz-bg: #f0f4f8;
    --quiz-card-bg: #ffffff;
    --quiz-primary: #006633;
    --quiz-primary-dark: #004d25;
    --quiz-secondary: #ffcc00;
    --quiz-text-main: #374151;
    --quiz-text-light: #6b7280;
    --quiz-correct: #28a745;
    --quiz-incorrect: #dc3545;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- بداية الكود المدمج من style2.css للتشغيل الصحيح --- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* زيادة z-index لضمان ظهوره في الأعلى */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-container.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container .modal-content {
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-container.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #f0f4f8;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--quiz-text-light);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.close-button:hover {
    color: #fff;
    background-color: #e74c3c;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}
/* --- نهاية الكود المدمج --- */


#quiz-modal .modal-content {
    max-width: 950px;
    width: 95%;
    padding: 0;
    background-color: var(--quiz-bg);
    border-radius: 20px;
    overflow: hidden;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#quiz-modal .modal-header {
    background-color: var(--quiz-primary-dark);
    color: white;
    padding: 15px 25px;
    border-bottom: none;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#quiz-modal .modal-header h2 {
    color: white;
    font-size: 1.6rem;
    margin: 0;
}

#quiz-body {
    overflow-y: auto;
    flex-grow: 1;
}

.quiz-container {
    display: flex;
    flex-direction: row-reverse;
    flex-grow: 1;
}

/* --- Help/Assistance Area --- */
.quiz-help-container {
    background-color: #e9eef3;
    padding: 20px;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border-left: 1px solid #d1d9e6;
    flex-shrink: 0;
}

.help-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: var(--quiz-card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
}

.help-button:not(:disabled):hover {
    transform: translateY(-5px);
    border-color: var(--quiz-primary);
    box-shadow: var(--shadow-heavy);
}

.help-button i { font-size: 2.5rem; color: var(--quiz-primary); }
.help-button span { font-size: 1rem; font-weight: 600; color: var(--quiz-text-main); }
.help-button:disabled { cursor: not-allowed; opacity: 0.5; }

.help-attempts-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--quiz-secondary);
    color: var(--quiz-primary-dark);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid var(--quiz-card-bg);
}

/* --- Main Question/Answer Area --- */
.quiz-main-container {
    flex-grow: 1;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
}

.quiz-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

#quiz-progress { font-size: 1rem; font-weight: 700; color: var(--quiz-text-light); white-space: nowrap; }
#quiz-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--quiz-primary-dark);
    background-color: var(--quiz-card-bg);
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    width: 70px;
    text-align: center;
    flex-shrink: 0;
}
#quiz-timer.low-time { color: var(--quiz-incorrect); animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

#quiz-progress-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #d1d9e6;
    transition: all 0.3s ease;
}
.progress-dot.completed {
    background-color: var(--quiz-correct);
}
.progress-dot.current {
    background-color: var(--quiz-secondary);
    transform: scale(1.3);
}

.quiz-question-area {
    background: var(--quiz-card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-light);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 20px;
    min-height: 150px;
}

#quiz-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--quiz-text-main);
    line-height: 1.6;
    text-align: right;
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    word-wrap: break-word;
}

.quiz-options-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.quiz-option {
    background-color: var(--quiz-card-bg);
    border: 2px solid #e6e9f0;
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-light);
    width: 100%;
}
.quiz-option:not(.no-hover):hover {
    transform: translateY(-3px);
    border-color: var(--quiz-primary);
}
.quiz-option.no-hover:hover { transform: none; border-color: #e6e9f0; }
.quiz-option.correct { background-color: #d4edda; border-color: var(--quiz-correct); color: #155724; }
.quiz-option.incorrect { background-color: #f8d7da; border-color: var(--quiz-incorrect); color: #721c24; }
.quiz-option.hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }

/* --- Feedback Popup Styles --- */
.feedback-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.feedback-popup-container.visible {
    opacity: 1;
    pointer-events: auto;
}
.feedback-popup-content {
    background: var(--quiz-card-bg);
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.7);
    transition: transform 0.3s ease;
    border-top: 8px solid;
    min-width: 320px;
    max-width: 90%;
    position: relative;
    overflow: hidden;
}
.feedback-popup-container.visible .feedback-popup-content {
    transform: scale(1);
}
.feedback-popup-content.correct { border-color: var(--quiz-correct); }
.feedback-popup-content.incorrect { border-color: var(--quiz-incorrect); }
#feedback-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}
#feedback-message {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--quiz-text-main);
    margin: 0 0 10px 0;
}
#feedback-hint {
    font-size: 1rem;
    color: var(--quiz-text-light);
    min-height: 24px;
}
.feedback-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background-color: var(--quiz-secondary);
    transform: translateX(-100%);
}

/* --- Results Screen --- */
.quiz-results {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    min-height: 400px;
}
.quiz-results h2 { font-size: 2.5rem; color: var(--quiz-primary-dark); }
.quiz-results p { font-size: 1.5rem; color: var(--quiz-text-main); }
.quiz-results #score-emoji { font-size: 5rem; margin: 15px 0; }
#quiz-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}


/* --- Poll the Audience Chart Styles --- */
#poll-results-area {
    margin-bottom: 20px;
    padding: 0 15px;
    display: none;
    animation: fadeInPoll 0.5s ease-out;
}

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

.poll-chart-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9eef3;
    box-shadow: var(--shadow-light);
}

.poll-chart-container h3 {
    text-align: center;
    color: var(--quiz-primary-dark);
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.poll-chart-container h3 i {
    margin-left: 8px;
}

.poll-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    gap: 10px;
}

.poll-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

.poll-percentage {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--quiz-text-main);
    margin-bottom: 5px;
}

.poll-bar {
    width: 80%;
    max-width: 50px;
    background: linear-gradient(to top, var(--quiz-primary), #008a4c);
    border-radius: 5px 5px 0 0;
    transition: height 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    animation: riseUp 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes riseUp {
    from { height: 0; }
}

.poll-label {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--quiz-text-light);
    background-color: #e9eef3;
    padding: 4px 10px;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .quiz-container { flex-direction: column; height: auto; }
    .quiz-help-container { flex-direction: row; width: 100%; height: auto; justify-content: space-around; padding: 15px; order: 2; border-left: none; border-top: 1px solid #d1d9e6; flex-wrap: wrap; }
    .quiz-main-container { order: 1; padding: 15px; min-height: 0; }
    .help-button { width: 70px; padding: 8px; gap: 4px; }
    .help-button i { font-size: 1.8rem; }
    .help-button span { font-size: 0.8rem; }
    .help-attempts-counter { width: 20px; height: 20px; font-size: 0.8rem; }
    
    .quiz-top-bar { flex-wrap: wrap; justify-content: center; }
    #quiz-progress-dots { order: 1; width: 100%; margin-bottom: 10px; }
    #quiz-progress { order: 2; }
    #quiz-timer { order: 3; }

    #quiz-question-text { font-size: 1.2rem; }
    .quiz-option { padding: 15px; font-size: 1rem; }
    .poll-label { font-size: 0.9rem; }
    .poll-chart { height: 120px; }

    .close-button { top: 0.5rem; left: 0.5rem; width: 35px; height: 35px; }
    #quiz-modal .modal-header h2 { font-size: 1.3rem; }
}

/* === From: style2.css === */
/* assets/css/style2.css - Unified, Responsive & Enhanced for All Pages */
:root {
    --primary-color: #006633;
    --primary-dark: #004d25;
    --secondary-color: #ffcc00;
    --text-main: #374151;
    --text-light: #6b7280;
    --bg-gradient: linear-gradient(135deg, #f0f4f8, #e6e9f0);
    --white-color: #fff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --border-radius-large: 20px;
    --border-radius-medium: 12px;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
    --icon-glow: 0 0 15px rgba(0, 102, 51, 0.5);
}

/* === Base Styles === */
body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    background: var(--bg-gradient);
    direction: rtl;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    padding: 0 1rem;
    box-sizing: border-box;
}

.container {
    width: 95vw;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--white-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    animation: fadeInContainer 0.8s ease-out;
}

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

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.university-logo, .logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.welcome-banner {
    background: linear-gradient(135deg, rgba(0, 102, 51, 0.08), rgba(0, 77, 37, 0.12));
    border-right: 6px solid var(--primary-color);
    border-radius: var(--border-radius-medium);
    padding: 1.5rem;
    margin: 2rem auto 0;
    max-width: 750px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    animation: slideInBanner 1s ease-out forwards;
}

@keyframes slideInBanner {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-banner i {
    font-size: 2.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 102, 51, 0.3);
}

.welcome-banner p {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-main);
    text-align: right;
}

/* === Common Grid Layouts === */
#categories-grid, .nav-grid, .item-card-grid, .photo-gallery, .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 600px) {
    #categories-grid, .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 2rem;
    }
    .item-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (min-width: 992px) {
    #categories-grid, .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 2.5rem;
    }
}

/* === Card Styles (Applied to all card types) === */
.category-card, .nav-item, .item-card, .stat-card {
    background-color: #fcfdfe;
    border-radius: var(--border-radius-large);
    text-align: center;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid #eef2f6;
    animation: fadeInCard 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-card:nth-child(1), .nav-item:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2), .nav-item:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3), .nav-item:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4), .nav-item:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5), .nav-item:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6), .nav-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* !!! THE FIX FOR THE EMOJI ISSUE IS HERE !!!
  The original rule from style2.css is modified below.
  By removing the background-clip and text-fill-color properties,
  emojis will render correctly with their default colors.
  Font Awesome icons will now take their color from the 'color' property.
*/
.category-card i, .nav-item .icon-wrapper, .item-card .icon, .stat-card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color); /* This ensures both FA icons and Emojis are visible */
    transition: all 0.3s ease-in-out;
}

.category-card h3, .nav-item .nav-text {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 700;
    transition: all 0.3s ease-in-out;
}

.category-card:hover, .nav-item:hover, .item-card:hover, .stat-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-card:hover i, .nav-item:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    text-shadow: var(--icon-glow);
}

.category-card:hover h3, .nav-item:hover .nav-text {
    color: var(--primary-dark);
}

/* === أنماط مخصصة للكليات مع لمسات بصرية محسنة === */
/* كلية الطب البشري */
.category-card[data-category="medicine"] {
    background: linear-gradient(145deg, #fdf2f2, #ffffff);
    border: 2px solid rgba(192, 57, 43, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="medicine"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(192, 57, 43, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="medicine"] i {
    color: var(--medicine-color);
    text-shadow: 0 0 20px rgba(192, 57, 43, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="medicine"]:hover {
    border-color: var(--medicine-color);
    box-shadow: 0 15px 35px rgba(192, 57, 43, 0.2);
    background: linear-gradient(145deg, #fcebeb, #ffffff);
}

.category-card[data-category="medicine"]:hover i {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(192, 57, 43, 0.4));
}

/* كلية العلوم الصحية */
.category-card[data-category="health"] {
    background: linear-gradient(145deg, #fff5f5, #ffffff);
    border: 2px solid rgba(231, 76, 60, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="health"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="health"] i {
    color: var(--health-color);
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="health"]:hover {
    border-color: var(--health-color);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.2);
    background: linear-gradient(145deg, #fff0f0, #ffffff);
}

.category-card[data-category="health"]:hover i {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(231, 76, 60, 0.4));
}

/* كلية التمريض والقبالة */
.category-card[data-category="nursing"] {
    background: linear-gradient(145deg, #f8f5ff, #ffffff);
    border: 2px solid rgba(142, 68, 173, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="nursing"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="nursing"] i {
    color: var(--nursing-color);
    text-shadow: 0 0 20px rgba(142, 68, 173, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="nursing"]:hover {
    border-color: var(--nursing-color);
    box-shadow: 0 15px 35px rgba(142, 68, 173, 0.2);
    background: linear-gradient(145deg, #f3f0ff, #ffffff);
}

.category-card[data-category="nursing"]:hover i {
    transform: scale(1.15) rotate(-3deg);
    filter: drop-shadow(0 0 15px rgba(142, 68, 173, 0.4));
}

/* كلية الهندسة */
.category-card[data-category="engineering"] {
    background: linear-gradient(145deg, #f0f8ff, #ffffff);
    border: 2px solid rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="engineering"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="engineering"] i {
    color: var(--engineering-color);
    text-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="engineering"]:hover {
    border-color: var(--engineering-color);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
    background: linear-gradient(145deg, #e6f3ff, #ffffff);
}

.category-card[data-category="engineering"]:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(52, 152, 219, 0.4));
}

/* كلية العلوم */
.category-card[data-category="science"] {
    background: linear-gradient(145deg, #f0fffc, #ffffff);
    border: 2px solid rgba(22, 160, 133, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="science"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(22, 160, 133, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="science"] i {
    color: var(--science-color);
    text-shadow: 0 0 20px rgba(22, 160, 133, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="science"]:hover {
    border-color: var(--science-color);
    box-shadow: 0 15px 35px rgba(22, 160, 133, 0.2);
    background: linear-gradient(145deg, #e8fff8, #ffffff);
}

.category-card[data-category="science"]:hover i {
    transform: scale(1.15) rotate(-3deg);
    filter: drop-shadow(0 0 15px rgba(22, 160, 133, 0.4));
}

/* كلية تكنولوجيا المعلومات */
.category-card[data-category="it"] {
    background: linear-gradient(145deg, #faf5ff, #ffffff);
    border: 2px solid rgba(155, 89, 182, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="it"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="it"] i {
    color: var(--it-color);
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="it"]:hover {
    border-color: var(--it-color);
    box-shadow: 0 15px 35px rgba(155, 89, 182, 0.2);
    background: linear-gradient(145deg, #f5f0ff, #ffffff);
}

.category-card[data-category="it"]:hover i {
    transform: scale(1.15) rotate(-3deg);
    filter: drop-shadow(0 0 15px rgba(155, 89, 182, 0.4));
}

/* كلية الآداب والعلوم الإنسانية */
.category-card[data-category="humanities"] {
    background: linear-gradient(145deg, #fff8f0, #ffffff);
    border: 2px solid rgba(230, 126, 34, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="humanities"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="humanities"] i {
    color: var(--humanities-color);
    text-shadow: 0 0 20px rgba(230, 126, 34, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="humanities"]:hover {
    border-color: var(--humanities-color);
    box-shadow: 0 15px 35px rgba(230, 126, 34, 0.2);
    background: linear-gradient(145deg, #fff5e6, #ffffff);
}

.category-card[data-category="humanities"]:hover i {
    transform: scale(1.15) rotate(7deg);
    filter: drop-shadow(0 0 15px rgba(230, 126, 34, 0.4));
}


/* كلية الاقتصاد والعلوم الإدارية */
.category-card[data-category="economics"] {
    background: linear-gradient(145deg, #fffaf0, #ffffff);
    border: 2px solid rgba(243, 156, 18, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="economics"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="economics"] i {
    color: var(--economics-color);
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="economics"]:hover {
    border-color: var(--economics-color);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.2);
    background: linear-gradient(145deg, #fff8e6, #ffffff);
}

.category-card[data-category="economics"]:hover i {
    transform: scale(1.15) rotate(-7deg);
    filter: drop-shadow(0 0 15px rgba(243, 156, 18, 0.4));
}

/* كلية التربية */
.category-card[data-category="education"] {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px solid rgba(44, 62, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="education"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(44, 62, 80, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="education"] i {
    color: var(--education-color);
    text-shadow: 0 0 20px rgba(44, 62, 80, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="education"]:hover {
    border-color: var(--education-color);
    box-shadow: 0 15px 35px rgba(44, 62, 80, 0.2);
    background: linear-gradient(145deg, #f4f5f7, #ffffff);
}

.category-card[data-category="education"]:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(44, 62, 80, 0.4));
}

/* كلية الشريعة والقانون */
.category-card[data-category="sharia"] {
    background: linear-gradient(145deg, #fdf5e6, #ffffff);
    border: 2px solid rgba(139, 69, 19, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="sharia"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="sharia"] i {
    color: var(--sharia-color);
    text-shadow: 0 0 20px rgba(139, 69, 19, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="sharia"]:hover {
    border-color: var(--sharia-color);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.2);
    background: linear-gradient(145deg, #f9f0e1, #ffffff);
}

.category-card[data-category="sharia"]:hover i {
    transform: scale(1.15) rotate(4deg);
    filter: drop-shadow(0 0 15px rgba(139, 69, 19, 0.4));
}

/* كلية أصول الدين */
.category-card[data-category="religion"] {
    background: linear-gradient(145deg, #f0fff4, #ffffff);
    border: 2px solid rgba(39, 174, 96, 0.2);
    position: relative;
    overflow: hidden;
}

.category-card[data-category="religion"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(39, 174, 96, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.category-card[data-category="religion"] i {
    color: var(--religion-color);
    text-shadow: 0 0 20px rgba(39, 174, 96, 0.3);
    z-index: 1;
    position: relative;
}

.category-card[data-category="religion"]:hover {
    border-color: var(--religion-color);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.2);
    background: linear-gradient(145deg, #e8fff0, #ffffff);
}

.category-card[data-category="religion"]:hover i {
    transform: scale(1.15) rotate(-4deg);
    filter: drop-shadow(0 0 15px rgba(39, 174, 96, 0.4));
}

/* تأثير تموج عند النقر */
.category-card {
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.category-card:active::after {
    width: 300px;
    height: 300px;
}

/* تحسين النصوص */
.category-card h3 {
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Specific overrides for item cards in content sections */
.item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    padding: 1rem;
    border-radius: var(--border-radius-medium);
    border: 1px solid #eef2f6;
    text-align: right;
    flex-direction: row;
}

.item-card .icon {
    font-size: 2rem;
    margin-bottom: 0;
}

.item-card span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

/* Specific overrides for stat cards */
.stat-card {
    padding: 1.2rem 0.8rem;
    border-radius: var(--border-radius-large);
    background-color: #f0f4f8;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0.3rem 0;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
}

/* === Action Buttons & Centering === */
.back-button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.action-button, .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, var(--primary-color), #007a3f);
    color: var(--white-color);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    box-shadow: 0 6px 20px rgba(0, 102, 51, 0.3);
    text-decoration: none;
    flex-shrink: 0;
}

.action-button:hover, .back-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 102, 51, 0.45);
    background: linear-gradient(45deg, var(--primary-dark), #006633);
}

/* === Content Sections (e.g., in hospital.html) === */
.content-section {
    display: none;
    animation: fadeIn 0.7s ease-out;
    background: var(--white-color);
    padding: 1.8rem;
    border-radius: var(--border-radius-large);
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

.content-section h2, .content-section h3 {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: var(--primary-dark);
    margin: 0;
    font-weight: 800;
}

.content-section h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--primary-color);
    margin-top: 1.8rem;
    margin-bottom: 1rem;
}

.heading-icon {
    font-size: 1.2em;
    color: var(--primary-color);
}

/* === Modal Styles (Shared across all pages) === */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-container.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    width: 95%;
    max-width: 900px;
    text-align: right;
    box-shadow: var(--shadow-hover);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-container.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #f0f4f8;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.close-button:hover {
    color: var(--white-color);
    background-color: #e74c3c;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.modal-header #modal-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin: 0;
    font-weight: 800;
}

#modal-body {
    overflow-y: auto;
    padding-left: 1rem;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

#modal-body::-webkit-scrollbar {
    width: 8px;
}

#modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.modal-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
}

/* === Specific styles for modal content === */
#modal-body .major-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

#modal-body .major-title::before {
    content: '\f19d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.75rem;
    font-size: 1.2rem;
    color: var(--secondary-color);
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}
#modal-body ul li p.major-title {
    display: flex;
    align-items: center;
}
#modal-body ul {
    padding: 0;
    list-style: none;
}
#modal-body ul.info-list li {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0;
    margin-bottom: 0;
    transform: none;
    opacity: 1;
    animation: none;
    transition: none;
}
#modal-body ul.info-list li i.fa-check-circle {
    color: var(--primary-color);
    margin-left: 0.5rem;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}
#modal-body ul.info-list li:hover i.fa-check-circle {
    transform: scale(1.2);
}

/* Styles for grant cards */
.grant-card {
    background-color: #fcfdfe;
    border-right: 5px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.grant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.grant-card h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1.35rem;
    color: var(--primary-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grant-percentage {
    background-color: var(--secondary-color);
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(255, 204, 0, 0.3);
}

.grant-details ul {
    list-style: none;
    padding-right: 0;
    margin: 0;
    font-size: 1rem;
    color: var(--text-light);
}

.grant-details li {
    padding-right: 25px;
    position: relative;
    margin-bottom: 0.5rem;
}

.grant-details li::before {
    content: '🔹';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-color);
}

/* Styles for academic rates grid */
.rates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

@media (min-width: 480px) {
    .rates-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.5rem;
    }
}

.rates-group {
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rates-group .gender-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.rate-item .stream {
    color: var(--text-light);
}

.rate-item .rate-value {
    font-weight: 700;
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(0, 102, 51, 0.2);
}

.new-major {
    color: #d9534f;
    font-weight: bold;
}

/* === Lightbox and Gallery styles === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}
.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    animation: zoomIn 0.3s ease-out;
}
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.lightbox .close-button {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox .close-button:hover,
.lightbox .close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* === Media Queries for better mobile handling === */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    .header h1 {
        font-size: 1.8rem;
    }
    .welcome-banner p {
        font-size: 1rem;
    }
    .modal-content {
        padding: 1.5rem;
    }
    .modal-header h2 {
        font-size: 1.5rem;
    }
    .modal-header #modal-icon {
        font-size: 2.5rem;
    }
    .close-button {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 0.8rem;
        left: 0.8rem;
    }
    .content-section h2, .content-section h3 {
        font-size: 1.5rem;
    }
}

/* Smallest mobile devices */
@media (max-width: 480px) {
    #categories-grid, .nav-grid, .stats-grid, .photo-gallery, .item-card-grid {
        grid-template-columns: 1fr;
    }
    .category-card, .nav-item {
        padding: 1.8rem 1rem;
    }
    .category-card i, .nav-item .icon-wrapper {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    .category-card h3, .nav-item .nav-text {
        font-size: 1.2rem;
    }
    .back-button-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    .action-button, .back-btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    .stat-card .stat-number {
        font-size: 1.8rem;
    }
    .stat-card .stat-label {
        font-size: 0.85rem;
    }
}

/* === Specific styles for hospital.html === */
/* ========================================= */

/* Add specific styling to the container in hospital page to prevent layout issues */
.container {
  width: 95vw;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--white-color);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow);
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.university-logo, .logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* === Add the following code at the end of the file === */

/* 1. Adjust the main game container for wider screens to solve the blank space issue */
@media (min-width: 992px) {
    .game-container {
        max-width: 1400px;
        padding: 40px;
    }
}

/* 2. Fix the grid layout for the map and other sections */
.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 25px;

}
/* --- تعديلات على حاوية الأزرار لملء المساحة وتوسيطها --- */
#map-scene .options-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 3 أعمدة متساوية */
    gap: 15px; /* المسافة بين الأزرار */
    width: 100%; /* اجعلها تأخذ كامل عرض الأب */
    max-width: none; /* allow full expansion so grid can show two columns on larger screens */
    margin: 20px auto 0 auto; /* توسيط الحاوية نفسها */
    padding: 0 10px; /* بعض الحشو من الجوانب */
}

/* Wrap each option-button + optional pill so the grid treats them as single items */
.option-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.option-wrap .option-btn {
    flex: 1 1 auto; /* button grows to fill remaining space */
}
.option-wrap .stage-points-pill {
    flex: 0 0 auto; /* pill keeps its size */
}

/* On narrow screens, stack the contents of the wrapper vertically */
@media (max-width: 480px) {
    .option-wrap { flex-direction: column; align-items: stretch; }
    #map-scene .options-container { grid-template-columns: 1fr; max-width: 420px; }
}

/* تعديل بسيط للتأكد من أن الأزرار الأخيرة تتوسط بشكل جيد */
#map-scene .options-container .option-btn[data-destination="certificate"] {
    grid-column: span 2; /* اجعل زر الشهادة يمتد على كامل الأعمدة الثلاثة */
}

/* تأكد من أن زر التبادل الأكاديمي يتوسط أيضاً لو كان وحده في سطر */
#map-scene .options-container .option-btn:last-of-type:not([data-destination="certificate"]) {
    grid-column: span 2; /* يمتد على 3 أعمدة */
    /* قم بإلغاء هذا السطر إذا كان هناك أكثر من زر في السطر الأخير عدا الشهادة */
}

/* الأزرار نفسها */
#map-scene .option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100px; /* لضمان ارتفاع مناسب للأزرار */
    padding: 10px;
}

/* 4. Ensure the `options-container` in the map scene has the correct grid layout */
#faculties-scene .info-scene-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
@media (max-width: 600px) {
    #faculties-scene .info-scene-container {
        grid-template-columns: 1fr;
    }
}

/* 5. Fix for `hospital.html` page to align content correctly with the main layout */
.container {
  max-width: 800px; /* Use the same max-width as game-container */
  padding: 2rem;
  margin: 2rem auto;
}

.nav-grid {
    /* Keep a consistent two-column layout on laptop/desktop; smaller screens overridden by media queries */
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 15px;
}
.item-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
@media (min-width: 768px) {
  .container {
    max-width: 1200px;
  }
}
@media (min-width: 992px) {
    .game-container, .container {
        max-width: 1400px;
        padding: 40px;
    }
}
/* 1. تأثيرات عامة للأزرار (يمكن تطبيقها على فئات الأزرار الشائعة) */
/* هذا سيجعل الأزرار تتفاعل بصريا عند التحويم أو النقر */
button, .btn, .nav-item, .answer-option {
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

button:hover, .btn:hover, .nav-item:hover, .answer-option:hover {
    transform: translateY(-2px); /* تحريك خفيف للأعلى */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* إضافة ظل خفيف */
}

button:active, .btn:active, .nav-item:active, .answer-option:active {
    transform: translateY(0); /* العودة لمكانها عند النقر */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* ظل أقل عند الضغط */
    background-color: var(--button-active-color, #2e7d32); /* لون أغمق قليلاً عند النقر */
}

/* 2. تأثيرات انتقال سلسة للعناصر التي تظهر أو تختفي أو يتغير حجمها */
/* هذا سيجعل النوافذ المنبثقة والعناصر الأخرى تظهر وتختفي بسلاسة */
.popup-overlay, .popup-content,
.content-section, .nav-grid,
.quiz-container, .question-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* مثال: لجعل النوافذ المنبثقة تظهر من الأعلى */
.popup-content.visible {
    transform: translateY(0);
    opacity: 1;
}

.popup-content {
    transform: translateY(-20px);
    opacity: 0;
}
/* ========================================= */
/* === تحسينات الأزرار والتجاوب مع الجوال === */
/* ========================================= */

@media (max-width: 768px) {
  
    /*
     * هذا الكود يستهدف الحاوية التي تجمع الأزرار
     * ويجعلها ترتب الأزرار فوق بعضها (عموديا) وتوسطها
     */
    .back-button-container, .info-footer, .end-scene-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px; /* لزيادة المسافة العمودية بين الأزرار */
    }

    /*
     * هذا الكود يستهدف الأزرار نفسها
     * ويمنعها من التمدد على كامل الشاشة ويعطيها عرضًا مناسبًا
     */
    .action-button {
        width: 90%; /* اجعل عرض الزر 90% من الحاوية */
        max-width: 400px; /* ولكن لا يتجاوز هذا العرض أبداً */
        padding: 14px 20px; /* تعديل الحشوة لتناسب الجوال */
        font-size: 16px; /* تصغير حجم الخط قليلاً */
    }
}
/* ========================================= */
/* === تحسينات البطاقات (الـ Cards) على الجوال === */
/* ========================================= */

@media (max-width: 768px) {
    /* الأزرار والمجموعات السابقة */
    .back-button-container, .info-footer, .end-scene-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px; /* لزيادة المسافة العمودية بين الأزرار */
    }

    .action-button {
        width: 90%; /* اجعل عرض الزر 90% من الحاوية */
        max-width: 400px; /* ولكن لا يتجاوز هذا العرض أبداً */
        padding: 14px 20px; /* تعديل الحشوة لتناسب الجوال */
        font-size: 16px; /* تصغير حجم الخط قليلاً */
    }

    /* === تعديلات جديدة لبطاقات المعلومات في صفحات مثل index.html === */
    .info-card {
        width: 90%; /* اجعل عرض البطاقة 90% من عرض الشاشة */
        max-width: 450px; /* لا تتجاوز هذا العرض حتى على الشاشات الأكبر قليلاً */
        margin: 15px auto; /* توسيط البطاقة وإضافة مسافة من الأعلى والأسفل */
        padding: 20px; /* زيادة الحشوة الداخلية للبطاقة */
    }

    .info-card h3 {
        font-size: 20px; /* حجم عنوان البطاقة */
        margin-bottom: 10px;
    }

    .info-card p {
        font-size: 15px; /* حجم نص البطاقة */
        line-height: 1.6;
    }

    .info-card i, .info-card img { /* استهداف الأيقونات والصور داخل البطاقات */
        font-size: 40px; /* تكبير حجم الأيقونة */
        margin-bottom: 15px; /* مسافة تحت الأيقونة */
    }

    /* لتحسين المحاذاة الداخلية إذا كانت البطاقة تستخدم Flexbox أو Grid */
    .info-card-content {
        display: flex;
        flex-direction: column;
        align-items: center; /* توسيط المحتوى داخل البطاقة */
        text-align: center; /* توسيط النصوص */
    }

    /* تعديل الهيدر على الجوال */
    header {
        padding: 10px 15px; /* تقليل الحشوة في الهيدر */
    }

    .logo-container {
        font-size: 1.2em;
    }

    .user-profile img {
        width: 35px; /* تصغير صورة البروفايل */
        height: 35px;
    }

    /* تحسينات عامة على حجم الخطوط لجعلها مريحة على الجوال */
    body {
        font-size: 16px;
    }
}
/* ================================================= */
/* === التصميم الاحترافي الجديد للصفحة الرئيسية === */
/* ================================================= */

/* تحسين الحاوية الرئيسية للصفحة */
#landing-screen {
    max-width: 900px; /* زيادة العرض الأقصى للصفحة */
    margin: auto;
    padding: 2rem;
}

#landing-screen h1 {
    font-size: 2.5rem; /* تكبير العنوان الرئيسي */
    font-weight: 800; /* خط أعرض */
    color: var(--primary-dark);
}

#landing-screen .subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 40px auto; /* توسيط النص */
}

/* تصميم جديد لقسم "كيف تفوز في المسابقة؟" */
.competition-details {
    background-color: rgba(0, 102, 51, 0.05); /* خلفية خضراء شفافة */
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 40px;
    border-right: 4px solid var(--primary-color);
}

.competition-details h4 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.competition-details ul {
    list-style: none; /* إزالة النقاط الافتراضية */
    padding-right: 0;
    margin: 0;
}

.competition-details li {
    padding-right: 30px; /* مساحة للأيقونة الجديدة */
    position: relative;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-light);
}

/* إضافة أيقونة "صح" مخصصة بجانب كل نقطة */
.competition-details li::before {
    content: '✔';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary-color);
    background-color: rgba(0, 102, 51, 0.1);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    font-weight: bold;
}

/* --- تصميم جديد للبطاقات الثلاث --- */

/* حاوية البطاقات لتنظيمها */
.features-grid {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد على الجوال */
    gap: 25px;
    margin-bottom: 40px;
}

/* تصميم البطاقة الاحترافي */
.feature-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid #eef2f6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* اجعلها تأخذ عرض الحاوية */
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 77, 37, 0.12);
}

/* تصميم أيقونة البطاقة */
.feature-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin: 0 0 10px 0;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* تصميم الزر الرئيسي */
.action-button.main-cta {
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 102, 51, 0.3);
}

/* جعل التصميم متجاوبًا على الشاشات الأكبر */
@media (min-width: 768px) {
    /* على الشاشات الأكبر، نعرض البطاقات في 3 أعمدة */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* =================================================== */
/* === التصميم الاحترافي الجديد (نظام الحاوية) === */
/* =================================================== */

/* تصميم الحاوية الرئيسية البارزة */
#landing-screen {
    background-color: rgba(255, 255, 255, 0.95); /* خلفية بيضاء شبه شفافة */
    backdrop-filter: blur(10px); /* تأثير ضبابي للخلفية لمزيد من العمق */
    border-radius: 24px; /* حواف دائرية كبيرة */
    padding: 40px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15); /* ظل احترافي وبارز */
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 900px;
    width: 95%;
    margin: 2rem auto;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

/* تحسين الشعار */
#landing-screen .logo {
    max-width: 120px;
    margin-bottom: 25px;
}

/* تحسين العنوان الرئيسي */
#landing-screen h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

/* تحسين النص التمهيدي */
#landing-screen .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

/* تصميم قسم "كيف تفوز" */
#landing-screen .competition-details {
    background-color: #f9fafb;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 40px;
    text-align: right; /* محاذاة النص لليمين داخل هذا القسم */
}

#landing-screen .competition-details h4 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-dark);
    text-align: center; /* توسيط العنوان فقط */
}

#landing-screen .competition-details ul {
    list-style: none;
    padding-right: 0;
    margin: 0;
}

#landing-screen .competition-details li {
    padding-right: 30px;
    position: relative;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-light);
}

#landing-screen .competition-details li::before {
    content: '✔';
    position: absolute;
    right: 0;
    top: 2px;
    color: var(--primary-color);
    background-color: rgba(0, 102, 51, 0.1);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 22px;
    font-weight: bold;
}
/* إضافة هذا داخل main.css أو style في نفس الصفحة */
@media (max-width: 600px) {
  .games-grid,
  .map-scene {
    display: flex;
    flex-direction: column; /* عمود واحد */
    align-items: stretch;
    gap: 15px;
  }

  .map-scene .map-icon,
  .games-grid .game-card {
    max-width: 100%;  /* تأخذ عرض كامل */
    width: 100%;
  }
}

/* تصميم جديد للبطاقات داخل الحاوية */
#landing-screen .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

#landing-screen .feature-card {
    background-color: #f9fafb;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: none; /* إزالة الظل من البطاقات الصغيرة لأن الحاوية الكبيرة لديها ظل */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

#landing-screen .feature-card:hover {
    transform: translateY(-5px);
    background-color: #fff;
    border-color: var(--primary-color);
}

/* تحسين زر "سجل الآن" */
#landing-screen .action-button.main-cta {
    padding: 16px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 102, 51, 0.25);
    transition: all 0.3s ease;
}

#landing-screen .action-button.main-cta:hover {
    box-shadow: 0 8px 25px rgba(0, 102, 51, 0.35);
    transform: scale(1.05) translateY(-2px);
    /* =================================================== */
/* === التصميم الاحترافي المضاف (آمن وبدون حذف) === */
/* =================================================== */

/* تصميم الحاوية الرئيسية البارزة للصفحة الأولى */
#landing-screen {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    max-width: 900px !important;
    width: 95% !important;
    margin: 2rem auto !important;
    text-align: center !important;
}

#landing-screen h1 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: var(--primary-dark) !important;
}

#landing-screen .subtitle {
    font-size: 1.1rem !important;
    color: var(--text-light) !important;
    max-width: 600px !important;
    margin: 0 auto 40px auto !important;
}

/* تصميم قسم "كيف تفوز" */
#landing-screen .competition-details {
    background-color: #f9fafb !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 12px !important;
    padding: 20px 25px !important;
    margin-bottom: 40px !important;
    text-align: right !important;
}

#landing-screen .competition-details h4 {
    text-align: center !important;
}

#landing-screen .competition-details ul {
    list-style: none !important;
    padding-right: 0 !important;
}

#landing-screen .competition-details li {
    padding-right: 30px !important;
    position: relative !important;
    margin-bottom: 10px !important;
}

#landing-screen .competition-details li::before {
    content: '✔' !important;
    position: absolute !important;
    right: 0 !important;
    top: 2px !important;
    color: var(--primary-color) !important;
    background-color: rgba(0, 102, 51, 0.1) !important;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    text-align: center !important;
    line-height: 22px !important;
    font-weight: bold !important;
}

/* تصميم جديد للبطاقات داخل الحاوية */
#landing-screen .features-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
}

#landing-screen .feature-card {
    background-color: #f9fafb !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease !important;
    width: auto !important;
}

#landing-screen .feature-card:hover {
    transform: translateY(-5px) !important;
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
}
}
/* =================================================== */
/* === أنماط شريط الحالة المطور (المرحلة الأولى) === */
/* =================================================== */

/* الحاوية الرئيسية لمعلومات اللاعب */
#player-info-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 5px 15px 5px 5px;
}

/* تصميم أفاتار المرشد */
.status-bar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

/* حاوية اسم ورتبة اللاعب */
.player-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

/* تصميم اسم اللاعب */
#player-name-span {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

/* تصميم رتبة اللاعب */
#player-rank-span {
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}
/* =================================================== */
/* === أنماط الشارات والإنجازات (المرحلة الثانية) === */
/* =================================================== */

.badges-section {
    margin-top: 30px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.badges-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
}

.badges-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.badge-card {
    background-color: #f9fafb;
    border-radius: var(--border-radius-main);
    padding: 15px;
    text-align: center;
    border: 1px solid #eef2f6;
}

.badge-card .badge-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 10px;
    filter: grayscale(1); /* اللون الرمادي للشارات غير المكتسبة */
    opacity: 0.5;
    transition: all 0.4s ease;
}

.badge-card.earned .badge-icon {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

.badge-card .badge-name {
    font-weight: bold;
    color: #90a4ae; /* لون باهت للشارات غير المكتسبة */
    font-size: 14px;
}

.badge-card.earned .badge-name {
    color: var(--primary-dark);
}

.badge-card .badge-description {
    font-size: 12px;
    color: #b0bec5;
    display: none; /* يمكن إظهارها عند التحويم لاحقاً */
}

/* --- تصميم رسالة التهنئة (Toast Notification) --- */
#toast-notification {
    position: fixed;
    bottom: -100px; /* يبدأ خارج الشاشة */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2e7d32, #1a5e20);
    color: white;
    padding: 16px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#toast-notification.show {
    bottom: 30px; /* يظهر داخل الشاشة */
}

#toast-notification .toast-icon {
    font-size: 1.8rem;
}
#map-scene .option-btn:hover {
    transform: translateY(-5px); /* تحريك الزر للأعلى قليلاً */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* إضافة ظل خفيف */
    border-color: var(--secondary-color); /* تغيير لون الإطار للون الثانوي */
}
#map-scene .option-btn.completed {
    background-color: #e8f5e9; /* لون أخضر فاتح للخلفية */
    border-color: #28a745; /* لون إطار أخضر */
    color: #28a745;
    opacity: 0.8; /* جعلها شفافة قليلاً */
}

#map-scene .option-btn.completed::after {
    content: '✔'; /* إضافة علامة صح */
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
    font-size: 18px;
}
/* --- توسيط خريطة الجامعة في الشاشة --- */
#map-scene .scene-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* --- توسيط خريطة الجامعة في الشاشة (النسخة الصحيحة) --- */
#map-scene .scene-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* =================================================== */
/* === تحسينات بصرية للزر الرئيسي وشريط الحالة === */
/* =================================================== */

/* --- 1. تصميم مميز لزر "سجل الآن" --- */

/* إضافة حركة النبض والتوهج */
@keyframes pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 102, 51, 0.2), 0 0 10px rgba(0, 102, 51, 0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(0, 102, 51, 0.4), 0 0 30px rgba(0, 102, 51, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 102, 51, 0.2), 0 0 10px rgba(0, 102, 51, 0.2);
    }
}

/* تطبيق الحركة على الزر الرئيسي */
.action-button.main-cta {
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 102, 51, 0.3);
    animation: pulse-glow 2.5s infinite ease-in-out;
}


/* --- 2. تصميم مؤشر التقدم في شريط الحالة --- */

/* تعديل الشريط الرئيسي لاستيعاب القسم الجديد */
#status-bar {
    display: grid;
    grid-template-columns: auto 1fr auto; /* معلومات اللاعب | شريط التقدم | الأزرار */
    align-items: center;
    gap: 20px;
}

/* حاوية قسم شريط التقدم */
.progress-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* الحاوية الخارجية للشريط */
.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

/* الشريط الممتلئ (الذي يمثل التقدم) */
.progress-bar-fill {
    height: 100%;
    width: 0%; /* سيتغير بالجافاسكريبت */
    background: linear-gradient(90deg, #fdd835, #ffeb3b);
    border-radius: 16px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px rgba(253, 216, 53, 0.5);
}

/* نص التقدم فوق الشريط */
.progress-bar-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* تعديلات للشاشات الصغيرة */
@media (max-width: 768px) {
    #status-bar {
        grid-template-columns: auto 1fr; /* معلومات اللاعب | الأزرار */
        padding: 0 15px;
    }
 /* ========================================= */
/* === 7. التصميم المتجاوب (Media Queries) === */
/* ========================================= */

@media (max-width: 768px) {
    /* --- تعديل شريط الحالة ليصبح من طابقين --- */
    #status-bar {
        height: auto; /* السماح بتمدد الارتفاع */
        padding: 10px 15px;
        display: grid;
        grid-template-columns: 1fr 1fr; /* عمودان للمعلومات والأزرار */
        grid-template-rows: auto auto; /* صفان */
        gap: 10px;
    }

    body {
        padding-top: 110px; /* زيادة المساحة العلوية لتناسب الشريط الجديد */
    }

    .player-info-section {
        grid-column: 1 / 2; /* معلومات اللاعب في العمود الأول */
        grid-row: 1 / 2;
        justify-self: start;
    }

    .controls-section {
        grid-column: 2 / 3; /* الأزرار في العمود الثاني */
        grid-row: 1 / 2;
        justify-self: end;
    }

    /* --- إظهار شريط التقدم في صف خاص به --- */
    .progress-section {
        display: flex; /* إظهار الشريط */
        grid-column: 1 / -1; /* جعله يمتد على كامل العرض */
        grid-row: 2 / 3;
    }

    /* إخفاء نصوص الأزرار للحفاظ على المساحة */
    .status-bar-btn .btn-text {
        display: none;
    }
    .status-bar-btn {
        padding: 10px;
        width: 45px;
        height: 45px;
        justify-content: center;
    }
}
    
    /* التأكد من أن الأزرار ومعلومات اللاعب في الأطراف */
    .player-info-section {
        justify-self: start;
    }
    .controls-section {
        justify-self: end;
    }
}
/* =================================================================== */
/* === ملف CSS الموحد والمنظم - الإصدار الاحترافي === */
/* =================================================================== */

/* ... (كل محتوى الملف المنظم الذي أرسلته سابقاً يبقى كما هو) ... */

/* ========================================= */
/* === 7. التصميم المتجاوب (Media Queries) === */
/* ========================================= */

@media (max-width: 768px) {
    /* --- التصميم الجديد لشريط الحالة على الجوال --- */
    body {
        padding-top: 60px; /* تعديل المساحة العلوية لتناسب الشريط الجديد */
    }

    #status-bar {
        height: 60px; /* تحديد ارتفاع ثابت للشريط */
        padding: 0 10px;
        display: grid;
        grid-template-columns: auto 1fr auto; /* [معلومات اللاعب] [شريط التقدم] [أزرار التحكم] */
        gap: 10px;
        align-items: center;
    }

    /* قسم معلومات اللاعب */
    .player-info-section {
        justify-self: start;
    }
   /* --- واستبدله بهذا الكود المعدل --- */
@media (max-width: 768px) {
    /* إخفاء الرتبة فقط لتوفير المساحة */
    #player-rank-span {
        display: none; 
    }

    /* تعديل عرض النقاط لتكون انسيابية وبدون فقاعة */
    #player-score-display {
        display: flex; /* التأكد من أن العنصر ظاهر */
        background: none; /* إزالة الخلفية */
        border: none; /* إزالة الحدود */
        padding: 0; /* إزالة المساحات الداخلية */
        box-shadow: none; /* إزالة الظل */
        gap: 5px; /* تقليل المسافة بين الأيقونة والنص */
    }
}
    #player-name-span {
        font-size: 14px; /* تصغير حجم الاسم */
    }
    #player-info-display {
        padding: 5px 10px 5px 5px; /* تعديل الحشوة */
    }

    /* قسم شريط التقدم */
    .progress-section {
        display: flex; /* التأكد من ظهور الشريط */
    }
    .progress-bar-label {
        font-size: 12px; /* تصغير نص التقدم */
    }

    /* قسم أزرار التحكم */
    .controls-section {
       justify-self: end;
    }
    .status-bar-btn .btn-text {
        display: none; /* إخفاء نصوص الأزرار */
    }
    .status-bar-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    /* --- باقي التعديلات على الشاشات الأخرى --- */
    h1 {
        font-size: 26px;
    }

    .game-container, .faculty-container {
        padding: 10px;
    }
    
    #landing-screen .features-grid,
    #map-scene .options-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    #map-scene .options-container {
        grid-template-columns: 1fr;
    }
}
/* الحاوية الرئيسية للوجهات */
.destinations-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 10px;
}

/* كل بطاقة وجهة */
.destination-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #006400;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  background-color: #fff;
  transition: transform 0.2s ease-in-out;
}

.destination-card:hover {
  transform: scale(1.03);
}
@media (max-width: 600px) {
  .destinations-container {
    grid-template-columns: 1fr; /* عمود واحد على الجوال */
  }
}
/* === إصلاح مشكلة الفراغ على يمين الموقع === 
html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

.container, .row, .quiz-card, .status-bar {
  max-width: 100% !important;
  overflow-x: hidden !important;
}*/
.custom-modal {
  display: none; /* مخفي بشكل افتراضي */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.custom-modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0px 10px 25px rgba(0,0,0,0.3);
  animation: fadeInDown 0.3s ease;
}

.custom-modal-content h2 {
  margin-bottom: 10px;
  color: #2c3e50;
}

.custom-modal-content p {
  margin-bottom: 20px;
  color: #555;
  font-size: 16px;
}

.custom-modal-content button {
  background: #2e86de;
  color: white;
  padding: 10px 25px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

.custom-modal-content button:hover {
  background: #1b4f72;
}

@keyframes fadeInDown {
  from {opacity: 0; transform: translateY(-30px);}
  to {opacity: 1; transform: translateY(0);}
}
.odv-modal[hidden] { display:none }
.odv-modal { position:fixed; inset:0; display:grid; place-items:center; z-index:9999 }
.odv-modal__overlay { position:absolute; inset:0; background:rgba(0,0,0,.6) }
.odv-modal__dialog { position:relative; background:#fff; padding:24px; border-radius:16px; max-width:420px; text-align:center; }
.odv-modal__title { font-size:18px; font-weight:700; margin:0 0 8px }
.odv-modal__desc { font-size:15px; margin:0 0 20px }
.odv-btn { border:0; border-radius:8px; padding:10px 22px; cursor:pointer }
.odv-btn--primary { background:#2e86de; color:#fff }

/* === أنماط محسنة للنوافذ المنبثقة للكليات === */
.modal-container {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-container.active .modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* تحسين عرض المعدلات */
.rates-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.rates-group {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 51, 0.1);
    transition: all 0.3s ease;
}

.rates-group:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: rgba(0, 102, 51, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gender-title {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.3rem 0;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.stream {
    font-weight: 600;
    color: var(--text-dark);
}

.rate-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.major-title {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(0, 102, 51, 0.1), rgba(0, 102, 51, 0.05));
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}

.new-major {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

/* تحسين أيقونة النافذة المنبثقة */
.modal-header i {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 102, 51, 0.3));
}

/* تحسين الملاحظة الخاصة بكلية الطب */
.modal-footer {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #f39c12;
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.modal-footer::before {
    content: '⚠️';
    position: absolute;
    top: -10px;
    right: 15px;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.modal-footer p {
    margin: 0;
    color: #8b4513;
    font-weight: 600;
    line-height: 1.6;
    text-align: justify;
}

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

/* تأثيرات إضافية للأزرار */
.action-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-button:hover::before {
    left: 100%;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 51, 0.3);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .category-card[data-category]::before {
        display: none; /* إزالة التأثيرات المعقدة في الشاشات الصغيرة */
    }
    
    .rates-grid {
        gap: 0.8rem;
    }
    
    .rates-group {
        padding: 0.8rem;
    }
    
    .modal-content {
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

