/*w CSS Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f0f9ff;
    --text: #1e293b;
    --text-light: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--surface);
    direction: ltr;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--accent);
}

/* translate-btn */

.login-btn {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.translate-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.translate-btn:hover {
    background: var(--primary);
    color: white;
}

.language-text {
    font-size: 0.9rem;
}

.language-icon {
    font-size: 1.1rem;
}

/* Pages */
.page {
    display: none;
    min-height: calc(100vh - 70px);
}

.page.active {
    display: block;
}

.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn.secondary:hover {
    background: white;
    color: var(--primary);
}

.btn.full-width {
    width: 100%;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--background);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
}

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-form {
    background: var(--background);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Symptoms Page */
.symptoms-container {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.symptoms-category {
    margin-bottom: 2rem;
}

.symptoms-category h3 {
    margin-bottom: 1rem;
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.symptom-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.symptom-item:hover {
    border-color: var(--primary);
    background: var(--accent);
}

.symptom-item input {
    margin-right: 0.75rem;
}

/* Results */
.results-container {
    background: var(--accent);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border-left: 4px solid var(--primary);
}

.results-container h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Diseases Page */
.search-box {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    flex: 1;
}

.diseases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.disease-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.disease-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.disease-card p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Contact Page */
.contact-container {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* About Page Styles - أنماط صفحة حول */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.about-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.about-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section h2:before {
    content: "🎯";
    font-size: 1.5rem;
}

.about-section:nth-child(2) h2:before {
    content: "🩺";
}

.about-section p {
    line-height: 1.8;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.about-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
}

.about-section li {
    padding: 0.75rem 0;
    color: var(--text-light);
    font-size: 1.1rem;
    position: relative;
    padding-left: 2.5rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.3s ease;
}

.about-section li:last-child {
    border-bottom: none;
}

.about-section li:before {
    content: "✅";
    color: var(--primary);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 0.75rem;
}

.about-section li:hover {
    color: var(--primary);
}

/* دعم اللغة العربية */
body.arabic .about-section {
    border-left: none;
    border-right: 4px solid var(--primary);
    text-align: right;
}

body.arabic .about-section h2 {
    flex-direction: row-reverse;
}

body.arabic .about-section li {
    padding-left: 0;
    padding-right: 2.5rem;
}

body.arabic .about-section li:before {
    left: auto;
    right: 0;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 1.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    color: #cbd5e1;
    margin: 0;
    font-size: 0.9rem;
}

.footer-theme {
    display: flex;
    align-items: center;
}

/* زر تبديل السمة */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.theme-toggle-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.theme-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: scale(1.1);
}

.theme-text {
    font-weight: 500;
}

/* دعم اللغة العربية */
body.arabic .footer-simple {
    flex-direction: row-reverse;
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .footer-simple {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    body.arabic .footer-simple {
        flex-direction: column;
    }

    .theme-toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #10b981;
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #ef4444;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

body.arabic {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

body.arabic .nav-menu {
    gap: 1.5rem;
}

body.arabic .features-grid,
body.arabic .symptoms-grid,
body.arabic .diseases-grid {
    text-align: right;
}

body.arabic .form-group input,
body.arabic .form-group select,
body.arabic .form-group textarea {
    text-align: right;
}

body.arabic .symptom-item {
    flex-direction: row-reverse;
}

body.arabic .symptom-item input {
    margin-right: 0;
    margin-left: 0.75rem;
}


@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        width: 100%;
    }

    .nav-link {
        display: block;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

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

    .search-box {
        flex-direction: column;
    }

    .auth-form {
        padding: 2rem 1rem;
    }

    .container {
        padding: 0 15px;
    }

    /* التصميم المتجاوب لصفحة About */
    .about-content {
        padding: 1rem 0;
    }

    .about-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .about-section h2 {
        font-size: 1.5rem;
    }

    .about-section li {
        padding: 0.5rem 0;
        padding-left: 2rem;
        font-size: 1rem;
    }

    body.arabic .about-section li {
        padding-left: 0;
        padding-right: 2rem;
    }

}

/* style.css - إضافة هذه الأنماط */

.search-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.results-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.results-section {
    padding: 20px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.local-results {
    border-top: 4px solid #28a745;
}

.api-results {
    border-top: 4px solid #17a2b8;
}

.api-note {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.disease-card.api-result {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.disease-card.api-result:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #6c757d;
}

.error-message {
    text-align: center;
    padding: 40px;
    background: #f8d7da;
    border-radius: 10px;
    color: #721c24;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h3 {
    color: #6c757d;
    margin-bottom: 20px;
}

.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.symptom-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.symptom-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.symptom-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.symptom-item span {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

@media (max-width: 768px) {
    .symptoms-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* تنسيق إضافي للتصنيفات الجديدة */
.symptoms-category {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.symptoms-category h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

/* تنسيق متجاوب */
@media (max-width: 768px) {
    .symptoms-category {
        padding: 15px;
        margin-bottom: 20px;
    }

    .symptoms-category h3 {
        font-size: 18px;
    }
}


#chatButton {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #008cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#chatButton:hover {
    background-color: #006b99;
}