        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Remove any black space at the bottom */
        html, body {
            margin-bottom: 0 !important;
            padding-bottom: 0 !important;
        }

        html {
            height: 100%;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
            width: 100%;
            max-width: 100vw;
            position: relative;
            background-color: #0a0a0c;
            -webkit-overflow-scrolling: touch;
        }

        body {
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            background: 
                linear-gradient(180deg, 
                    #141415 2%,
                    #141415 20%,
                    #141415 100%);
            background-attachment: fixed;
            background-color: #08080a;
            color: #ffffff;
            min-height: 100%;
            padding: 0;
            margin: 0;
            width: 100%;
            max-width: 100vw;
            direction: ltr;
            overflow-x: hidden;
            overflow-y: auto;
            position: relative;
        }
        
        /* Safe area padding for iOS notch / status bar in standalone mode */
        body {
            padding-top: env(safe-area-inset-top);
            padding-top: constant(safe-area-inset-top);
        }
        
        /* استثناء شامل للدوائر من أي قواعد max-width — الأحجام من --pie-size داخل .hero-banner */
        .progress-pie-wrapper,
        .progress-pie-wrapper *,
        .progress-pie-chart,
        .progress-pie-chart *,
        .ppc-progress,
        .ppc-progress *,
        .ppc-progress-svg,
        .ppc-progress-svg *,
        .ppc-percents,
        .ppc-percents * {
            max-width: none !important;
        }
        
        img, video, iframe {
            max-width: 100%;
            height: auto;
        }

        /* شريط التنقل: تثبيت ارتفاع الشعار كما في home.html */
        .navbar .logo-img {
            height: 34px !important;
            width: auto !important;
            object-fit: contain;
            flex-shrink: 0;
        }
        
        /* منع الخلفية البيضاء في الوضع الأفقي على الجوال فقط */
        @media (max-width: 896px) and (orientation: landscape) {
            *:not(.progress-pie-wrapper):not(.progress-pie-wrapper *):not(.progress-pie-chart):not(.progress-pie-chart *):not(.ppc-progress):not(.ppc-progress *):not(.ppc-progress-svg):not(.ppc-progress-svg *):not(.ppc-percents):not(.ppc-percents *) {
                max-width: 100%;
            }
        }

        /* Custom Scrollbar - متناسق مع ألوان الموقع */
        ::-webkit-scrollbar {
            width: 10px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(15, 15, 18, 0.8);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, 
                rgba(79, 197, 196, 0.6) 0%,
                rgba(42, 157, 156, 0.6) 100%);
            border-radius: 10px;
            border: 2px solid rgba(15, 15, 18, 0.8);
            transition: all 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, 
                rgba(79, 197, 196, 0.9) 0%,
                rgba(42, 157, 156, 0.9) 100%);
            box-shadow: 0 0 10px rgba(79, 197, 196, 0.5);
        }

        /* Firefox Scrollbar */
        * {
            scrollbar-width: thin;
            scrollbar-color: rgba(79, 197, 196, 0.6) rgba(15, 15, 18, 0.8);
        }

        /* Animated Light from Above */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 50%;
            background: radial-gradient(ellipse 100% 60% at 50% 0%,
                rgba(206, 206, 206, 0.055) 0%,
                rgba(215, 215, 215, 0.025) 30%,
                transparent 70%);
            animation: lightPulse 8s ease-in-out infinite;
            pointer-events: none;
            z-index: 5;
        }

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

        /* Grid Pattern Overlay */
        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(rgba(79, 197, 196, 0.015) 1px, transparent 1px),
                linear-gradient(90deg, rgba(79, 197, 196, 0.015) 1px, transparent 1px);
            background-size: 50px 50px;
            pointer-events: none;
            z-index: 10000;
            opacity: 0.15;
        }

        /* Pull to Refresh Styles */
        /* Pull to Refresh Styles - Pull Up */
        .pull-to-refresh-container {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10001;
            pointer-events: none;
            opacity: 0;
            transform: translateY(100px);
            transition: opacity 0.3s ease, transform 0.3s ease;
            background: rgba(10, 10, 12, 0.95);
            backdrop-filter: blur(10px);
        }

        .pull-to-refresh-container.active {
            opacity: 1;
            transform: translateY(0);
        }

        .pull-to-refresh-content {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .pull-to-refresh-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid rgba(79, 197, 196, 0.3);
            border-top-color: #4fc5c4;
            border-radius: 50%;
            animation: pullRefreshSpin 0.8s linear infinite;
        }

        .pull-to-refresh-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.875rem;
            font-weight: 500;
            text-align: center;
            direction: rtl;
        }

        @keyframes pullRefreshSpin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }


        /* Floating Navbar (same as home.html) */
        .navbar {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 20, 20, 0.94);
            backdrop-filter: blur(10px);
            border-radius: 50px;
            padding: 12px 30px;
            border: 1px solid #333;
            z-index: 1000;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            width: min(1120px, calc(100% - 40px));
            overflow: visible;
        }

        /* في وضع PWA نخفي النافبار العلوي على الجوال فقط (وليس iPad) */
        @media (display-mode: standalone) and (max-width: 768px) {
            .navbar {
                display: none !important;
            }
        }

        @media (display-mode: standalone) and (min-width: 769px) {
            .navbar {
                display: flex !important;
                visibility: visible !important;
                opacity: 1 !important;
            }
            .navbar.navbar-hidden {
                transform: translateX(-50%) !important;
            }
        }

        .navbar.scrolled {
            background: rgba(16, 16, 16, 0.96);
            border-color: #3a3a3a;
        }

        .navbar.navbar-hidden {
            transform: translate(-50%, -120%);
        }

        .nav-container {
            width: 100%;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 28px;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
            transition: opacity 0.3s ease;
            flex-shrink: 0;
            min-width: 0;
        }

        .logo-text {
            min-width: 0;
        }

        /* Mobile Landscape - Phones only (not tablets) - متصفح فقط (مو PWA) */
        @media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) and (display-mode: browser) {
            html, body {
                width: 100%;
                max-width: 100vw;
                overflow-x: hidden;
                position: relative;
            }
            
            * {
                max-width: 100vw;
            }
            .navbar {
                top: 15px;
                padding: 10px 20px;
                width: calc(100% - 30px);
                max-width: 500px;
                border-radius: 28px;
            }
            .nav-menu {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(27, 27, 28, 0.95);
                flex-direction: column;
                gap: 15px;
                margin: 0;
                padding: 20px;
                border: 1px solid #3a3a3a;
                border-radius: 15px;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
                margin-top: 10px;
                display: none !important;
                z-index: 999;
            }

            .nav-menu.active {
                display: flex !important;
            }

            .nav-menu li {
                width: 100%;
                padding: 0;
                border-bottom: 0;
                background: transparent;
            }

            .nav-menu li:hover {
                background: transparent;
            }

            .nav-menu li:last-child {
                margin-left: 0;
            }

            .nav-menu a {
                font-size: 0.95rem;
                width: 100%;
                display: block;
                padding: 12px;
                border-radius: 10px;
                text-align: center;
            }

            .nav-menu a::after {
                display: none;
            }

            .menu-toggle {
                display: none;
                margin-right: 0;
            }

            .nav-container {
                width: 100%;
            }

            .auth-buttons {
                display: flex !important;
            }

            body.user-activated .auth-buttons {
                display: none !important;
            }

            body.user-activated .menu-toggle {
                display: block !important;
            }

            /* Home icon button on mobile landscape */
            .nav-menu .home-icon-btn {
                width: 100%;
                height: auto;
                border: none;
                background: transparent;
                padding: 0;
                margin: 0;
                display: flex;
                align-items: center;
                gap: 0.75rem;
                border-radius: 0;
                justify-content: flex-start;
            }

            .nav-menu .home-icon-btn img {
                width: 20px;
                height: 20px;
                filter: grayscale(0%) opacity(1);
            }

            .nav-menu .home-icon-btn:hover {
                background: transparent;
                border: none;
                transform: none;
            }

            .nav-menu .home-icon-btn::before {
                content: 'الصفحة الرئيسية';
                font-size: 1rem;
                color: rgba(255, 255, 255, 0.7);
                font-weight: 500;
            }

            .nav-menu .home-icon-btn.active::before {
                color: #ffffff;
            }

            /* Logout button on mobile landscape */
            .nav-menu .logout-btn {
                width: 100%;
                height: auto;
                border: none;
                background: transparent;
                padding: 0;
                margin: 0;
                display: flex;
                align-items: center;
                gap: 0.75rem;
                border-radius: 0;
                justify-content: flex-start;
            }

            .nav-menu .logout-btn svg {
                width: 20px;
                height: 20px;
                fill: rgba(255, 255, 255, 0.7);
            }

            .nav-menu .logout-btn:hover {
                background: transparent;
                border: none;
                transform: none;
            }

            .nav-menu .logout-btn:hover svg {
                fill: rgba(255, 255, 255, 1);
            }

            .nav-menu .logout-btn::before {
                content: 'تسجيل الخروج';
                font-size: 1rem;
                color: rgba(255, 255, 255, 0.7);
                font-weight: 500;
            }

            .nav-menu .logout-btn:hover::before {
                color: #ffffff;
            }

            .nav-icon-buttons {
                flex-direction: column;
                gap: 0;
                width: 100%;
            }
        }

        .logo-container:hover {
            opacity: 0.9;
        }

        .logo-img {
            height: 34px;
            width: auto;
            object-fit: contain;
        }

        .logo-text {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .logo-main {
            font-size: 1.2rem;
            font-weight: 700;
            letter-spacing: 1px;
            color: #ffffff;
        }

        .logo-sub {
            font-size: 0.7rem;
            font-weight: 400;
            letter-spacing: 0.5px;
            color: rgba(255, 255, 255, 0.6);
            text-transform: uppercase;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 24px;
            align-items: center;
            margin: 0;
            margin-left: auto;
            padding: 0;
        }

        .nav-menu li {
            margin: 0;
            padding: 0;
        }

        /* Before activation: show only login/signup buttons */
        body.user-not-activated .nav-menu,
        body.user-not-activated .menu-toggle {
            display: none !important;
            visibility: hidden;
            pointer-events: none;
        }

        body.user-not-activated .mobile-auth-buttons,
        body.user-not-activated .mobile-home-link {
            display: none !important;
        }

        .nav-menu a {
            color: #e0e0e0;
            text-decoration: none;
            font-size: 0.95rem;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
            padding: 0;
            white-space: nowrap;
        }

        .nav-menu a.nav-link-locked {
            opacity: 0.5;
            cursor: pointer;
            position: relative;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition {
            pointer-events: none !important;
            cursor: not-allowed !important;
            transition: none !important;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition:hover {
            transition: none !important;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition::after {
            transition: none !important;
        }

        .nav-menu a.current-page-link {
            pointer-events: none !important;
            opacity: 1 !important;
            cursor: default !important;
            transition: none !important;
            color: #ffffff !important;
        }

        .nav-menu a.current-page-link:hover {
            transition: none !important;
        }

        .nav-menu a.current-page-link::after {
            transition: none !important;
        }


        .nav-menu a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 50%;
            transform: translateX(-50%);
            background: #ffffff;
            transition: all 0.3s ease;
        }

        .nav-menu a:hover::after,
        .nav-menu a.active::after {
            width: 100%;
        }

        .nav-menu a:hover,
        .nav-menu a.active {
            color: #ffffff;
        }

        .nav-menu a.nav-link-locked {
            opacity: 1;
            cursor: pointer;
            position: relative;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition {
            pointer-events: none !important;
            cursor: not-allowed !important;
            transition: none !important;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition:hover {
            transition: none !important;
        }

        .nav-menu a.nav-link-locked.disabled-no-transition::after {
            transition: none !important;
        }

        .nav-menu a.current-page-link {
            pointer-events: none !important;
            opacity: 1 !important;
            cursor: default !important;
            transition: none !important;
            color: #ffffff !important;
        }

        .nav-menu a.current-page-link:hover {
            transition: none !important;
        }

        .nav-menu a.current-page-link::after {
            transition: none !important;
        }

        .auth-buttons {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: nowrap;
            flex-shrink: 0;
        }

        .auth-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 18px;
            min-width: 92px;
            border-radius: 999px;
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            white-space: nowrap;
            border: 1px solid #333;
        }

        @media (max-width: 900px) {
            body.user-not-activated .navbar {
                padding: 10px 16px;
            }

            body.user-not-activated .nav-container {
                width: 100%;
                min-width: 0;
                gap: 8px;
            }

            body.user-not-activated .logo-container {
                flex: 1 1 auto;
                min-width: 0;
            }

            body.user-not-activated .logo-sub {
                display: none;
            }

            body.user-not-activated .auth-buttons {
                gap: 6px;
                flex: 0 0 auto;
            }

            body.user-not-activated .auth-buttons .auth-btn {
                min-width: 70px;
                padding: 8px 10px;
                font-size: 0.82rem;
            }
        }

        @media (max-width: 420px) {
            body.user-not-activated .logo-img {
                height: 28px;
            }

            body.user-not-activated .logo-main {
                font-size: 0.95rem;
            }
        }

        .login-btn {
            color: #e0e0e0;
            background: transparent;
        }

        .login-btn:hover {
            color: #ffffff;
            border-color: #555;
        }

        .signup-btn {
            background: #ffffff;
            color: #000000;
            border-color: #ffffff;
        }

        .signup-btn:hover {
            background: #f0f0f0;
            transform: translateY(-1px);
        }

        .logout-action-btn {
            background: #ffffff;
            color: #000000;
            border-color: #ffffff;
        }

        .logout-action-btn:hover {
            background: #f0f0f0;
            transform: translateY(-1px);
        }

        .mobile-auth-buttons .logout-action-btn {
            color: #000000 !important;
            background: #ffffff !important;
            border-color: #ffffff !important;
            font-weight: 700;
        }

        .logout-confirm-modal .activation-modal-content {
            gap: 0.9rem;
        }

        .logout-confirm-modal .activation-title {
            margin-bottom: 0.35rem;
        }

        .logout-confirm-modal .activation-subtitle {
            margin: 0;
        }

        .logout-confirm-modal .activation-actions {
            margin-top: 0.7rem;
            flex-direction: row-reverse;
        }

        .logout-confirm-modal .activation-actions > button {
            flex: 1 1 0;
            width: 0;
            min-width: 0;
            max-width: none;
        }

        .logout-confirm-modal .activation-submit-btn,
        .logout-confirm-modal .activation-back-btn {
            height: 50px;
            min-height: 50px;
            padding: 0 1rem;
            font-size: 0.95rem;
            max-width: none;
            margin-top: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .desktop-logout-btn,
        .mobile-logout-btn {
            display: none;
        }

        body.user-activated .desktop-logout-btn,
        body.user-activated .mobile-logout-btn {
            display: inline-flex !important;
        }

        body.user-activated .auth-buttons .js-open-login,
        body.user-activated .auth-buttons .js-open-signup,
        body.user-activated .mobile-auth-buttons .js-open-login,
        body.user-activated .mobile-auth-buttons .js-open-signup {
            display: none !important;
        }

        .mobile-auth-buttons {
            display: none;
            flex-direction: row;
            justify-content: center;
            align-items: center;
            flex-wrap: nowrap;
            gap: 14px;
            width: 100%;
            margin-top: 18px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        .mobile-auth-buttons .auth-btn::after {
            display: none !important;
        }

        /* Mobile Menu Toggle */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: #ffffff;
            font-size: 1.5rem;
            line-height: 1;
            cursor: pointer;
            padding: 0;
            z-index: 1001;
        }

        @media (min-width: 769px) {
            .nav-menu .mobile-auth-buttons {
                display: none !important;
            }

            .nav-menu {
                flex-direction: row-reverse;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                top: 15px;
                padding: 12px 20px;
                width: calc(100% - 30px);
                max-width: 500px;
                border-radius: 28px;
            }

            .nav-container {
                justify-content: space-between;
                gap: 0;
                width: 100%;
                align-items: center;
                min-height: 44px;
            }

            .navbar .menu-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 44px;
                min-height: 44px;
            }

            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(26, 26, 26, 0.95);
                flex-direction: column;
                padding: 20px;
                border-radius: 15px;
                border: 1px solid #3a3a3a;
                margin-top: 10px;
                gap: 15px;
            }

            .nav-menu.active {
                display: flex;
            }

            .nav-menu a {
                padding: 12px;
                border-radius: 10px;
                text-align: center;
            }

            .auth-buttons {
                display: none;
            }

            body.user-not-activated .auth-buttons {
                display: flex !important;
                gap: 8px;
                margin-inline-start: auto;
                flex: 0 0 46%;
                max-width: 46%;
                min-width: 0;
                justify-content: flex-end;
            }

            body.user-not-activated .auth-buttons .auth-btn {
                flex: 1 1 0;
                min-width: 0;
                padding: 8px 6px;
                font-size: 0.8rem;
            }

            body.user-not-activated .logo-container {
                flex: 1 1 54%;
                min-width: 0;
            }

            body.user-not-activated .logo-main {
                font-size: 0.95rem;
            }

            .mobile-auth-buttons {
                display: flex;
            }

            .mobile-home-link {
                margin-bottom: 0;
            }

            .mobile-home-link > a {
                margin-bottom: 0;
            }

            .nav-menu .mobile-auth-buttons {
                margin-top: 16px !important;
                padding-top: 14px !important;
            }

            .mobile-auth-buttons .auth-btn {
                flex: 1 1 calc(50% - 7px);
                text-align: center;
                min-width: 0;
                max-width: 140px;
            }

            .mobile-auth-buttons .signup-btn {
                background: #ffffff;
                color: #000000;
            }

            .menu-toggle {
                display: block;
            }

            .navbar.navbar-hidden {
                transform: translate(-50%, -120%);
            }

            .logo-main {
                font-size: 1rem;
            }

            .logo-sub {
                font-size: 0.62rem;
            }
        }

        @media (max-width: 480px) {
            .navbar {
                top: 15px;
                padding: 10px 15px;
                width: calc(100% - 30px);
                max-width: 500px;
            }

            .navbar .logo-img {
                height: 30px !important;
            }
        }

        /* Hero Section (after onboarding) */
        .hero {
            position: relative;
            min-height: 100vh;
            min-height: 100dvh;
            background-color: transparent;
            display: flex;
            align-items: center;
            padding: 80px 0;
            overflow: visible;
            width: 100%;
        }

        /* لوحة الملف: محاذاة أعلى الهيرو مع عنوان «متابعة الخطة الرياضية» */
        .hero:has(.hero-content-wrapper .workout-tracking-section-new) {
            align-items: flex-start;
            min-height: auto;
            padding-top: clamp(96px, 11vh, 120px);
            padding-bottom: clamp(40px, 6vh, 72px);
        }

        /* رفع صورة/بنر الهيرو فقط — باقي القسم والمتابعة كما كانت */
        .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-banner-wrapper {
            margin-top: clamp(-66px, -3.5vw, -22px);
        }

        .hero::after {
            display: none;
        }

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

        .hero-content-wrapper {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 0 90px;
            align-items: start;
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 40px;
            width: 100%;
            overflow: visible;
            position: relative;
        }

        /* عمود واحد على الموبايل/التابلت حتى يظهر الفاصل فقط من 1024px */
        .hero-content-wrapper:has(.workout-tracking-section-new) {
            grid-template-columns: 1fr;
            gap: clamp(22px, 4vw, 36px);
        }

        .hero-dashboard-vrule {
            display: none;
            width: 0;
            margin: 0;
            padding: 0;
            pointer-events: none;
        }

        @media (min-width: 1024px) {
            .hero-content-wrapper:has(.workout-tracking-section-new) {
                grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.08fr);
                column-gap: clamp(22px, 3.2vw, 40px);
                row-gap: 0;
                align-items: start;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-banner-wrapper {
                align-self: start;
                justify-self: center;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-dashboard-vrule {
                display: block;
                width: 1px;
                min-width: 1px;
                align-self: stretch;
                background: linear-gradient(
                    180deg,
                    rgba(255, 255, 255, 0) 0%,
                    rgba(255, 255, 255, 0.1) 12%,
                    rgba(127, 212, 200, 0.32) 45%,
                    rgba(255, 255, 255, 0.1) 88%,
                    rgba(255, 255, 255, 0) 100%
                );
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .workout-tracking-section-new {
                width: 100%;
                max-width: none;
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
        }

        .hero-banner-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: visible;
        }

        @media (min-width: 992px) {
            .hero-content-wrapper {
                max-width: 1400px;
                padding: 0 60px;
            }
        }

        @media (min-width: 1200px) {
            .hero-content-wrapper {
                max-width: 1400px;
                padding: 0 80px;
            }
        }

        @media (max-width: 992px) {
            .hero-content-wrapper {
                grid-template-columns: 1fr;
                gap: 40px;
            }

            .hero-content {
                text-align: right;
                order: 1;
            }

            .hero-banner {
                order: 2;
            }
        }

        /* استثناء iPad Mini landscape من max-width: 992px */
        /* min-height: 501px excludes phones (which have max-height: 500px) */
        @media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (min-height: 501px) {
            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) {
                grid-template-columns: 1fr auto !important;
                gap: 0 50px !important;
            }

            .hero-content {
                order: 0 !important;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner {
                order: 0 !important;
                transform: translate(50px, 0px) !important;
                animation: none !important;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner-wrapper {
                transform: translateY(80px) !important;
            }

            /* لوحة الملف: عمودان + فاصل (مثل الديسكتوب) — إزاحات البنر القديمة مُلغاة */
            .hero-content-wrapper:has(.workout-tracking-section-new) {
                grid-template-columns: minmax(0, 0.93fr) 1px minmax(0, 1.07fr) !important;
                column-gap: clamp(12px, 2vw, 22px) !important;
                row-gap: 0 !important;
                align-items: start !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-dashboard-vrule {
                display: block !important;
                width: 1px;
                min-width: 1px;
                align-self: stretch;
                background: linear-gradient(
                    180deg,
                    rgba(255, 255, 255, 0) 0%,
                    rgba(255, 255, 255, 0.09) 14%,
                    rgba(127, 212, 200, 0.28) 50%,
                    rgba(255, 255, 255, 0.09) 86%,
                    rgba(255, 255, 255, 0) 100%
                );
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner-wrapper,
            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner {
                transform: none !important;
            }
        }

        .hero-content {
            animation: fadeInLeft 1s ease-out;
            text-align: right;
            direction: rtl;
        }

        .hero-subtitle {
            font-size: 1.2rem;
            font-weight: 500;
            color: hsl(214, 15%, 62%);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: flex-end;
            flex-direction: row-reverse;
        }

        .hero .strong {
            background: #4fc5c4;
            color: white;
            padding: 8px 20px;
            border-radius: 5px;
            font-weight: 700;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .hero-title {
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            font-size: 4rem;
            font-weight: 900;
            line-height: 1.1;
            margin-bottom: 25px;
            color: hsl(0, 0%, 100%);
            text-transform: uppercase;
            text-align: right;
        }

        .hero .section-text {
            font-size: 1.1rem;
            line-height: 1.8;
            color: hsl(214, 15%, 62%);
            margin-bottom: 35px;
            max-width: 500px;
            text-align: right;
        }

        .hero .btn {
            display: inline-block;
            background: #4fc5c4;
            color: white;
            padding: 18px 40px;
            font-size: 1rem;
            font-weight: 700;
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0px 10px 24px rgba(79, 197, 196, 0.2);
            text-align: center;
            margin-right: auto;
        }

        .hero .btn:hover {
            background: #3db3b2;
            transform: translateY(-3px);
            box-shadow: 0px 15px 30px rgba(79, 197, 196, 0.3);
        }

        .hero-banner {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            animation: fadeInRight 1s ease-out;
            overflow: visible;
            box-sizing: border-box;
            /* Single source for macro ring size (80px–120px; cascades to SVG + labels) */
            --pie-size: clamp(80px, 4.2vw + 58px, 120px);
            --pie-inner-size: calc(var(--pie-size) * 104 / 120);
            /* Vertical lift for carbs ring so it clears calories box + edit button (center-bottom) */
            --pie-calories-clearance: clamp(100px, 22vmin, 136px);
            --pie-corner-shift: calc(var(--pie-size) * 0.32);
            /* Room for corner overflow + float animation without clipping sibling layout */
            padding-inline: calc(var(--pie-size) * 0.34);
            padding-top: calc(var(--pie-size) * 0.32);
            margin-bottom: calc(var(--pie-size) * 0.2);
            min-height: min-content;
        }

        /* Tighter rings when workout panel is present — single override via variables (no per-breakpoint pie sizes) */
        .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner {
            --pie-size: clamp(76px, 3.6vw + 52px, 112px);
            --pie-calories-clearance: clamp(104px, 24vmin, 142px);
        }

        .hero-img-frame {
            position: relative;
            display: inline-block;
            line-height: 0;
            vertical-align: middle;
            overflow: visible;
        }

        .hero-banner-img {
            position: relative;
            z-index: 3;
            width: 100%;
            max-width: 500px;
            height: auto;
            display: block;
            filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
        }

        /* Calories Box — فوق دوائر الماكرو حتى يبقى «تعديل» قابل للضغط */
        .calories-box-wrapper {
            position: absolute;
            top: 90%;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            z-index: 60;
            isolation: isolate;
        }

        .calories-box {
            width: 260px;
            height: 65px;
            background: linear-gradient(180deg, #54cac9 0%, #128887 100%);
            border-radius: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 0px;
            position: relative;
            z-index: 1;
            box-shadow: 0 4px 20px rgba(79, 197, 196, 0.3);
        }

        .calories-label {
            color: #1a1a1a;
            font-size: 1.1rem;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .calories-value {
            color: #1a1a1a;
            font-size: 1.1rem;
            font-weight: 700;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            margin-left: 5px;
        }

        .calories-edit-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 16px;
            background: rgba(79, 197, 196, 0.15);
            border: 1px solid rgba(79, 197, 196, 0.3);
            border-radius: 12px;
            color: #4fc5c4;
            font-size: 0.85rem;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            direction: rtl;
            position: relative;
            z-index: 2;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .calories-edit-btn:hover {
            background: rgba(79, 197, 196, 0.25);
            border-color: rgba(79, 197, 196, 0.5);
            color: #ffffff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(79, 197, 196, 0.3);
        }

        .calories-edit-btn:active {
            transform: translateY(0);
        }

        .calories-edit-btn svg {
            width: 14px;
            height: 14px;
            transition: transform 0.3s ease;
        }

        .calories-edit-btn:hover svg {
            transform: rotate(15deg);
        }

        .hero .circle {
            position: absolute;
            border-radius: 50%;
            animation: rotate 20s linear infinite;
            pointer-events: none;
        }

        .hero .circle-1 {
            width: 550px;
            height: 550px;
            background: radial-gradient(circle, rgba(79, 197, 196, 0.1), transparent);
            border: 2px solid rgba(79, 197, 196, 0.2);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1;
        }

        .hero .circle-2 {
            width: 450px;
            height: 450px;
            background: radial-gradient(circle, rgba(79, 197, 196, 0.15), transparent);
            border: 2px dashed rgba(79, 197, 196, 0.3);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation-direction: reverse;
            animation-duration: 15s;
            z-index: 1;
        }


        /* Progress Pie Charts — لا تلتقط نقرات (دوائر عرض فقط؛ تمرير الضغط لزر تعديل السعرات إن تداخلت) */
        .progress-pie-wrapper {
            position: absolute;
            z-index: 4;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            pointer-events: none;
        }

        /* Positioning vs .hero-img-frame (matches rendered image bounds) */
        .stats-pie-1 {
            top: 10%;
            right: -8%;
            width: var(--pie-size, 120px);
            transform: none;
        }

        .stats-pie-2 {
            bottom: 20%;
            right: -8%;
            width: var(--pie-size, 120px);
            transform: none;
        }

        .stats-pie-3 {
            top: 50%;
            left: -8%;
            width: var(--pie-size, 120px);
            margin-top: 0;
            transform: translateY(-50%);
        }

        .hero-banner .progress-pie-chart {
            width: var(--pie-size);
            height: var(--pie-size);
            min-width: var(--pie-size);
            min-height: var(--pie-size);
            max-width: var(--pie-size);
            max-height: var(--pie-size);
            flex-shrink: 0;
            box-sizing: border-box;
            border-radius: 50%;
            background-color: rgba(229, 229, 229, 0.1);
            position: relative;
            overflow: visible;
            animation: float 3s ease-in-out infinite;
        }

        .progress-pie-chart.gt-50 {
            background-color: #4fc5c4;
        }

        .hero-banner .ppc-progress {
            position: absolute;
            left: calc(50% - var(--pie-size) / 2);
            top: calc(50% - var(--pie-size) / 2);
            width: var(--pie-size);
            height: var(--pie-size);
            box-sizing: border-box;
        }

        .hero-banner .ppc-progress-svg {
            width: var(--pie-size);
            height: var(--pie-size);
            min-width: var(--pie-size);
            min-height: var(--pie-size);
            transform: rotate(-90deg);
        }

        .ppc-progress-bg {
            fill: transparent;
            stroke: rgba(79, 197, 196, 0.15);
            stroke-width: 8;
        }

        .ppc-progress-arc {
            fill: transparent;
            stroke-width: 8;
            stroke-linecap: round;
            filter: url(#dropshadow);
        }

        .hero-banner .ppc-percents {
            position: absolute;
            border-radius: 50%;
            left: calc(50% - var(--pie-inner-size) / 2);
            top: calc(50% - var(--pie-inner-size) / 2);
            width: var(--pie-inner-size);
            height: var(--pie-inner-size);
            background: hsl(210, 26%, 11%);
            text-align: center;
            display: table;
            box-sizing: border-box;
        }

        .hero-banner .ppc-percents span {
            display: block;
            font-size: clamp(1rem, calc(0.1 * var(--pie-size) + 0.55rem), 1.3rem);
            font-weight: 700;
            color: #4fc5c4;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            line-height: 1.2;
        }

        .pcc-percents-wrapper {
            display: table-cell;
            vertical-align: middle;
        }

        .pcc-percents-wrapper span {
            display: block;
            margin-bottom: 4px;
        }

        .pie-label {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 500;
            text-align: center;
            margin-top: 4px;
            line-height: 1.2;
        }

        .hero-banner .pie-label {
            font-size: clamp(0.65rem, calc(0.035 * var(--pie-size) + 0.35rem), 0.75rem);
        }

        .stats-icon {
            width: 50px;
            height: 50px;
            margin-bottom: 10px;
        }

        .stats-icon svg {
            width: 100%;
            height: 100%;
        }

        .stats-title {
            font-size: 0.9rem;
            color: hsl(214, 15%, 62%);
            margin-bottom: 5px;
        }

        .stats-value {
            font-size: 1.8rem;
            font-weight: 800;
            color: #4fc5c4;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

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

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

        @keyframes rotate {
            from {
                transform: translate(-50%, -50%) rotate(0deg);
            }
            to {
                transform: translate(-50%, -50%) rotate(360deg);
            }
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        /* =============== تحسينات Hero للجوال فقط =============== */

        /* شاشات متوسطة */
        @media (max-width: 992px) {
            .hero {
                min-height: auto;
                padding: 60px 0 50px;
            }

            .hero-content-wrapper {
                grid-template-columns: 1fr;
                gap: 30px;
                padding: 0 30px;
            }

            .hero-banner-wrapper {
                display: flex;
                justify-content: center;
            }

            .hero-banner {
                margin: 0 auto;
                max-width: 450px;
            }
        }

        /* استثناء iPad Mini landscape من max-width: 992px */
        /* min-height: 501px excludes phones (which have max-height: 500px) */
        @media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (min-height: 501px) {
            .hero {
                padding: 80px 0 20px !important;
            }

            .hero-content-wrapper {
                grid-template-columns: 1fr auto !important;
                gap: 0 50px !important;
                padding: 0 35px !important;
            }

            .hero-banner {
                max-width: 100% !important;
                margin: 0 !important;
                transform: translate(50px, 0px) !important;
                animation: none !important;
            }
            
            .hero-banner-wrapper {
                transform: translateY(80px) !important;
            }
        }

        /* قواعد للشاشات المتوسطة والصغيرة فقط */
        @media (max-width: 992px) {
            .hero-title {
                font-size: 2.8rem;
                line-height: 1.15;
                margin-bottom: 20px;
            }

            .hero .section-text {
                font-size: 1.05rem;
                line-height: 1.75;
            }

            .hero-banner-img {
                max-width: 100%;
            }

            .hero .circle-1 {
                width: 420px;
                height: 420px;
            }

            .hero .circle-2 {
                width: 340px;
                height: 340px;
            }
        }

        /* Desktop - إرجاع الدوائر إلى الحجم الأصلي */
        @media (min-width: 1200px) {
            .hero .circle-1 {
                width: 550px !important;
                height: 550px !important;
            }

            .hero .circle-2 {
                width: 450px !important;
                height: 450px !important;
            }
            
            /* تحريك العناصر في المربع الأحمر لأسفل 5 بكسل */
            .hero-banner-wrapper {
                transform: translateY(80px);
            }
        }

        /* Desktop كبير - تأكيد الحجم الأصلي */
        @media (min-width: 1400px) {
            .hero .circle-1 {
                width: 550px !important;
                height: 550px !important;
            }

            .hero .circle-2 {
                width: 450px !important;
                height: 450px !important;
            }
        }

        /* جوالات عادية - Portrait */
        @media (max-width: 768px) and (orientation: portrait) {
            body {
                padding: 0;
                padding-top: 0;
            }

            .hero {
                padding: 110px 0 50px;
                min-height: auto;
                margin-top: 0;
            }

            .hero-container {
                padding: 0;
            }

            .hero-content-wrapper {
                gap: 40px;
                padding: 0 24px;
            }

            .hero-content {
                order: 1;
            }

            .hero-banner {
                order: 2;
                max-width: 100%;
                position: relative;
            }

            .hero-subtitle {
                font-size: 1rem;
                margin-bottom: 18px;
                flex-wrap: wrap;
                justify-content: flex-end;
                gap: 10px;
            }

            .hero .strong {
                font-size: 0.875rem;
                padding: 8px 18px;
            }

            .hero-title {
                font-size: 2.25rem;
                line-height: 1.25;
                margin-bottom: 20px;
            }

            .hero .section-text {
                font-size: 1.05rem;
                line-height: 1.75;
                margin-bottom: 30px;
                max-width: 100%;
            }

            .hero .btn {
                padding: 16px 38px;
                font-size: 1rem;
                display: inline-block;
                margin: 0;
            }

            .hero-banner-img {
                max-width: 340px;
                margin: 0 auto;
                display: block;
            }

            .stats-card {
                padding: 15px 18px;
                min-width: 135px;
            }

            .stats-icon {
                width: 40px;
                height: 40px;
                margin-bottom: 11px;
            }

            .stats-title {
                font-size: 0.875rem;
                margin-bottom: 6px;
            }

            .stats-value {
                font-size: 1.45rem;
            }

            .hero .circle-1 {
                width: 360px;
                height: 360px;
            }

            .hero .circle-2 {
                width: 290px;
                height: 290px;
            }
        }

        /* جوالات صغيرة - Portrait */
        @media (max-width: 480px) and (orientation: portrait) {
            .hero {
                padding: 100px 0 40px;
            }

            .hero-content-wrapper {
                gap: 32px;
                padding: 0 20px;
            }

            .hero-subtitle {
                font-size: 0.925rem;
                margin-bottom: 16px;
                gap: 8px;
                justify-content: flex-end;
            }

            .hero .strong {
                font-size: 0.8rem;
                padding: 7px 16px;
            }

            .hero-title {
                font-size: 1.95rem;
                line-height: 1.25;
                margin-bottom: 18px;
            }

            .hero .section-text {
                font-size: 0.975rem;
                line-height: 1.7;
                margin-bottom: 26px;
            }

            .hero .btn {
                padding: 15px 32px;
                font-size: 0.925rem;
                width: auto;
                max-width: 260px;
                margin: 0;
                display: inline-block;
                text-align: center;
            }

            .hero-banner-img {
                max-width: 300px;
            }

            .stats-icon {
                width: 32px;
                height: 32px;
                margin-bottom: 8px;
            }

            .stats-title {
                font-size: 0.75rem;
                margin-bottom: 4px;
            }

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

            .hero .circle-1 {
                width: 300px;
                height: 300px;
            }

            .hero .circle-2 {
                width: 240px;
                height: 240px;
            }
        }
        
        /* Footer (same as home.html — flat top, no slanted wave) */
        .footer {
            position: relative;
            background: rgba(18, 18, 18, 0.98);
            padding: 60px 0 30px;
            z-index: 1;
        }

        .footer-wave {
            display: none;
        }

        .footer-wave svg {
            position: absolute;
            top: 0;
            width: 100%;
            height: 100%;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            position: relative;
            z-index: 1;
        }

        .footer-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 0.5rem;
            text-align: right;
            direction: rtl;
        }

        .footer-subtitle {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.6);
            margin-bottom: 1.5rem;
            text-align: right;
            direction: rtl;
        }

        .footer-social {
            display: flex;
            gap: 0.75rem;
            margin-top: 1.5rem;
            margin-bottom: 2rem;
            justify-content: flex-end;
            flex-direction: row;
            width: 100%;
            margin-left: auto;
        }

        .footer-social-button {
            width: 20px;
            height: 20px;
            border-radius: 0;
            background: transparent;
            color: #ffffff;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            padding: 0;
            text-decoration: none;
        }

        .footer-social-button img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: all 0.3s ease;
        }

        .footer-social-button:hover img {
            opacity: 0.8;
            transform: translateY(-2px);
        }

        .footer-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 2rem 0;
            transform: scaleX(-1);
        }

        .footer-copyright {
            text-align: center;
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 600;
        }

        /* Edit Calories Modal — نفس أسلوب البوب أوت (activation-modal) */
        .edit-calories-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(8, 9, 12, 0.78);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            padding: clamp(12px, 3.5vw, 20px);
            direction: rtl;
        }

        .edit-calories-modal-container {
            width: min(440px, 90vw);
            min-width: 0;
            max-height: min(92dvh, 92vh);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: rgba(20, 20, 20, 0.94);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: clamp(14px, 2.5vw, 20px);
            box-shadow: 0 18px 45px rgba(0, 0, 0, 0.52);
            position: relative;
            padding: clamp(16px, 3.5vw, 24px);
        }

        .edit-calories-modal-content {
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            padding: 0;
            position: relative;
        }

        .edit-modal-step {
            display: none;
        }

        .edit-modal-step.active {
            display: block;
        }

        .edit-modal-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .edit-modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 8px;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .edit-modal-subtitle {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.6);
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .edit-modal-body {
            margin-bottom: 30px;
        }

        .edit-input-row {
            display: flex;
            gap: 12px;
            margin-bottom: 15px;
        }

        .edit-input-field {
            flex: 1;
            padding: 14px 18px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            color: #ffffff;
            font-size: 1rem;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            transition: all 0.3s ease;
        }

        .edit-input-field:focus {
            outline: none;
            border-color: #4fc5c4;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 3px rgba(79, 197, 196, 0.1);
        }

        .edit-input-field::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        .edit-error-message {
            color: #ef6670;
            font-size: 0.8rem;
            margin-top: -10px;
            margin-bottom: 10px;
            display: none;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .edit-error-message.show {
            display: block;
        }

        .edit-gender-button {
            flex: 1;
            padding: 14px 18px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 1rem;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .edit-gender-button:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(79, 197, 196, 0.3);
        }

        .edit-gender-button.selected {
            background: linear-gradient(135deg, rgba(79, 197, 196, 0.2), rgba(79, 197, 196, 0.1));
            border-color: #4fc5c4;
            color: #4fc5c4;
        }

        .edit-goal-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .edit-goal-card {
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .edit-goal-card:hover {
            border-color: rgba(79, 197, 196, 0.5);
            background: rgba(255, 255, 255, 0.08);
        }

        .edit-goal-card.selected {
            background: linear-gradient(135deg, rgba(79, 197, 196, 0.2), rgba(79, 197, 196, 0.1));
            border-color: #4fc5c4;
        }

        .edit-goal-icon {
            width: 50px;
            height: 50px;
            margin: 0 auto 10px;
            object-fit: contain;
        }

        .edit-goal-icon-placeholder {
            width: 50px;
            height: 50px;
            margin: 0 auto 10px;
            font-size: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .edit-goal-text {
            color: #ffffff;
            font-size: 0.9rem;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .edit-activity-container {
            margin: 20px 0;
        }

        .edit-activity-slider-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
        }

        .edit-activity-step3-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: clamp(8px, 2vw, 14px);
            width: 100%;
            max-width: min(420px, 100%);
            margin: 0 auto;
        }

        .edit-activity-nav-btn {
            width: 48px;
            height: 48px;
            min-width: 48px;
            flex-shrink: 0;
            border-radius: 12px;
            background: linear-gradient(135deg,
                rgba(34, 33, 38, 0.85) 0%,
                rgba(30, 29, 34, 0.75) 100%);
            border: 1px solid rgba(79, 197, 196, 0.35);
            color: #ffffff;
            font-size: 1.5rem;
            font-weight: 300;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .edit-activity-nav-btn:hover:not(:disabled) {
            background: linear-gradient(135deg,
                rgba(79, 197, 196, 0.22) 0%,
                rgba(42, 157, 156, 0.18) 100%);
            border-color: rgba(79, 197, 196, 0.65);
        }

        .edit-activity-nav-btn:active:not(:disabled) {
            transform: scale(0.96);
        }

        .edit-activity-nav-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
        }

        .edit-activity-bar-slot {
            flex: 1 1 auto;
            min-width: 0;
            max-width: 280px;
            margin: 0 auto;
        }

        .edit-activity-bar-track-wrap {
            position: relative;
            width: 100%;
        }

        #editCaloriesModal .edit-activity-bar-track-wrap .activity-squares-container {
            margin: 0;
        }

        .edit-activity-bar-hits {
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            height: 48px;
            display: flex;
            z-index: 3;
            pointer-events: auto;
        }

        .edit-activity-bar-hit {
            flex: 1;
            min-width: 0;
            border: none;
            padding: 0;
            margin: 0;
            background: transparent;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .edit-activity-bar-hit:focus-visible {
            outline: 2px solid rgba(79, 197, 196, 0.85);
            outline-offset: 2px;
            border-radius: 6px;
        }

        @media (max-width: 480px) {
            .edit-activity-nav-btn {
                width: 44px;
                height: 44px;
                min-width: 44px;
                font-size: 1.35rem;
            }

            .edit-activity-step3-row {
                gap: 6px;
            }

            .edit-activity-bar-slot {
                max-width: 220px;
            }
        }

        #editCaloriesModal .edit-modal-step[data-step="3"] .edit-activity-description {
            font-size: 0.95rem;
            color: #4fc5c4;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            text-align: center;
            padding: 8px 12px;
            line-height: 1.55;
            background: transparent;
            border: none;
            min-height: auto;
            display: block;
            width: 100%;
            max-width: 100%;
        }

        .edit-modal-footer {
            display: flex;
            gap: 12px;
            justify-content: space-between;
        }

        .edit-modal-btn {
            flex: 1;
            padding: 14px 24px;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
        }

        .edit-btn-cancel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
        }

        .edit-btn-cancel:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .edit-btn-back {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
        }

        .edit-btn-back:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
        }

        .edit-btn-next,
        .edit-btn-save {
            background: linear-gradient(135deg, rgba(79, 197, 196, 0.9), rgba(42, 157, 156, 0.9));
            border: 1px solid rgba(79, 197, 196, 0.3);
            color: #ffffff;
        }

        .edit-btn-next:hover,
        .edit-btn-save:hover {
            background: linear-gradient(135deg, rgba(79, 197, 196, 1), rgba(42, 157, 156, 1));
            box-shadow: 0 4px 15px rgba(79, 197, 196, 0.4);
            transform: translateY(-2px);
        }

        .edit-btn-next:disabled,
        .edit-btn-save:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* ملخص الملف — صفوف مدمجة (وزن+طول سطر واحد …) */
        .edit-overview-summary {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 12px;
        }

        .edit-overview-inline-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 8px 12px;
            padding: 10px 12px;
            background: rgba(20, 20, 20, 0.92);
            border: 1px solid #333;
            border-radius: 11px;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            font-size: 0.9rem;
            color: rgba(224, 224, 224, 0.95);
            line-height: 1.45;
        }

        .edit-overview-kv {
            font-weight: 500;
            color: rgba(255, 255, 255, 0.62);
            white-space: nowrap;
        }

        .edit-overview-kv strong {
            font-weight: 700;
            color: #fff;
            margin-inline-start: 2px;
        }

        .edit-overview-kv-sep {
            color: rgba(255, 255, 255, 0.2);
            font-weight: 300;
            user-select: none;
        }

        .edit-overview-activity-block {
            margin-top: 2px;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
        }

        .edit-overview-activity-label {
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.5);
            margin-bottom: 4px;
            letter-spacing: 0.02em;
            text-align: center;
        }

        /* معدل النشاط في المودال: شريط التقدّم فقط (بدون ±) */
        #editCaloriesModal .activity-container {
            padding: 20px 14px 16px;
            margin: 0 auto 0;
            max-width: 100%;
        }

        #editCaloriesModal .activity-slider {
            margin-bottom: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #editCaloriesModal .activity-squares-container {
            --activity-progress: 20%;
            display: block;
            position: relative;
            margin: 0 auto;
            width: 100%;
            max-width: 320px;
            height: 18px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.12);
            overflow: hidden;
        }

        #editCaloriesModal .activity-squares-container::before {
            content: "";
            position: absolute;
            inset: 2px auto 2px 2px;
            width: calc(var(--activity-progress) - 4px);
            max-width: calc(100% - 8px);
            border-radius: 999px;
            background: linear-gradient(90deg, #39c8cd 0%, #39c8cd 100%);
            transition: width 0.25s ease;
        }

        #editCaloriesModal .activity-squares-container::after {
            content: "";
            position: absolute;
            inset: 0;
            background-image: repeating-linear-gradient(
                to right,
                transparent 0,
                transparent calc(20% - 1px),
                rgba(10, 10, 12, 0.45) calc(20% - 1px),
                rgba(10, 10, 12, 0.45) 20%
            );
            pointer-events: none;
        }

        #editCaloriesModal .activity-squares-container .activity-square {
            display: none !important;
        }

        #editCaloriesModal .activity-description {
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: none;
            border-radius: 0;
            padding: 6px 0 0;
            margin-top: 6px;
            max-width: 100%;
            margin-left: auto;
            margin-right: auto;
            box-shadow: none;
        }

        #editCaloriesModal .activity-description-text {
            font-size: 0.88rem;
            line-height: 1.55;
        }

        @media (max-width: 480px) {
            #editCaloriesModal .activity-container {
                padding: 14px 10px 12px;
            }

            #editCaloriesModal .activity-squares-container {
                max-width: 100%;
            }
        }

        .edit-snapshot-slot-row {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-bottom: 18px;
        }

        .edit-snapshot-slot {
            min-width: 52px;
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid #3a3a3a;
            background: rgba(27, 27, 28, 0.9);
            color: rgba(224, 224, 224, 0.85);
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }

        .edit-snapshot-slot:hover {
            border-color: #555;
            color: #ffffff;
            background: rgba(40, 40, 42, 0.95);
        }

        .edit-snapshot-slot.active {
            background: rgba(36, 36, 38, 0.98);
            border-color: #666;
            color: #ffffff;
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        }

        .edit-snapshot-slot.filled:not(.active) {
            border-color: #4a4a4a;
            color: rgba(255, 255, 255, 0.88);
        }

        /* خانة لقطة فارغة = مقفلة بصرياً حتى تُملأ من «الحالي» */
        .edit-snapshot-slot.empty {
            opacity: 0.72;
            border-style: dashed;
            border-color: #3a3a3a;
            color: rgba(255, 255, 255, 0.5);
        }

        .edit-snapshot-slot.empty.active {
            opacity: 1;
            border-style: solid;
        }

        .edit-snapshot-save--ok {
            border-color: rgba(110, 170, 110, 0.75) !important;
            background: rgba(28, 42, 28, 0.95) !important;
            color: #c8f0c8 !important;
        }

        .edit-snapshot-slot--pulse {
            animation: editSnapshotSlotPulse 0.45s ease-out 2;
        }

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

        .edit-btn-nav-muted:disabled {
            opacity: 0.42;
            cursor: not-allowed;
            transform: none !important;
        }

        .edit-overview-empty-msg {
            text-align: center;
            padding: 18px 14px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 0.9rem;
            line-height: 1.6;
            border: 1px dashed #3a3a3a;
            border-radius: 12px;
            margin-bottom: 12px;
            background: rgba(20, 20, 20, 0.5);
        }

        .edit-modal-footer--wrap {
            flex-wrap: wrap;
        }

        .edit-modal-footer.edit-modal-footer--tight {
            margin-top: clamp(16px, 3.5vw, 24px);
        }

        /* تأكيد اللقطات — بوب أوت بملء الشاشة فوق مودال السعرات */
        .snapshot-confirm-overlay {
            position: fixed;
            inset: 0;
            z-index: 10050;
            display: none;
            align-items: center;
            justify-content: center;
            padding: clamp(16px, 4vw, 28px);
            direction: rtl;
            background: rgba(8, 9, 12, 0.92);
            box-sizing: border-box;
        }

        .snapshot-confirm-overlay.is-open {
            display: flex;
        }

        .snapshot-confirm-panel {
            width: min(400px, 100%);
            max-width: 100%;
            background: rgba(20, 20, 20, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: clamp(14px, 2.5vw, 20px);
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
            padding: clamp(20px, 4vw, 28px) clamp(18px, 3.5vw, 24px);
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .snapshot-confirm-title {
            margin: 0 0 10px;
            font-size: clamp(1.05rem, 3.2vw, 1.25rem);
            font-weight: 700;
            color: #ffffff;
            text-align: center;
            line-height: 1.45;
        }

        .snapshot-confirm-sub {
            margin: 0;
            font-size: clamp(0.88rem, 2.5vw, 0.95rem);
            color: rgba(255, 255, 255, 0.68);
            text-align: center;
            line-height: 1.55;
        }

        .snapshot-confirm-actions {
            display: flex;
            flex-direction: row;
            gap: 12px;
            margin-top: 22px;
        }

        .snapshot-confirm-btn {
            flex: 1;
            min-height: 48px;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            border: 1px solid transparent;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .snapshot-confirm-btn:active {
            transform: scale(0.98);
        }

        .snapshot-confirm-btn--muted {
            background: rgba(36, 36, 38, 0.95);
            border-color: rgba(255, 255, 255, 0.12);
            color: rgba(245, 245, 245, 0.95);
        }

        .snapshot-confirm-btn--muted:hover {
            background: rgba(48, 48, 50, 1);
            border-color: rgba(255, 255, 255, 0.18);
        }

        .snapshot-confirm-btn--danger {
            background: rgba(48, 26, 28, 0.95);
            border-color: rgba(180, 80, 88, 0.55);
            color: rgba(255, 200, 205, 0.95);
        }

        .snapshot-confirm-btn--danger:hover {
            background: rgba(58, 32, 36, 0.98);
            border-color: rgba(200, 100, 108, 0.65);
            color: #ffffff;
        }

        .snapshot-confirm-btn--primary {
            background: linear-gradient(135deg, rgba(79, 197, 196, 0.88), rgba(42, 157, 156, 0.88));
            border-color: rgba(79, 197, 196, 0.35);
            color: #ffffff;
        }

        .snapshot-confirm-btn--primary:hover {
            background: linear-gradient(135deg, rgba(79, 197, 196, 1), rgba(42, 157, 156, 1));
        }

        .edit-btn-nav-muted {
            background: rgba(30, 30, 32, 0.95);
            border: 1px solid #444;
            color: #e8e8e8;
        }

        .edit-btn-nav-muted:hover {
            background: rgba(44, 44, 46, 0.98);
            border-color: #555;
            color: #ffffff;
        }

        .edit-btn-nav-primary {
            background: rgba(24, 24, 26, 0.98);
            border: 1px solid #555;
            color: #ffffff;
        }

        .edit-btn-nav-primary:hover {
            background: rgba(38, 38, 40, 1);
            border-color: #707070;
        }

        .edit-btn-delete-snapshot {
            background: rgba(32, 24, 24, 0.9);
            border: 1px solid #4a3333;
            color: rgba(255, 200, 200, 0.88);
        }

        .edit-btn-delete-snapshot:hover {
            background: rgba(48, 32, 32, 0.95);
            border-color: #5c3c3c;
            color: #fff;
        }

        @media (max-width: 768px) {
            .edit-calories-modal-container {
                width: min(440px, calc(100vw - 24px));
                padding: clamp(12px, 3.2vw, 18px);
            }

            .edit-goal-container {
                grid-template-columns: 1fr;
            }

            .edit-modal-title {
                font-size: 1.3rem;
            }
        }

        /* Workout Tracking Section - New Design (ضمن شبكة الهيرو من 1024px) */
        .workout-tracking-section-new {
            width: 100%;
            max-width: 100%;
            margin-top: 20px;
            margin-left: 0;
            margin-right: 0;
            padding: 15px;
            direction: rtl;
            box-sizing: border-box;
        }

        @media (max-width: 480px) {
            .workout-tracking-section-new {
                padding: 10px;
            }
        }

        /* داخل عمود الهيرو: بدون هامش سالب أو عرض يتجاوز الشبكة */
        @media (min-width: 992px) {
            .hero-content-wrapper:has(.workout-tracking-section-new) > .workout-tracking-section-new {
                margin-left: 0;
                margin-right: 0;
                margin-top: 0;
                width: 100%;
                max-width: 100%;
                padding: 0;
            }
        }

        /* عناوين أقسام المتابعة — خفيفة وصغيرة */
        .workout-tracking-header {
            --tracking-header-accent: rgba(79, 197, 196, 0.5);
            direction: rtl;
            text-align: start;
            margin: clamp(6px, 1.5vw, 10px) 0 clamp(10px, 2vw, 14px);
            padding: clamp(5px, 1.2vw, 8px) clamp(8px, 2vw, 12px);
            position: relative;
            border-radius: clamp(8px, 1.5vw, 11px);
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-inline-start: 2px solid var(--tracking-header-accent);
        }

        .workout-tracking-header.nutrition-header {
            --tracking-header-accent: rgba(160, 220, 208, 0.45);
            margin-top: clamp(18px, 3.5vw, 28px);
        }

        @media (max-width: 768px) {
            .workout-tracking-header {
                margin: clamp(6px, 1.5vw, 10px) 0 clamp(8px, 1.8vw, 12px);
            }

            .workout-tracking-header.nutrition-header {
                margin-top: clamp(14px, 3vw, 22px);
            }
        }

        @media (max-width: 480px) {
            .workout-tracking-header {
                padding: clamp(4px, 1.2vw, 7px) clamp(7px, 2vw, 10px);
            }
        }

        .workout-tracking-header span {
            display: block;
            background: none;
            color: rgba(255, 255, 255, 0.72);
            font-weight: 500;
            font-size: clamp(0.78rem, 2vw, 0.88rem);
            letter-spacing: 0;
            line-height: 1.4;
            padding: 0;
            position: relative;
            z-index: 1;
        }

        /* أكلت | تايمر | ما أكلت — RTL: أول عنصر يمين */
        .nutrition-meal-tracker-container {
            direction: rtl;
            display: flex;
            align-items: stretch;
            flex-wrap: nowrap;
            gap: clamp(8px, 2vw, 12px);
            margin-top: clamp(10px, 2.2vw, 16px);
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        @media (max-width: 380px) {
            .nutrition-meal-tracker-container {
                flex-wrap: wrap;
            }
        }

        .meal-timer {
            flex: 1 1 min(8rem, 36vw);
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            min-height: 44px;
            padding: clamp(8px, 1.8vw, 10px) clamp(10px, 2.2vw, 14px);
            border-radius: clamp(10px, 2vw, 14px);
            background: rgba(255, 255, 255, 0.035);
            border: 1px solid rgba(255, 255, 255, 0.07);
            color: rgba(255, 255, 255, 0.82);
            font-size: clamp(0.75rem, 1.9vw, 0.86rem);
            font-weight: 600;
            line-height: 1.45;
            word-break: break-word;
            overflow-wrap: anywhere;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
            font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "RTL", -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .ate-meal-btn {
            flex: 1 1 min(88px, 28vw);
            align-self: center;
            min-height: 44px;
            min-width: min(88px, 28vw);
            padding: clamp(10px, 2vw, 12px) clamp(16px, 3.5vw, 22px);
            border-radius: clamp(10px, 2vw, 14px);
            border: 1px solid rgba(127, 212, 200, 0.4);
            background: rgba(79, 197, 196, 0.12);
            color: rgba(255, 255, 255, 0.94);
            font-size: clamp(0.82rem, 2vw, 0.92rem);
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            box-shadow: none;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .ate-meal-btn:hover:not(:disabled) {
            background: rgba(79, 197, 196, 0.22);
            border-color: rgba(127, 212, 200, 0.55);
        }

        .ate-meal-btn:active:not(:disabled) {
            transform: scale(0.98);
        }

        .ate-meal-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .ate-meal-btn:focus-visible {
            outline: 2px solid rgba(127, 212, 200, 0.55);
            outline-offset: 2px;
        }

        .skip-meal-btn {
            flex: 1 1 min(88px, 28vw);
            align-self: center;
            min-height: 44px;
            min-width: min(88px, 28vw);
            padding: clamp(10px, 2vw, 12px) clamp(16px, 3.5vw, 22px);
            border-radius: clamp(10px, 2vw, 14px);
            border: 1px solid rgba(232, 140, 140, 0.45);
            background: rgba(220, 100, 100, 0.12);
            color: rgba(255, 255, 255, 0.92);
            font-size: clamp(0.82rem, 2vw, 0.92rem);
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            box-shadow: none;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease, opacity 0.2s ease;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .skip-meal-btn:hover:not(:disabled) {
            background: rgba(220, 100, 100, 0.22);
            border-color: rgba(232, 160, 160, 0.55);
        }

        .skip-meal-btn:active:not(:disabled) {
            transform: scale(0.98);
        }

        .skip-meal-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .skip-meal-btn:focus-visible {
            outline: 2px solid rgba(232, 160, 160, 0.55);
            outline-offset: 2px;
        }

        .workout-charts-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            direction: rtl;
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        @media (max-width: 768px) {
            .workout-charts-container {
                gap: 15px;
                padding: 0;
            }
        }

        @media (max-width: 480px) {
            .workout-charts-container {
                gap: 10px;
            }
        }

        .workout-chart-card.full-width {
            width: 100%;
            max-width: 100%;
        }

        .workout-chart-card {
            color: white;
            text-align: right;
            border-radius: clamp(14px, 2.5vw, 22px);
            overflow: hidden;
            transition: all 0.15s linear;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
        }

        .workout-chart-card:hover {
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
        }

        .workout-chart-inner {
            border-radius: clamp(14px, 2.5vw, 22px);
            overflow: hidden;
            width: 100%;
            min-width: 100%;
            box-sizing: border-box;
        }

        .workout-chart-header {
            box-sizing: border-box;
            padding: 30px 15px;
            position: relative;
        }

        .week-selector-container {
            display: flex;
            align-items: center;
            gap: 8px;
            direction: ltr;
        }

        .week-label {
            color: #ffffff;
            font-size: 0.9rem;
            font-weight: 500;
            min-width: 80px;
            text-align: center;
        }

        .week-nav-btn {
            background-color: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            color: #ffffff;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 18px;
            line-height: 1;
            padding: 0;
        }

        .week-nav-btn:hover:not(.disabled) {
            background-color: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .week-nav-btn.disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        @media (max-width: 768px) {
            .week-selector-container {
                gap: 5px;
            }

            .week-label {
                font-size: 0.8rem;
                min-width: 70px;
            }

            .week-nav-btn {
                width: 24px;
                height: 24px;
                font-size: 16px;
            }
            
            .nutrition-meal-tracker-container {
                padding-bottom: 2rem;
            }
        }

        /* iPad Mini, Air, Pro - Portrait (768px - 1024px) - Same layout as mobile */
        @media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
            .hero {
                padding: 110px 0 50px;
                min-height: auto;
                margin-top: 0;
            }

            .hero-container {
                padding: 0;
            }

            .hero-content-wrapper {
                grid-template-columns: 1fr;
                gap: 40px;
                padding: 0 24px;
            }

            .hero-content {
                order: 1;
            }

            .hero-banner {
                order: 2;
                max-width: 100%;
                position: relative;
            }

            .hero-banner-img {
                max-width: 340px;
            }

            .workout-tracking-section-new {
                width: 100%;
                max-width: 100%;
                margin-top: 20px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }

            .workout-chart-card {
                padding: 20px;
            }

            .workout-chart-header {
                margin-bottom: 15px;
            }

            .week-selector-container {
                gap: 5px;
            }

            .week-label {
                font-size: 0.8rem;
                min-width: 70px;
            }

            .week-nav-btn {
                width: 24px;
                height: 24px;
                font-size: 16px;
            }

            .nutrition-meal-tracker-container {
                padding-bottom: 2rem;
                margin-top: 1rem;
            }

            .calories-box {
                padding: 14px 20px;
                font-size: 1rem;
            }
        }

        /* iPad Pro & iPad Air - Landscape (1024px - 1366px) - Desktop layout */
        @media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
            .hero {
                padding: 90px 0 25px;
                min-height: auto;
            }

            .hero-container {
                padding: 0;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) {
                grid-template-columns: 1fr auto;
                gap: 0 70px;
                padding: 0 50px;
                max-width: 1400px;
            }

            .hero-content {
                text-align: right;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner {
                max-width: 100%;
                position: relative;
                transform: scale(1);
                margin-top: -10px;
                margin-left: 80px;
            }

            .hero-banner-img {
                max-width: 85%;
                width: 85%;
                height: auto;
                margin: 0;
            }

            /* تحريك العناصر في المربع الأحمر لأسفل 80 بكسل */
            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner-wrapper {
                transform: translateY(80px);
            }
            
            /* تكبير الدوائر في iPad Pro — صفحات بدون لوحة الملف */
            .hero .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .circle-1 {
                width: 580px;
                height: 580px;
            }

            .hero .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .circle-2 {
                width: 480px;
                height: 480px;
            }

            /* لوحة الملف — iPad أفقي كبير: دوائر وصورة متناسقة مع العمودين */
            .hero .hero-content-wrapper:has(.workout-tracking-section-new) .circle-1 {
                width: min(46vw, 480px) !important;
                height: min(46vw, 480px) !important;
            }

            .hero .hero-content-wrapper:has(.workout-tracking-section-new) .circle-2 {
                width: min(38vw, 400px) !important;
                height: min(38vw, 400px) !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner-img {
                max-width: min(48vw, 420px) !important;
                width: auto !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner {
                margin-left: 0 !important;
                margin-top: 0 !important;
                transform: none !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner-wrapper {
                transform: none !important;
                margin-top: 14px;
            }

            .workout-tracking-section-new {
                width: 100%;
                max-width: 100%;
                margin-top: 24px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }

            .workout-tracking-header {
                margin: 10px 0 18px !important;
            }

            .workout-tracking-header.nutrition-header {
                margin-top: 22px !important;
            }

            .workout-tagline {
                font-size: 0.7rem;
            }

            .workout-charts-container {
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .workout-chart-card {
                padding: 12px 15px;
            }

            .workout-chart-header {
                margin-bottom: 8px;
                padding: 15px 10px !important;
            }

            .week-selector-container {
                gap: 4px;
            }

            .week-label {
                font-size: 0.75rem;
                min-width: 60px;
            }

            .week-nav-btn {
                width: 22px;
                height: 22px;
                font-size: 14px;
            }

            .nutrition-meal-tracker-container {
                padding-bottom: 1rem;
                margin-top: 0.6rem;
            }

            .calories-box {
                padding: 14px 20px;
                font-size: 1rem;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .calories-box {
                width: min(240px, 46vw);
                height: auto;
                min-height: 54px;
                padding: 10px 16px;
                font-size: clamp(0.85rem, 1.4vw, 0.95rem);
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-chart-header {
                padding: 12px 10px !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-chart-card {
                padding: 11px 14px;
            }
        }

        /* iPad Air فقط - Landscape — تكبير الصورة (بدون لوحة الملف) */
        @media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) and (max-height: 900px) {
            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner-img {
                max-width: 110% !important;
                width: 110% !important;
                height: auto !important;
            }
        }

        /* iPad Mini - Landscape (768px - 1024px) - Desktop layout with custom settings */
        /* min-height: 501px excludes phones (which have max-height: 500px) */
        @media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (min-height: 501px) {
            .hero {
                padding: 80px 0 20px !important;
                min-height: auto;
            }

            .hero-container {
                padding: 0;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) {
                grid-template-columns: 1fr auto !important;
                gap: 0 50px !important;
                padding: 0 35px !important;
                max-width: 1400px;
            }

            .hero-content {
                text-align: right;
                order: 0 !important;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner {
                max-width: 100% !important;
                position: relative;
                transform: translate(50px, 0px) !important;
                margin: 0 !important;
                order: 0 !important;
                animation: none !important;
            }

            .hero-banner-img {
                max-width: 100%;
                margin: 0;
            }

            /* تحريك العناصر في المربع الأحمر لأسفل 80 بكسل */
            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner-wrapper {
                transform: translateY(80px) !important;
            }
            
            /* تصغير الدوائر — iPad Mini بدون لوحة الملف */
            .hero .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .circle-1 {
                width: 450px !important;
                height: 450px !important;
            }

            .hero .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .circle-2 {
                width: 380px !important;
                height: 380px !important;
            }

            /* منع تغيير حجم hero-banner-img */
            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) .hero-banner-img {
                max-width: 100% !important;
                width: auto !important;
                height: auto !important;
            }

            .workout-tracking-section-new {
                width: 100%;
                max-width: 100%;
                margin-top: 24px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }

            .workout-tracking-header {
                margin: 10px 0 18px !important;
            }

            .workout-tracking-header.nutrition-header {
                margin-top: 22px !important;
            }

            .workout-tagline {
                font-size: 0.7rem;
            }

            .workout-charts-container {
                display: grid;
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .workout-chart-card {
                padding: 12px 15px;
            }

            .workout-chart-header {
                margin-bottom: 8px;
                padding: 15px 10px !important;
            }

            .week-selector-container {
                gap: 4px;
            }

            .week-label {
                font-size: 0.75rem;
                min-width: 60px;
            }

            .week-nav-btn {
                width: 22px;
                height: 22px;
                font-size: 14px;
            }

            .nutrition-meal-tracker-container {
                padding-bottom: 1rem;
                margin-top: 0.6rem;
            }

            .calories-box {
                padding: 12px 18px;
                font-size: 0.95rem;
            }

            /* لوحة الملف — iPad أفقي ضيق: نزول خفيف للشكل + نزول إضافي للبنر فقط */
            .hero:has(.hero-content-wrapper .workout-tracking-section-new) {
                padding-top: clamp(90px, 11vh, 118px) !important;
                padding-bottom: clamp(16px, 3vh, 32px) !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) {
                margin-top: 8px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-banner-wrapper {
                margin-top: 16px !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .workout-tracking-section-new {
                margin-top: 0;
                padding: 0;
            }

            .hero .hero-content-wrapper:has(.workout-tracking-section-new) .circle-1 {
                width: min(42vw, 320px) !important;
                height: min(42vw, 320px) !important;
            }

            .hero .hero-content-wrapper:has(.workout-tracking-section-new) .circle-2 {
                width: min(34vw, 265px) !important;
                height: min(34vw, 265px) !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner-img {
                max-width: min(48vw, 300px) !important;
                width: auto !important;
                height: auto !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .calories-box {
                width: min(220px, 50vw);
                min-height: 50px;
                padding: 8px 12px;
                font-size: clamp(0.78rem, 1.5vw, 0.9rem);
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .calories-edit-btn {
                padding: 5px 10px;
                font-size: 0.75rem;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .pie-label {
                font-size: 0.62rem;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .pcc-percents-wrapper span {
                font-size: 0.68rem;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-count {
                font-size: clamp(0.8rem, 1.4vw, 0.95rem);
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-chart-header {
                padding: 8px 8px !important;
                margin-bottom: 4px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-chart-card {
                padding: 8px 10px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-charts-container {
                gap: 10px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-tracking-header {
                margin: 4px 0 10px !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .workout-tracking-header.nutrition-header {
                margin-top: 12px !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .week-label {
                font-size: 0.7rem;
                min-width: 52px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .week-nav-btn {
                width: 26px;
                height: 26px;
                font-size: 15px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .nutrition-meal-tracker-container {
                margin-top: 0.45rem;
                gap: 8px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .meal-timer {
                min-height: 40px;
                font-size: clamp(0.7rem, 1.4vw, 0.8rem);
                padding: 6px 10px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .ate-meal-btn {
                min-height: 40px;
                padding: 8px 16px;
                font-size: 0.82rem;
            }
        }

        /* iPad Pro 12.9" - Portrait (1024px - 1366px) - Same layout as mobile */
        @media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
            .hero {
                padding: 110px 0 50px;
                min-height: auto;
                margin-top: 0;
            }

            .hero-container {
                padding: 0;
            }

            /* مهم: إلغاء تقسيم الديسكتوب الخاص بلوحة الملف في وضع الطولي */
            .hero-content-wrapper:has(.workout-tracking-section-new) {
                grid-template-columns: 1fr !important;
                column-gap: 0 !important;
                row-gap: 40px !important;
                margin-top: 0 !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-dashboard-vrule {
                display: none !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .hero-banner-wrapper {
                margin-top: 0 !important;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) > .workout-tracking-section-new {
                margin-top: 20px !important;
                padding: 15px !important;
            }

            .hero-content-wrapper {
                grid-template-columns: 1fr;
                gap: 40px;
                padding: 0 24px;
            }

            .hero-content {
                order: 1;
            }

            .hero-banner {
                order: 2;
                max-width: 100%;
                position: relative;
            }

            .hero-banner-img {
                max-width: 340px;
            }

            .workout-tracking-section-new {
                width: 100%;
                max-width: 100%;
                margin-top: 20px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }

            .workout-chart-card {
                padding: 20px;
            }

            .workout-chart-header {
                margin-bottom: 15px;
            }

            .week-selector-container {
                gap: 5px;
            }

            .week-label {
                font-size: 0.8rem;
                min-width: 70px;
            }

            .week-nav-btn {
                width: 24px;
                height: 24px;
                font-size: 16px;
            }

            .nutrition-meal-tracker-container {
                padding-bottom: 2rem;
                margin-top: 1rem;
            }

            .calories-box {
                padding: 14px 20px;
                font-size: 1rem;
            }
        }

        .workout-chart-header:after {
            background-color: rgba(255, 255, 255, 0.2);
            bottom: 0;
            content: "";
            position: absolute;
            height: 1px;
            left: 0;
            width: 100%;
        }

        .workout-tagline {
            opacity: 0.75;
            text-transform: uppercase;
            font-size: 0.75rem;
            margin-bottom: 8px;
            font-weight: 400;
        }

        .workout-count {
            display: inline-block;
            font-size: 18px;
            vertical-align: middle;
            font-weight: 600;
            line-height: 1.2;
        }

        .workout-velocity {
            display: inline-block;
            font-size: 12px;
            margin-right: 15px;
            vertical-align: middle;
            font-weight: 600;
        }

        .workout-chart-card canvas {
            width: 100% !important;
            height: 100px !important;
            display: block;
            max-width: 100%;
        }

        .stat-1 {
            background: linear-gradient(135deg, #1a5a5a 0%, #2a7a7a 50%, #1a4a4a 100%);
            background-color: #1a5a5a;
        }

        .stat-2 {
            background-color: #2a9d9c;
        }

        .stat-3 {
            background-color: #00d5bd;
        }

        .stat-nutrition {
            background: linear-gradient(135deg, #0d2d2d 0%, #1a3d3d 50%, #0a2525 100%);
            background-color: #0d2d2d;
        }

        /* Meal Reminder Icon */
        .meal-reminder-icon {
            position: fixed;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #4fc5c4 0%, #2a9d9c 100%);
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 9999;
            box-shadow: 0 4px 15px rgba(79, 197, 196, 0.4);
            transition: all 0.3s ease;
            animation: pulse 2s infinite;
        }

        .meal-reminder-icon:hover {
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 6px 20px rgba(79, 197, 196, 0.6);
        }

        .meal-reminder-icon.show {
            display: flex;
        }

        .meal-reminder-icon svg {
            width: 30px;
            height: 30px;
            fill: #ffffff;
        }

        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 4px 15px rgba(79, 197, 196, 0.4);
            }
            50% {
                box-shadow: 0 4px 25px rgba(79, 197, 196, 0.8);
            }
        }

        /* Meal Reminder Modal */
        .meal-reminder-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }

        .meal-reminder-modal.show {
            display: flex;
        }

        .meal-reminder-modal-content {
            background: linear-gradient(135deg, #1a1a1d 0%, #0f0f12 100%);
            border-radius: 15px;
            padding: 40px;
            text-align: center;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(79, 197, 196, 0.3);
        }

        .meal-reminder-modal-content h3 {
            color: #ffffff;
            font-size: 24px;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .meal-reminder-modal-content p {
            color: rgba(255, 255, 255, 0.8);
            font-size: 18px;
            margin-bottom: 30px;
        }

        .meal-reminder-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
        }

        .meal-reminder-btn {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            flex: 1;
            max-width: 150px;
        }

        .meal-reminder-btn-yes {
            background: linear-gradient(135deg, #4fc5c4 0%, #2a9d9c 100%);
            color: #ffffff;
        }

        .meal-reminder-btn-yes:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(79, 197, 196, 0.4);
        }

        .meal-reminder-btn-no {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .meal-reminder-btn-no:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        @media (max-width: 768px) {
            .meal-reminder-icon {
                right: 15px;
                width: 50px;
                height: 50px;
            }

            .meal-reminder-icon svg {
                width: 25px;
                height: 25px;
            }

            .meal-reminder-modal-content {
                padding: 30px 20px;
            }

            .meal-reminder-modal-content h3 {
                font-size: 20px;
            }

            .meal-reminder-modal-content p {
                font-size: 16px;
            }
        }

        @media (max-width: 768px) {
            .workout-tracking-section-new {
                width: 100%;
                margin-top: 20px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }
        }

        @media (max-width: 768px) {
            .workout-tracking-section-new {
                width: 100%;
                margin-top: 20px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }

            .workout-charts-container {
                gap: 15px;
                width: 100%;
            }

            .workout-chart-card {
                width: 100%;
                max-width: 100%;
            }

            .workout-chart-inner {
                width: 100%;
            }

            .workout-chart-header {
                padding: 20px 15px;
            }

            .workout-count {
                font-size: 16px;
            }

        }

        @media (max-width: 768px) and (orientation: portrait) {
            .workout-tracking-section-new {
                padding-top: 40px;
            }
        }

        @media (max-width: 480px) {
            .workout-tracking-section-new {
                padding: 10px;
            }

            .workout-chart-header {
                padding: 15px 10px;
            }

            .workout-tracking-header {
                margin: 8px 0 16px;
            }

            .workout-charts-container {
                gap: 10px;
            }
        }

        @media (max-width: 480px) and (orientation: portrait) {
            .workout-tracking-section-new {
                padding-top: 45px;
            }
        }


        /* Footer — mobile (same as home.html) */
        @media (max-width: 768px) {
            .footer {
                padding: 50px 0 25px;
            }

            .footer-content {
                padding: 0 1.5rem;
            }

            .footer-title {
                font-size: 1.5rem;
                margin-bottom: 0.75rem;
            }

            .footer-subtitle {
                font-size: 0.95rem;
                margin-bottom: 1.25rem;
            }

            .footer-social {
                justify-content: center;
                margin-top: 1.25rem;
                margin-bottom: 1.75rem;
                gap: 1rem;
            }

            .footer-social-button {
                width: 24px;
                height: 24px;
            }

            .footer-divider {
                margin: 1.75rem 0;
            }

            .footer-copyright {
                font-size: 0.8rem;
                padding: 0 1rem;
            }
        }

        /* الوضع الأفقي للجوالات */
        /* Landscape - شاشات عريضة (Tablets/iPads only - not phones) */
        /* min-height: 501px excludes phones (which have max-height: 500px) */
        @media (min-width: 769px) and (max-width: 900px) and (orientation: landscape) and (min-height: 501px) {
            .hero {
                padding: 90px 0 25px;
                min-height: auto;
            }

            .hero-content-wrapper:not(:has(.workout-tracking-section-new)) {
                grid-template-columns: 1fr 1fr;
                gap: 35px;
                padding: 0 30px;
                align-items: center;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) {
                grid-template-columns: 1fr;
                gap: 24px;
                align-items: flex-start;
                padding: 0 30px;
            }

            .hero-content-wrapper:has(.workout-tracking-section-new) .hero-dashboard-vrule {
                display: none;
            }

            .hero-content {
                order: 1;
                text-align: right;
            }

            .hero-banner {
                order: 2;
                max-width: 100%;
                position: relative;
            }

            .hero-subtitle {
                font-size: 0.95rem;
                margin-bottom: 14px;
                gap: 8px;
            }

            .hero .strong {
                font-size: 0.8rem;
                padding: 6px 14px;
            }

            .hero-title {
                font-size: 1.95rem;
                line-height: 1.2;
                margin-bottom: 16px;
            }

            .hero .section-text {
                font-size: 0.925rem;
                line-height: 1.65;
                margin-bottom: 22px;
            }

            .hero .btn {
                padding: 13px 30px;
                font-size: 0.9rem;
            }

            .hero-banner-img {
                max-width: 320px;
                margin: 0 auto;
            }

            .stats-icon {
                width: 32px;
                height: 32px;
                margin-bottom: 8px;
            }

            .stats-title {
                font-size: 0.75rem;
                margin-bottom: 4px;
            }

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

            .hero .circle-1 {
                width: 300px;
                height: 300px;
            }

            .hero .circle-2 {
                width: 240px;
                height: 240px;
            }
        }

        /* Landscape - جوالات (iPhone XR, SE, 11, 12, 13, 14 - same as portrait) */
        /* Target phones only: max-width 896px and max-height 500px to exclude tablets */
        @media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
            body {
                padding: 0;
                padding-top: 0;
            }

            .hero {
                padding: 110px 0 50px;
                min-height: auto;
                margin-top: 0;
            }

            .hero-container {
                padding: 0;
            }

            .hero-content-wrapper {
                grid-template-columns: 1fr !important;
                gap: 40px;
                padding: 0 24px;
            }

            .hero-content {
                order: 1;
                text-align: right;
            }

            .hero-banner {
                order: 2;
                max-width: 100%;
                position: relative;
            }

            .hero-subtitle {
                font-size: 1rem;
                margin-bottom: 18px;
                flex-wrap: wrap;
                justify-content: flex-end;
                gap: 10px;
            }

            .hero .strong {
                font-size: 0.875rem;
                padding: 8px 18px;
            }

            .hero-title {
                font-size: 2.25rem;
                line-height: 1.25;
                margin-bottom: 20px;
            }

            .hero .section-text {
                font-size: 1.05rem;
                line-height: 1.75;
                margin-bottom: 30px;
                max-width: 100%;
            }

            .hero .btn {
                padding: 16px 38px;
                font-size: 1rem;
                display: inline-block;
                margin: 0;
            }

            .hero-banner-img {
                max-width: 340px;
                margin: 0 auto;
                display: block;
            }

            .stats-card {
                padding: 15px 18px;
                min-width: 135px;
            }

            .stats-icon {
                width: 40px;
                height: 40px;
                margin-bottom: 11px;
            }

            .stats-title {
                font-size: 0.875rem;
                margin-bottom: 6px;
            }

            .stats-value {
                font-size: 1.45rem;
            }

            .hero .circle-1 {
                width: 360px;
                height: 360px;
            }

            .hero .circle-2 {
                width: 290px;
                height: 290px;
            }

            .workout-tracking-section-new {
                width: 100%;
                max-width: 100%;
                margin-top: 20px;
                margin-left: 0;
                margin-right: 0;
                padding: 15px;
            }
        }

        /* Phones landscape only (956x440 and below) — disable float so rings stay inside hero */
        @media (max-width: 956px) and (max-height: 440px) and (orientation: landscape) {
            .hero .hero-content-wrapper:has(.workout-tracking-section-new) .hero-banner .progress-pie-chart {
                animation: none;
            }
        }

        /* Small Mobile Landscape - Same as Portrait */
        @media (max-width: 480px) and (orientation: landscape) and (max-height: 400px) {
            .hero {
                padding: 100px 0 40px;
            }

            .hero-content-wrapper {
                gap: 32px;
                padding: 0 20px;
            }

            .hero-subtitle {
                font-size: 0.925rem;
                margin-bottom: 16px;
                gap: 8px;
                justify-content: flex-end;
            }

            .hero .strong {
                font-size: 0.8rem;
                padding: 7px 16px;
            }

            .hero-title {
                font-size: 1.95rem;
                line-height: 1.25;
                margin-bottom: 18px;
            }

            .hero .section-text {
                font-size: 0.975rem;
                line-height: 1.7;
                margin-bottom: 26px;
            }

            .hero .btn {
                padding: 15px 32px;
                font-size: 0.925rem;
                width: auto;
                max-width: 260px;
                margin: 0;
                display: inline-block;
                text-align: center;
            }

            .hero-banner-img {
                max-width: 300px;
            }

            .stats-icon {
                width: 35px;
                height: 35px;
                margin-bottom: 9px;
            }

            .stats-title {
                font-size: 0.8rem;
                margin-bottom: 5px;
            }

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

            .workout-tracking-section-new {
                padding: 10px;
            }
        }

        /* Onboarding Styles */
        :root {
            --bg-main: #1c1b20;
            --bg-section: #2d2d35;
            --bg-input: #2c2c33;
            --bg-darker: #4a4a52;
            --accent-teal: #3db3b2;
            --text-primary: #ffffff;
            --text-secondary: #9ca3af;
            --text-placeholder: #6b7280;
            --text-dark: #1a1d2e;
            --hover-teal: #38b2ac;
        }

        #onboardingSection {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            min-height: 100dvh;
            padding: 100px 20px 60px;
            width: 100%;
            position: relative;
            z-index: 1;
        }

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

        .question-screen {
            display: none;
        }

        .question-screen.active {
            display: block;
        }

        .question-screen:not(.active) {
            pointer-events: none;
        }

        .question-screen:not(.active) .title-section,
        .question-screen:not(.active) .input-row,
        .question-screen:not(.active) .goal-container,
        .question-screen:not(.active) .activity-container,
        .question-screen:not(.active) .nav-buttons {
            opacity: 0;
            pointer-events: none;
        }

        .question-screen.active .gender-button {
            pointer-events: auto !important;
            cursor: pointer !important;
            z-index: 1000 !important;
        }
        
        .question-screen:not(.active) .gender-button {
            pointer-events: none !important;
        }

        .question-screen.active .title-section,
        .question-screen.active .input-row,
        .question-screen.active .goal-container,
        .question-screen.active .activity-container,
        .question-screen.active .nav-buttons {
            opacity: 1;
            animation: fadeInContent 0.4s ease-in-out;
        }

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

        .content-section {
            background: linear-gradient(135deg, 
                rgba(24, 23, 27, 0.6) 0%, 
                rgba(18, 18, 20, 0.5) 50%, 
                rgba(15, 14, 17, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            padding: 60px 80px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
            position: relative;
            padding-bottom: 100px;
            overflow: hidden;
            width: 100%;
            max-width: 700px;
            box-sizing: border-box;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
        }

        .title-section {
            text-align: center;
            margin-bottom: 50px;
        }

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

        .question-subtitle {
            font-size: 15px;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .input-field {
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.6) 0%, 
                rgba(30, 29, 34, 0.5) 50%, 
                rgba(28, 27, 32, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 16px;
            padding: 16px 24px;
            font-size: 17px;
            color: var(--text-primary);
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            text-align: center;
            height: 54px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
        }

        .input-field::placeholder {
            color: var(--text-placeholder);
        }

        .input-field:focus {
            outline: none;
            background: rgba(79, 209, 197, 0.1);
            border: 2px solid var(--accent-teal);
        }

        .input-field {
            flex: 1;
            min-width: 0;
        }

        .input-row {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 14px;
            margin: 0 auto 14px;
            max-width: 600px;
            width: 100%;
        }

        .input-row > * {
            flex: 1;
            max-width: 200px;
        }

        .gender-button {
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.6) 0%, 
                rgba(30, 29, 34, 0.5) 50%, 
                rgba(28, 27, 32, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 16px;
            padding: 16px 24px;
            color: var(--text-primary);
            font-size: 17px;
            font-weight: 400;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            height: 54px;
            cursor: pointer !important;
            transition: all 0.3s ease;
            flex: 1;
            max-width: 200px;
            pointer-events: auto !important;
            position: relative;
            z-index: 1000 !important;
            user-select: none;
            -webkit-user-select: none;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .gender-button:hover {
            border: 2px solid #3db3b2;
        }

        .gender-button.selected {
            background: var(--accent-teal);
            color: var(--text-dark);
            font-weight: 600;
        }

        .error-message {
            color: #f44336;
            font-size: 14px;
            margin-top: 8px;
            text-align: center;
            display: none;
        }

        .error-message.show {
            display: block;
        }

        .input-field.error {
            border: 2px solid #f44336;
            background: rgba(244, 67, 54, 0.1);
        }

        .input-field.required-highlight,
        .gender-button.required-highlight {
            border: 2px solid #3db3b2 !important;
            animation: gentleHighlight 0.6s ease-out;
        }

        @keyframes gentleHighlight {
            0% {
                border-color: transparent;
                box-shadow: 0 0 0 0 rgba(61, 179, 178, 0);
            }
            50% {
                box-shadow: 0 0 0 4px rgba(61, 179, 178, 0.2);
            }
            100% {
                border-color: #3db3b2;
                box-shadow: 0 0 0 0 rgba(61, 179, 178, 0);
            }
        }

        .goal-card.required-highlight {
            border: 2px solid #3db3b2 !important;
            animation: gentleHighlight 0.6s ease-out;
        }

        .goal-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            margin: 0 auto 40px;
            max-width: 100%;
            width: 100%;
        }

        .goal-card {
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.6) 0%, 
                rgba(30, 29, 34, 0.5) 50%, 
                rgba(28, 27, 32, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            padding: 40px 50px;
            width: 260px;
            height: 180px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
        }

        .goal-card:hover {
            border: 2px solid #3db3b2;
        }

        .goal-card.selected {
            background: var(--accent-teal);
            border-color: var(--accent-teal);
        }

        .goal-icon {
            width: 70px;
            height: 70px;
            margin-bottom: 20px;
            object-fit: contain;
            transition: all 0.3s ease;
        }

        .goal-card.selected .goal-icon {
            filter: brightness(0) saturate(100%);
            opacity: 1;
        }

        .goal-text {
            font-size: 22px;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
        }

        .goal-card.selected .goal-text {
            color: var(--text-dark);
        }

        .activity-container {
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.6) 0%, 
                rgba(30, 29, 34, 0.5) 50%, 
                rgba(28, 27, 32, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            padding: 40px 60px;
            max-width: 550px;
            width: 100%;
            margin: 0 auto 40px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
        }

        .activity-slider {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 16px;
        }

        .activity-btn-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .activity-btn-label {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 400;
        }

        .activity-btn {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.8) 0%, 
                rgba(30, 29, 34, 0.7) 100%);
            border: 1px solid rgba(79, 197, 196, 0.3);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 28px;
            font-weight: 300;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            line-height: 1;
            padding: 0;
        }

        .activity-btn:hover {
            background: linear-gradient(135deg, 
                rgba(79, 197, 196, 0.2) 0%, 
                rgba(42, 157, 156, 0.2) 100%);
            border-color: rgba(79, 197, 196, 0.6);
            transform: scale(1.1);
        }

        .activity-btn:active {
            transform: scale(0.95);
        }

        /* Activity Squares Styles */
        .activity-squares-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin: 0 auto;
            width: 100%;
            max-width: 300px;
        }

        .activity-square {
            width: 48px;
            height: 48px;
            min-width: 48px;
            min-height: 48px;
            aspect-ratio: 1;
            flex-shrink: 0;
            background-color: rgba(79, 197, 196, 0.2);
            border: 2px solid rgba(79, 197, 196, 0.3);
            border-radius: 12px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .activity-square.active {
            background-color: rgba(79, 197, 196, 0.9);
            border-color: rgba(79, 197, 196, 1);
            box-shadow: 0 0 15px rgba(79, 197, 196, 0.5);
            transform: scale(1.05);
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .activity-squares-container {
                gap: 8px;
                max-width: 100%;
            }

            .activity-square {
                width: 40px;
                height: 40px;
                min-width: 40px;
                min-height: 40px;
                border-radius: 10px;
            }

            .activity-btn {
                width: 40px;
                height: 40px;
                font-size: 24px;
            }
        }

        @media (max-width: 480px) {
            .activity-squares-container {
                gap: 6px;
            }

            .activity-square {
                width: 36px;
                height: 36px;
                min-width: 36px;
                min-height: 36px;
                border-radius: 8px;
            }

            .activity-btn {
                width: 36px;
                height: 36px;
                font-size: 20px;
            }
        }

        .activity-description {
            background: linear-gradient(135deg, 
                rgba(34, 33, 38, 0.6) 0%, 
                rgba(30, 29, 34, 0.5) 50%, 
                rgba(28, 27, 32, 0.6) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(79, 197, 196, 0.2);
            border-radius: 16px;
            padding: 14px 22px;
            margin-top: 20px;
            max-width: 450px;
            margin-left: auto;
            margin-right: auto;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 
                        0 1px 2px rgba(255, 255, 255, 0.05) inset;
        }

        .activity-description-text {
            font-size: 14px;
            color: var(--accent-teal);
            text-align: center;
            line-height: 1.6;
            font-weight: 500;
        }

        .nav-buttons {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            margin: 40px auto 0;
            flex-direction: row-reverse;
            max-width: 600px;
            width: 100%;
        }

        .nav-btn {
            padding: 14px 36px;
            border: none;
            border-radius: 12px;
            font-size: 17px;
            font-weight: 600;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-back {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--bg-darker);
        }

        .btn-back:hover:not(:disabled) {
            border-color: var(--accent-teal);
            color: var(--accent-teal);
        }

        .btn-next {
            background: var(--accent-teal);
            color: var(--text-dark);
        }

        .btn-next:hover:not(:disabled) {
            background: var(--hover-teal);
        }

        .nav-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .logo-section {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            text-align: center;
            width: 100%;
            padding: 20px 0 0;
        }

        .progress-bar-container {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            height: 3px;
            background: transparent;
            overflow: hidden;
        }
        
        .progress-bar-fill {
            height: 100%;
            background: var(--accent-teal);
            transition: width 0.5s ease-in-out;
            width: 0%;
        }

        /* Onboarding - Mobile Portrait */
        @media (max-width: 768px) and (orientation: portrait) {
            #onboardingSection {
                padding: 120px 16px 60px;
                min-height: 100vh;
                min-height: 100dvh;
            min-height: 100dvh;
            }

            .content-section {
                padding: 45px 28px;
                min-width: 100%;
                width: 100%;
                max-width: 100%;
            }

            .question-title {
                font-size: 32px;
                margin-bottom: 12px;
            }

            .question-subtitle {
                font-size: 14px;
                margin-bottom: 32px;
            }

            .input-row {
                flex-wrap: wrap;
                gap: 16px;
            }

            .input-field,
            .gender-button {
                width: 100% !important;
                padding: 14px 18px;
            }

            .goal-container {
                flex-direction: column;
                gap: 16px;
            }

            .goal-card {
                width: 100%;
                padding: 24px 20px;
            }

            .activity-container {
                padding: 32px 22px;
            }
        }

        /* Onboarding - Mobile Landscape */
        @media (max-width: 900px) and (orientation: landscape) {
            #onboardingSection {
                padding: 100px 20px 40px;
                min-height: 100vh;
                min-height: 100dvh;
            min-height: 100dvh;
            }

            .content-section {
                padding: 35px 28px;
                max-width: 700px;
            }

            .question-title {
                font-size: 28px;
                margin-bottom: 10px;
            }

            .question-subtitle {
                font-size: 13px;
                margin-bottom: 24px;
            }

            .input-row {
                gap: 14px;
            }

            .input-field,
            .gender-button {
                padding: 12px 16px;
                font-size: 0.95rem;
            }

            .goal-container {
                gap: 14px;
            }

            .goal-card {
                padding: 20px 18px;
            }

            .activity-container {
                padding: 28px 20px;
            }
        }

        /* Onboarding - Small Mobile Portrait */
        @media (max-width: 480px) and (orientation: portrait) {
            #onboardingSection {
                padding: 110px 12px 50px;
            }

            .content-section {
                padding: 40px 22px;
            }

            .question-title {
                font-size: 28px;
            }

            .question-subtitle {
                font-size: 13px;
            }

            .input-field,
            .gender-button {
                padding: 13px 16px;
                font-size: 0.95rem;
            }

            .goal-card {
                padding: 22px 18px;
            }
        }

        /* Meal Notification Styles */
        .meal-notification {
            padding-top: 0.75em;
            position: fixed;
            bottom: 1.5em;
            right: 1.5em;
            width: 18.75em;
            max-width: calc(100% - 3em);
            z-index: 10001;
            transition: transform 0.3s ease-out;
            direction: rtl;
            font-family: 'RTL', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .meal-notification__box {
            animation: flyIn 0.3s ease-out;
            background: linear-gradient(135deg, 
                rgba(79, 197, 196, 0.95) 0%, 
                rgba(61, 179, 178, 0.95) 100%);
            border-radius: 0.75em;
            box-shadow: 0 0.5em 1em rgba(79, 197, 196, 0.3);
            height: auto;
            min-height: 4em;
            transition: all 0.3s ease;
            border: 1px solid rgba(79, 197, 196, 0.5);
            cursor: pointer;
        }

        .meal-notification--out .meal-notification__box {
            animation: flyOut 0.3s ease-out forwards;
        }

        .meal-notification__content {
            display: flex;
            align-items: center;
            padding: 1em;
            width: 100%;
        }

        .meal-notification__icon {
            flex-shrink: 0;
            margin-left: 0.75em;
            width: 2.5em;
            height: 2.5em;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
        }

        .meal-notification__icon-svg {
            width: 1.5em;
            height: 1.5em;
            fill: #ffffff;
        }

        .meal-notification__text {
            flex: 1;
            line-height: 1.5;
        }

        .meal-notification__text-title {
            font-size: 0.9em;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 0.25em;
        }

        .meal-notification__text-subtitle {
            font-size: 0.75em;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.4;
        }

        .meal-notification__box {
            cursor: pointer;
        }

        .meal-notification__box:hover {
            transform: translateY(-2px);
            box-shadow: 0 0.6em 1.2em rgba(79, 197, 196, 0.4);
        }

        .meal-notification__box:active {
            transform: translateY(0);
        }

        @keyframes flyIn {
            from {
                transform: translateY(calc(100% + 1.5em));
            }
            to {
                transform: translateY(0);
            }
        }

        @keyframes flyOut {
            from {
                transform: translateY(0);
            }
            to {
                transform: translateY(calc(100% + 1.5em));
            }
        }

        @media (max-width: 768px) {
            .meal-notification {
                bottom: 1em;
                right: 1em;
                width: calc(100% - 2em);
                max-width: calc(100% - 2em);
            }

            .meal-notification__content {
                padding: 0.875em;
            }

            .meal-notification__text-title {
                font-size: 0.85em;
            }

            .meal-notification__text-subtitle {
                font-size: 0.7em;
            }

        }
