/* ==========================================================================
   Mashroui AI (خلّها على أنس 🎓) - Minimalist Notion / Linear / Apple Design System
   ========================================================================== */

:root {
    --bg-main: #EAECEF;
    --bg-card: #F5F7FA;
    --bg-input: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --accent-green: #15803D;
    --accent-green-light: #E1F2E6;
    --accent-green-hover: #166534;
    
    --accent-warm: #F59E0B;
    --accent-warm-light: #FEF3C7;
    
    --border-color: #D1D5DB;
    --border-hover: #9CA3AF;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --font-family: 'IBM Plex Sans Arabic', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

html {
    direction: rtl;
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.3px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(234, 236, 239, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-highlight {
    color: var(--accent-green);
}

.desktop-nav {
    display: flex;
    gap: 6px;
}

.nav-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.nav-btn.active {
    color: var(--accent-green);
    background: var(--accent-green-light);
    font-weight: 600;
}

.count-badge {
    background: var(--accent-warm);
    color: #FFFFFF;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.dot-badge {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
}

/* Main Container Layout */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 24px 80px 24px;
    flex: 1;
}

/* View Sections Switcher */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Screen 1: Home View (Hero & Form)
   ========================================================================== */
.hero-container {
    text-align: center;
    max-width: 680px;
    margin: 24px auto 24px auto;
    position: relative;
}

/* Hero Floating Tags */
.floating-tags-container {
    height: 32px;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex-wrap: wrap;
}

.tag-floating {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    animation: floatTag 6s ease-in-out infinite alternate;
    white-space: nowrap;
}

.tag-floating:nth-child(2) {
    animation-delay: 1.5s;
    background: var(--accent-green-light);
    color: var(--accent-green);
    border-color: rgba(21, 128, 61, 0.15);
}

.tag-floating:nth-child(3) {
    animation-delay: 3s;
}

@keyframes floatTag {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

.hero-badge {
    display: inline-block;
    background: var(--accent-green-light);
    color: var(--accent-green);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Generator Form Card */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-width: 540px;
    margin: 0 auto 20px auto;
}

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

.form-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: block;
}

.form-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.08);
}

/* Custom Searchable Major Dropdown */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    z-index: 600;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.dropdown-trigger:hover {
    border-color: var(--border-hover);
}

.dropdown-trigger.active {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.08);
}

.trigger-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.trigger-text {
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
}

.dropdown-trigger.active .trigger-text {
    color: var(--text-primary);
}

.select-arrow {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.dropdown-menu-card {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    height: auto;
    max-height: 360px;
    display: flex;
    flex-direction: column;
}

.dropdown-menu-card.hidden {
    display: none !important;
}

.mobile-sheet-header {
    display: none;
}

.dropdown-search-box {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dropdown-search-box .search-icon {
    font-size: 15px;
    color: var(--text-muted);
}

.dropdown-search-box input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: var(--bg-main);
}

.dropdown-search-box input:focus {
    border-color: var(--border-hover);
    background: var(--bg-card);
}

.dropdown-options-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 290px;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 6px 4px 6px 0;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.dropdown-options-scroll::-webkit-scrollbar {
    width: 5px;
}

.dropdown-options-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-options-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

.dropdown-options-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.dropdown-group {
    padding: 2px 0;
    border-bottom: 1px dashed var(--border-color);
}

.dropdown-group:last-child {
    border-bottom: none;
}

.dropdown-group-title {
    padding: 8px 16px 4px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-main);
}

.dropdown-option {
    padding: 10px 18px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-option:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.dropdown-option.selected {
    background: var(--accent-green-light);
    color: var(--accent-green);
    font-weight: 600;
}

.dropdown-option.highlight-option {
    font-weight: 600;
    color: #B45309;
    background: var(--accent-warm-light);
    border-radius: var(--radius-sm);
    margin: 6px 12px;
}

.dropdown-option.highlight-option:hover {
    background: #FDE68A;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--accent-green);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent-green-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 9px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-main);
}

/* Ultra Compact Hero Stats Row */
.hero-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 5px 14px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.stat-divider {
    color: var(--text-muted);
    font-size: 12px;
}

/* Backdrop overlay for mobile bottom sheet (Completely disabled - no blur / no dark overlay) */
.dropdown-backdrop {
    display: none !important;
    pointer-events: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Mobile Bottom Sheet Modal Styles (< 768px) */
@media (max-width: 767px) {
    .dropdown-menu-card {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 80vh;
        border-radius: 20px 20px 0 0;
        border: none;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .mobile-sheet-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 16px 6px 16px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
    }

    .sheet-drag-handle {
        width: 32px;
        height: 4px;
        background: var(--border-hover);
        border-radius: 2px;
        margin-bottom: 8px;
    }

    .sheet-header-title {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
    }

    .sheet-close-btn {
        background: var(--bg-main);
        border: none;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .dropdown-options-scroll {
        max-height: 55vh;
    }

    .dropdown-option {
        min-height: 44px;
        font-size: 15px;
        padding: 10px 20px;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==========================================================================
   Screen 2: Loading Experience
   ========================================================================== */
.loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.spinner-container {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-green-light);
    animation: pulseCircle 1.6s ease-in-out infinite;
}

@keyframes pulseCircle {
    0% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0.6; }
}

.brain-icon {
    font-size: 28px;
    position: relative;
    z-index: 2;
}

.loading-status-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.progress-bar-container {
    background: var(--bg-main);
    border-radius: var(--radius-full);
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.progress-bar-fill {
    background: var(--accent-green);
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.loading-percentage {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   Screen 3: Results View & Filters
   ========================================================================== */
.results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 12px;
}

.search-box .search-icon {
    font-size: 15px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
}

.filters-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--accent-green-light);
    color: var(--accent-green);
    border-color: rgba(21, 128, 61, 0.2);
    font-weight: 600;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.card-top {
    margin-bottom: 16px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.35;
}

.card-arabic-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-problem-short {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sector-badge {
    background: var(--bg-main);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.project-type-tag {
    background: var(--bg-main);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.saudi-badge {
    background: #F0FDF4;
    color: #166534;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.wow-badge {
    background: var(--accent-warm-light);
    color: #B45309;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

/* Rank & Trending Badges */
.rank-badge {
    background: #111827;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.trending-badge {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.card-scores-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-main);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
}

.score-chip-mini {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Why Chosen Box in Modal */
.why-chosen-box {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.why-chosen-box h4 {
    color: #166534;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.why-chosen-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: #166534;
}

.why-chosen-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn-card-view {
    flex: 1;
    padding: 10px 14px;
    background: var(--accent-green);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.btn-card-view:hover {
    background: var(--accent-green-hover);
}

.btn-card-save {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-card-save:hover {
    border-color: var(--border-hover);
    color: #DC2626;
}

.btn-card-save.saved {
    color: #DC2626;
    background: #FEF2F2;
    border-color: #FCA5A5;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 16px auto;
}

/* ==========================================================================
   Project Details Modal
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.active {
    opacity: 1;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-arabic-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.detail-block {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.detail-block h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.detail-block p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tech-chips-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tech-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.score-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.score-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.score-card-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-green);
}

/* Modal Details Extra Lists & Grids */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 12.5px;
}

.team-card-title {
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 2px;
}

.qa-box {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

.qa-q {
    font-weight: 600;
    color: #92400E;
    margin-bottom: 2px;
}

.qa-a {
    color: #78350F;
}

.plan-stepper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.plan-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border-color);
}

.step-num-icon {
    background: var(--text-primary);
    color: #FFFFFF;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.improve-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.improve-list li {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* ==========================================================================
   Screen 5: Active Project & 6-Stage Roadmap
   ========================================================================== */
.active-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.active-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.active-stage-badge {
    background: var(--accent-green-light);
    color: var(--accent-green);
    border: 1px solid rgba(21, 128, 61, 0.2);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

.active-progress-row {
    margin-top: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-percent-badge {
    color: var(--accent-green);
}

.roadmap-container {
    margin-top: 24px;
}

.stage-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 14px;
    transition: var(--transition);
}

.stage-card.completed {
    border-color: #BBF7D0;
    background: #F0FDF4;
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stage-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stage-num-badge {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.stage-card.completed .stage-num-badge {
    background: var(--accent-green);
    color: #FFFFFF;
    border-color: var(--accent-green);
}

.stage-title {
    font-size: 16px;
    font-weight: 600;
}

.stage-tasks-count {
    font-size: 12px;
    color: var(--text-muted);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    cursor: pointer;
    font-size: 13.5px;
    transition: var(--transition);
    user-select: none;
}

.task-item.checked {
    background: #EAF6EE;
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(234, 236, 239, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 500;
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--text-muted);
    flex: 1;
}

.bottom-nav-item.active {
    color: var(--accent-green);
    font-weight: 600;
}

.bottom-nav-icon {
    font-size: 20px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding: 16px 16px 90px 16px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14.5px;
    }
    
    .form-card {
        padding: 20px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-hero {
        width: 100%;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .scores-grid {
        grid-template-columns: 1fr;
    }
   /* ==========================================================================
   Footer & Social Links Styles
   ========================================================================== */
.app-footer {
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 24px 20px;
    margin-top: 60px;
    margin-bottom: 70px;
}

@media (min-width: 769px) {
    .app-footer {
        margin-bottom: 0;
    }
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111827;
}

.footer-sub {
    font-size: 0.85rem;
    color: #6B7280;
    margin: 0;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-chip.snapchat {
    background-color: #FFFC00;
    color: #000000;
    border: 1px solid #E0D800;
}

.social-chip.snapchat:hover {
    background-color: #F5F200;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 252, 0, 0.4);
}

.social-chip.twitter {
    background-color: #000000;
    color: #FFFFFF;
    border: 1px solid #000000;
}

.social-chip.twitter:hover {
    background-color: #1A1A1A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
}
