@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --card-border: rgba(56, 189, 248, 0.2);
    --primary-color: #0284c7;
    --accent-color: #38bdf8;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
    --bg-color: #030712;
    --text-color: #f8fafc;
    --card-bg: rgba(15, 23, 42, 0.85);
    --card-border: rgba(56, 189, 248, 0.25);
    --primary-color: #38bdf8;
    --accent-color: #818cf8;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    padding: 60px 0; /* مساحة علوية وسفلية للموجات */
}

/* الهيدر */
.page-header {
    width: 100%;
    max-height: 250px;
    overflow: hidden;
    position: relative;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.85);
}

/* الحاوية الرئيسية للنموذج */
.main-container {
    max-width: 750px;
    width: 90%;
    margin: -30px auto;
    padding: 30px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* شريط التحكم */
.controls-bar {
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    padding: 10px 18px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
    flex-wrap: wrap;
}

.lang-btn, .theme-btn, .home-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.home-btn {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.lang-btn:hover, .theme-btn:hover, .home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
}

/* عناوين الأقسام */
.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    margin-top: 20px;
    color: var(--primary-color);
}

/* حقول الإدخال */
.form-group {
    margin-bottom: 20px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* زر الإرسال */
.form-submit-container {
    text-align: center;
    margin-top: 25px;
}

.submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* موجات علوية */
.waves-top-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.5;
    transform: scaleY(-1); /* مقلوبة للأعلى */
}

/* موجات سفلية */
.waves-bottom-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.5;
}

.wave {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-position: 0 bottom;
}

.wave-one {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40'%3E%3Cpath d='M800 20c-100-15-200-15-300 0s-200 15-300 0-200-15-300 0v20h800z' fill='%2338bdf8' opacity='0.3'/%3E%3C/svg%3E");
    animation: waveAnimation 14s linear infinite;
}

.wave-two {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40'%3E%3Cpath d='M800 10c-100 15-200 15-300 0s-200-15-300 0-200 15-300 0v30h800z' fill='%230284c7' opacity='0.25'/%3E%3C/svg%3E");
    animation: waveAnimation 9s linear infinite reverse;
}

@keyframes waveAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .main-container {
        margin: -20px 15px;
        padding: 20px;
    }
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

button[type="submit"], .submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    display: block;
    margin: 50px auto 20px auto;
}

button[type="submit"]:hover, .submit-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* منع التمرير الأفقي نهائياً من جذور الصفحة */
html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}

.waves-top-wrapper, .waves-bottom-wrapper {
    position: fixed;
    left: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    pointer-events: none;
}

/* تنسيقات الشريط الجانبي */
.app-sidebar {
    position: fixed;
    top: 0;
    right: 0; /* اجعلها left: 0 إذا كنت تريده في الجانب الأيسر */
    width: 280px;
    height: 100vh;
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(15px);
    border-left: 1px solid var(--card-border, rgba(56, 189, 248, 0.2));
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}

/* دعم الوضع الداكن تلقائياً مع متغيرات موقعك */
body.dark-mode .app-sidebar {
    background: rgba(15, 23, 42, 0.85);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4);
}

/* حاوية اللوجو مع تأثير حركة وإضاءة خفيفة */
.sidebar-logo-container {
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.3;
    z-index: 0;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.4; }
}

.sidebar-logo {
    width: 75px;
    height: 75px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    border-radius: 18px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.sidebar-title {
    margin-top: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color, #0284c7), var(--accent-color, #38bdf8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

/* قائمة الروابط الجانبية */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.sidebar-menu li a, 
.sidebar-theme-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 14px;
    color: var(--text-color, #0f172a);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* تأثير عند المرور بالماوس (Hover) مع حركة انزلاق خفيفة */
.sidebar-menu li a:hover, 
.sidebar-theme-btn:hover {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(56, 189, 248, 0.15));
    color: var(--primary-color, #0284c7);
    transform: translateX(-5px); /* عكس الاتجاه لو الشريط على اليسار خليها 5px */
}

.sidebar-menu li a.active {
    background: linear-gradient(135deg, var(--primary-color, #0284c7), var(--accent-color, #38bdf8));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

/* زر إظهار وإخفاء القائمة للموبايل */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, rgba(56, 189, 248, 0.3));
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sidebar-toggle-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-color, #0f172a);
    transition: 0.3s;
}

/* التجاوب مع الهواتف والشاشات الصغيرة */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(100%); /* إخفاء الشريط جانبياً على الموبايل */
    }
    .app-sidebar.active {
        transform: translateX(0);
    }
    .sidebar-toggle-btn {
        display: flex;
    }
    /* ترك مساحة للمحتوى الرئيسي إذا لزم الأمر */
    body {
        padding-right: 20px !important;
    }
}

        /* مقدمة مخصصة وفخمة لصفحة الرأي والمقترحات */
        .intro-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, #1b0c2e 0%, #0c0414 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 99999;
            transition: opacity 0.7s ease, visibility 0.7s ease;
        }

        .feedback-pulse-ring {
            position: absolute;
            width: 220px;
            height: 220px;
            border: 2px solid rgba(168, 85, 247, 0.4);
            border-radius: 50%;
            animation: pulseWave 2.5s infinite ease-out;
        }

        @keyframes pulseWave {
            0% {
                transform: scale(0.8);
                opacity: 1;
            }
            100% {
                transform: scale(1.5);
                opacity: 0;
            }
        }

        .intro-icon-box {
            position: relative;
            z-index: 2;
            width: 130px;
            height: 130px;
            background: linear-gradient(135deg, #9333ea, #6b21a8);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 25px;
            box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
            animation: floatIcon 3s ease-in-out infinite;
        }

        .intro-icon-box svg {
            width: 65px;
            height: 65px;
            fill: #ffffff;
        }

        @keyframes floatIcon {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .intro-content {
            position: relative;
            z-index: 2;
            text-align: center;
            padding: 0 20px;
        }

        .intro-main-title {
            font-family: 'Cairo', sans-serif;
            font-size: 2rem;
            color: #ffffff;
            margin-bottom: 8px;
            text-shadow: 0 2px 8px rgba(0,0,0,0.4);
            transition: opacity 0.3s ease;
        }

        .intro-sub-text {
            font-family: 'Cairo', sans-serif;
            font-size: 1.2rem;
            color: #d8b4fe;
            font-weight: 600;
            opacity: 0;
            transform: translateY(15px);
            animation: fadeInUpCustom 0.5s forwards 0.2s;
            transition: opacity 0.3s ease;
        }

        @keyframes fadeInUpCustom {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

            /* التحكم بظهور النصوص العربية والإنجليزية بناءً على لغة الصفحة الحالية */
    html[dir="rtl"] .en-text,
    html[dir="ltr"] .ar-text {
        display: none !important;
    }

    /* التثبيت في زاوية الصفحة العلوية (يمين للعرّبية، يسار للإنجليزية) */
    .side-info-container {
        position: fixed;
        top: 20px;
        z-index: 99999;
        font-family: 'Cairo', sans-serif;
    }

    html[dir="rtl"] .side-info-container {
        right: 20px;
    }

    html[dir="ltr"] .side-info-container {
        left: 20px;
    }

    /* تصميم الزر الرئيسي */
    .side-main-btn {
        background: linear-gradient(135deg, #9333ea, #6b21a8);
        color: white;
        border: none;
        padding: 10px 14px;
        border-radius: 30px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
        transition: background 0.3s ease, transform 0.2s ease;
    }

    .menu-icon-symbol {
        font-size: 16px;
        font-weight: bold;
    }

    .side-main-btn:hover {
        background: linear-gradient(135deg, #a855f7, #7e22ce);
        transform: scale(1.05);
    }

    .arrow-icon {
        font-size: 8px;
        transition: transform 0.3s ease;
    }

    /* القائمة المنسدلة */
    .side-submenu {
        position: absolute;
        top: 125%;
        background: rgba(26, 11, 46, 0.98);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(168, 85, 247, 0.3);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        width: 190px;
        display: none;
        flex-direction: column;
        overflow: hidden;
        animation: fadeInSubSide 0.3s ease;
    }

    html[dir="rtl"] .side-submenu {
        right: 0;
        text-align: right;
    }

    html[dir="ltr"] .side-submenu {
        left: 0;
        text-align: left;
    }

    @keyframes fadeInSubSide {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* عناصر القائمة الرئيسية */
    .side-submenu-item {
        padding: 11px 15px;
        color: #ffffff;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease, padding-inline-start 0.2s ease;
    }

    .side-submenu-item:hover {
        background: rgba(147, 51, 234, 0.4);
    }

    /* مجموعة الرياضات المتوفرة */
    .submenu-group {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(0, 0, 0, 0.2);
    }

    /* العنوان الرئيسي للرياضات (بخط أصغر) */
    .side-submenu-title {
        padding: 8px 15px;
        color: #c084fc;
        font-size: 12px; /* خط أصغر كما طلبت */
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* عناصر الرياضات الفرعية الأربع */
    .side-submenu-subitem {
        padding: 7px 15px 7px 25px; /* مسافة أعمق قليلاً للتمييز */
        color: #e2e8f0;
        text-decoration: none;
        font-size: 12px; /* خط أصغر ومناسب */
        display: block;
        transition: background 0.2s ease, color 0.2s ease;
    }

    html[dir="ltr"] .side-submenu-subitem {
        padding: 7px 25px 7px 15px;
    }

    .side-submenu-subitem:hover {
        background: rgba(147, 51, 234, 0.25);
        color: #ffffff;
    }

    /* تفعيل القائمة وإدارة السهم */
    .side-info-container.active .side-submenu {
        display: flex;
    }

    .side-info-container.active .arrow-icon {
        transform: rotate(180deg);
    }

        /* التحكم بظهور النصوص العربية والإنجليزية بناءً على لغة الصفحة الحالية */
    html[dir="rtl"] .en-text,
    html[dir="ltr"] .ar-text {
        display: none !important;
    }

    /* التثبيت في زاوية الصفحة العلوية (يمين للعربية، يسار للإنجليزية) */
    .side-info-container {
        position: fixed;
        top: 20px;
        z-index: 99999;
        font-family: 'Cairo', sans-serif;
    }

    html[dir="rtl"] .side-info-container {
        right: 20px;
    }

    html[dir="ltr"] .side-info-container {
        left: 20px;
    }

    /* تصميم الزر الرئيسي */
    .side-main-btn {
        background: linear-gradient(135deg, #9333ea, #6b21a8);
        color: white;
        border: none;
        padding: 10px 14px;
        border-radius: 30px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
        transition: background 0.3s ease, transform 0.2s ease;
    }

    .menu-icon-symbol {
        font-size: 16px;
        font-weight: bold;
    }

    .side-main-btn:hover {
        background: linear-gradient(135deg, #a855f7, #7e22ce);
        transform: scale(1.05);
    }

    .arrow-icon {
        font-size: 8px;
        transition: transform 0.3s ease;
    }

    /* القائمة المنسدلة */
    .side-submenu {
        position: absolute;
        top: 125%;
        background: rgba(26, 11, 46, 0.98);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(168, 85, 247, 0.3);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        width: 190px;
        display: none;
        flex-direction: column;
        overflow: hidden;
        animation: fadeInSubSide 0.3s ease;
    }

    html[dir="rtl"] .side-submenu {
        right: 0;
        text-align: right;
    }

    html[dir="ltr"] .side-submenu {
        left: 0;
        text-align: left;
    }

    @keyframes fadeInSubSide {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* تنسيق عنوان القائمة في البداية */
    .submenu-header-title {
        padding: 10px 15px 4px 15px;
        color: #d8b4fe;
        font-size: 13px;
        font-weight: bold;
        text-align: center;
    }

    /* الخط الفاصل */
    .submenu-divider {
        height: 1px;
        background: rgba(168, 85, 247, 0.4);
        margin: 4px 10px 8px 10px;
    }

    /* عناصر القائمة الرئيسية */
    .side-submenu-item {
        padding: 10px 15px;
        color: #ffffff;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease;
    }

    .side-submenu-item:hover {
        background: rgba(147, 51, 234, 0.4);
    }

    /* مجموعة الرياضات المتوفرة */
    .submenu-group {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(0, 0, 0, 0.2);
    }

    /* العنوان الرئيسي للرياضات (بخط أصغر) */
    .side-submenu-title {
        padding: 8px 15px;
        color: #c084fc;
        font-size: 12px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* عناصر الرياضات الفرعية الأربع */
    .side-submenu-subitem {
        padding: 6px 15px 6px 25px;
        color: #e2e8f0;
        text-decoration: none;
        font-size: 12px;
        display: block;
        transition: background 0.2s ease, color 0.2s ease;
    }

    html[dir="ltr"] .side-submenu-subitem {
        padding: 6px 25px 6px 15px;
    }

    .side-submenu-subitem:hover {
        background: rgba(147, 51, 234, 0.25);
        color: #ffffff;
    }

    /* تفعيل القائمة وإدارة السهم */
    .side-info-container.active .side-submenu {
        display: flex;
    }

    .side-info-container.active .arrow-icon {
        transform: rotate(180deg);
    }

            .sport-bg-lines {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
            opacity: 0.15;
        }
        .sport-bg-lines span {
            position: absolute;
            display: block;
            width: 200px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
            animation: sportMoveLines 6s linear infinite;
        }
        .sport-bg-lines span:nth-child(1) { left: 10%; animation-delay: 0s; }
        .sport-bg-lines span:nth-child(2) { left: 50%; animation-delay: 2s; }
        .sport-bg-lines span:nth-child(3) { left: 80%; animation-delay: 4s; }
        @keyframes sportMoveLines {
            0% { transform: translateY(-100%); }
            100% { transform: translateY(100%); }
        }