:root {
    --primary-color: #1e3a8a; /* أزرق داكن أكثر عصرية */
    --secondary-color: #3b82f6; /* أزرق ساطع */
    --accent-color: #ef4444; /* أحمر */
    --success-color: #10b981; /* أخضر */
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: var(--white);
    padding: 40px 0 60px; /* زيادة الحشوة السفلية للتداخل */
    text-align: center;
    position: relative;
    clip-path: ellipse(150% 100% at 50% 0%); /* تأثير انحناء */
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.2rem;
    font-weight: 800;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

header nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: bold;
    backdrop-filter: blur(5px);
}

.nav-link:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Main Content */
main {
    flex: 1;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px; /* تعديل المسافة لمنع التداخل */
    padding-bottom: 100px; /* مسافة للشريط السفلي */
}

/* Search Box */
.search-container {
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid #eef2ff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e3a8a; /* Dark blue as in image */
    margin-bottom: 8px;
    font-family: 'Arial', sans-serif; /* Numbers look better in Arial/Roboto */
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b; /* Gray text */
    font-weight: 500;
}

.input-group {
    display: flex;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
    border-radius: 50px;
    background: var(--white);
    padding: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(59, 130, 246, 0.2);
}

.input-group:hover, .input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px rgba(59, 130, 246, 0.25);
    border-color: var(--secondary-color);
}

.input-group input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: 'Tajawal', sans-serif;
    background: transparent;
    color: var(--text-color);
}

.input-group button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group button:hover {
    background-color: #2563eb;
}

.input-group button:active {
    transform: scale(0.95);
}

/* Results */
.results-container {
    width: 100%;
    max-width: 800px;
}

.result-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f1f5f9;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(to left, #f8fafc, #ffffff);
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.result-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-title i {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.status-valid {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-invalid {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-found {
    background-color: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.result-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 25px;
}

.info-item {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.info-item:hover {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

.info-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.info-item label i {
    width: 32px;
    height: 32px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.3s;
}

.info-item:hover label i {
    transform: rotate(10deg) scale(1.1);
    background-color: var(--secondary-color);
    color: white;
}

.info-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.info-item span {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.15rem;
    font-family: 'Arial', sans-serif; /* Better for numbers */
    letter-spacing: 0.5px;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    color: var(--secondary-color);
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.result-footer {
    padding: 20px 25px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-weight: 600;
}

.contact-info i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.whatsapp-btn-large {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn-large:hover {
    background-color: #1faf53;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px -1px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn-large i {
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .result-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .whatsapp-btn-large {
        justify-content: center;
    }
    
    .info-item span {
        padding-right: 0;
    }
}

/* Alerts */
.alert-box {
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid transparent;
    width: 100%;
    max-width: 800px;
    box-shadow: var(--shadow);
}

.alert-box h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-box p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.alert-box.warning {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.alert-box.info {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Forms */
.form-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

.form-container h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group label i {
    margin-left: 8px;
    color: var(--secondary-color);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f9fafb;
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 30px 0;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--secondary-color);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.btn-submit:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(59, 130, 246, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background-color: var(--white);
    color: var(--text-light);
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    padding-bottom: 120px; /* لتجنب تداخل الفوتر مع الشريط السفلي */
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    color: var(--text-light);
    box-shadow: var(--shadow);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #d1d5db;
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none; /* مخفي افتراضياً (للداسكتوب) */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 30px 0 50px;
        border-radius: 0 0 20px 20px;
        clip-path: none;
    }
    
    /* إخفاء القائمة العلوية في الموبايل لأننا سنستخدم الشريط السفلي */
    header nav {
        display: none;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .input-group {
        flex-direction: column;
        padding: 8px;
        border-radius: 20px;
    }

    .input-group input {
        text-align: center;
        border: 2px solid #e2e8f0;
        border-radius: 15px;
        background: #f8fafc;
        margin-bottom: 10px;
    }

    .input-group input:focus {
        border-color: var(--secondary-color);
        background: #ffffff;
    }

    .input-group button {
        width: 100%;
        justify-content: center;
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .status-badge {
        align-self: flex-start;
    }

    .form-container {
        padding: 20px;
    }
    
    main {
        margin-top: 10px;
    }

    /* Bottom Navigation Styles */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        background-color: var(--white);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        border-radius: 50px;
        padding: 10px 20px;
        z-index: 1000;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.5);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-light);
        font-size: 0.8rem;
        transition: all 0.3s;
        gap: 5px;
    }

    .nav-item i {
        font-size: 1.5rem;
        transition: transform 0.2s;
    }

    .nav-item:hover, .nav-item.active {
        color: var(--primary-color);
    }
    
    .nav-item:hover i {
        transform: translateY(-3px);
    }
    
    /* WhatsApp Special Style */
    .nav-item.whatsapp {
        color: #25D366;
    }

    /* Center Item (Add Report) */
    .nav-item.center-btn {
        background-color: var(--primary-color); /* لون الزر */
        color: var(--white);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: -30px; /* رفعه للأعلى قليلاً */
        box-shadow: 0 5px 15px rgba(30, 58, 138, 0.4);
        border: 4px solid var(--bg-color); /* حدود خارجية */
        position: relative;
    }

    .nav-item.center-btn i {
        font-size: 1.2rem;
        transform: none; /* إلغاء التأثير الافتراضي */
    }
    
    .nav-item.center-btn span {
        position: absolute;
        bottom: -25px;
        color: var(--text-light);
        font-size: 0.8rem;
        font-weight: bold;
        width: 100px;
        text-align: center;
        line-height: 1;
    }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background-color: #1f2937;
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification i {
    color: #4ade80; /* Green check */
}