:root {
    --bg-main: #0B0E14;
    --bg-card: rgba(255, 255, 255, 0.02);
    --border-card: rgba(255, 255, 255, 0.05);
    --primary: #00F0FF;
    --primary-hover: #00D1FF;
    --danger: #FF3366;
    --warning: #FFB800;
    --success: #00F0FF; 
    --text-main: #FFFFFF;
    --text-muted: #8A96A8;
    --font-family: 'Cairo', system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background: var(--bg-main) radial-gradient(circle at 50% -10%, rgba(0, 240, 255, 0.15), transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cairo', sans-serif;
    font-size: 16px; 
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}

body.no-scroll {
    overflow: hidden;
}

.navbar {
    padding: 1rem;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 14, 20, 0.95);
}

.navbar .container-nav {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.logo svg {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--text-main);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px 0 rgba(255, 51, 102, 0.39);
}

.btn-danger:hover {
    background: #ff1a53;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.23);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex-grow: 1;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,240,255,0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #8A96A8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 650px;
    margin-inline: auto;
    line-height: 1.6;
}

/* العناوين الأساسية بأحجام ثابتة تتجاوب مع الشاشات عبر Media Queries */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
p { font-size: 1rem; }

.western-digits {
    font-family: 'Cairo', sans-serif;
    unicode-bidi: plaintext;
}

.search-box-wrapper {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.search-form {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.search-form:focus-within {
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.3), 0 10px 40px rgba(0,0,0,0.6);
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    padding: 0 1.5rem;
    outline: none;
}

.search-input::placeholder {
    color: rgba(138, 150, 168, 0.5);
}

.search-btn {
    background: var(--text-main);
    color: var(--bg-main);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Glass Card Content */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin: 2rem auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A96A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1em;
}

[dir="rtl"] select.form-control {
    background-position: left 1rem center;
}

[dir="ltr"] select.form-control {
    background-position: right 1rem center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #8A96A8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-card);
    color: var(--text-muted);
    margin-top: auto;
    font-size: 0.9rem;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }

/* Custom file upload */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border-card);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.05);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.08);
        border: 1px solid var(--primary);
        color: var(--primary);
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        z-index: 100;
        transition: all 0.2s;
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    }

    .menu-toggle:active {
        transform: scale(0.9);
        background: var(--primary);
        color: #000;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0B0E14;
        flex-direction: column;
        align-items: center;
        padding: 6rem 1.5rem 2rem;
        gap: 1rem;
        z-index: 90;
        text-align: center;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-card);
        width: 100%;
        color: var(--text-main);
    }

    .nav-links .btn-primary {
        margin-top: 0.5rem;
        border-bottom: none;
        padding: 1rem;
    }

    .lang-switch {
        margin-inline-start: 0;
        justify-content: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-card);
        width: 100%;
        gap: 1.5rem;
    }

    .lang-switch a {
        font-size: 1rem;
    }

    .hero { padding: 2rem 0.5rem; }
    .hero h1 { font-size: 1.75rem; margin-bottom: 0.5rem; line-height: 1.3; }
    .hero p { font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.5; padding: 0 1rem; }
    
    .search-box-wrapper { padding: 0; width: 100%; }
    .search-form { 
        padding: 0.75rem;
        flex-direction: column; 
        gap: 0.75rem;
        background: rgba(11, 14, 20, 0.4);
        border: 1px solid var(--border-card);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    
    .search-input {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--border-card);
        font-size: 1.1rem;
        border-radius: 0;
    }

    .search-btn { 
        width: 100%; 
        padding: 1rem;
        font-size: 1.1rem;
    }

    /* Override inline grids */
    .stats-grid, 
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }

    .stat-card { padding: 1.25rem; }
    .stat-value { font-size: 2rem; }

    .glass-card { padding: 1.25rem 1rem; margin: 1rem 0; width: 100%; }
    
    .footer {
        padding: 2rem 1rem;
        font-size: 0.8rem;
    }
    .footer p {
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    /* Fix sections with inline margins */
    section[style*="margin-top: 5rem"] {
        margin-top: 2.5rem !important;
    }
    section[style*="margin-bottom: 4rem"] {
        margin-bottom: 2rem !important;
    }

    /* Fix Latest Warnings Grid */
    .glass-card div[style*="display: flex"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
}

/* Base styles for new elements */
.menu-toggle {
    display: none;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    margin-inline-start: 1rem;
}

.lang-switch a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-switch a.active {
    color: var(--primary);
}

/* --- إعدادات التجاوب للهواتف والأجهزة اللوحية --- */

/* إخفاء زر القائمة في الشاشات الكبيرة */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

@media screen and (max-width: 768px) {
    /* إظهار زر القائمة في الهواتف */
    .menu-toggle {
        display: block !important;
        z-index: 10000;
        position: relative;
    }

    /* إعدادات القائمة المخفية للهاتف */
    .nav-links {
        display: none; /* إخفاء افتراضي */
        position: fixed; /* Fixed أفضل من absolute لتغطية الشاشة بالكامل */
        top: 70px; /* قم بتعديل هذا الرقم ليتناسب مع ارتفاع الـ Navbar لديك (المنطقة العلوية) */
        left: 0;
        width: 100%;
        height: calc(100vh - 70px); /* أخذ مساحة الشاشة المتبقية */
        background-color: #121418; /* لون خلفية داكن ليتناسب مع تصميمك */
        z-index: 9999; /* رقم عالي جداً لضمان ظهورها فوق كل شيء */
        flex-direction: column;
        align-items: center; /* توسيط العناصر */
        justify-content: flex-start;
        padding-top: 2rem;
        box-sizing: border-box;
    }

    /* هذا الكلاس يتم تفعيله بالجافاسكريبت لإظهار القائمة */
    .nav-links.active {
        display: flex !important; /* فرض الظهور */
    }

    /* تنسيق الروابط داخل القائمة في الهاتف */
    .nav-links a {
        margin: 15px 0 !important;
        font-size: 1.2rem;
        width: 90%;
        text-align: center;
        display: block;
    }

    /* تنسيق أزرار تغيير اللغة في الهاتف */
    .lang-switch {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .lang-switch a {
        width: auto !important;
        margin: 0 !important;
    }
}
