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

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --secondary: #06B6D4;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    padding: 40px;
}

/* Disclaimer */
.disclaimer {
    background: #FEF3C7;
    border-left: 4px solid var(--warning);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.disclaimer svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.disclaimer p {
    font-size: 0.9rem;
    color: var(--gray-700);
}

/* Symptom Section */
.symptom-section h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.section-description {
    color: var(--gray-600);
    margin-bottom: 25px;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-box svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Category Buttons */
.symptom-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Symptom Grid */
.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.symptom-card {
    padding: 15px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.symptom-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.symptom-card.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.symptom-card .icon {
    font-size: 1.5rem;
}

.symptom-card .name {
    font-weight: 500;
}

/* Selected Symptoms */
.selected-symptoms {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.selected-symptoms h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--gray-800);
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-tag {
    background: var(--primary);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.selected-tag .remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.selected-tag .remove:hover {
    opacity: 0.8;
}

/* Analyze Button */
.analyze-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.analyze-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin-bottom: 25px;
}

/* Condition Cards */
.conditions-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.condition-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.condition-card:hover {
    box-shadow: var(--shadow-md);
}

.condition-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.condition-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.severity-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.severity-low {
    background: #D1FAE5;
    color: #065F46;
}

.severity-medium {
    background: #FEF3C7;
    color: #92400E;
}

.severity-high {
    background: #FEE2E2;
    color: #991B1B;
}

.match-score {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.condition-description {
    color: var(--gray-700);
    margin-bottom: 15px;
    line-height: 1.6;
}

.matched-symptoms {
    margin-top: 15px;
}

.matched-symptoms h4 {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.matched-symptoms ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.matched-symptoms li {
    background: var(--gray-100);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* Treatment Section */
.treatment-section {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.treatment-section h3 {
    font-size: 1.3rem;
    color: var(--gray-900);
    margin-bottom: 15px;
}

.treatment-list {
    list-style: none;
}

.treatment-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: start;
    gap: 10px;
}

.treatment-list li:last-child {
    border-bottom: none;
}

.treatment-list li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Providers Section */
.providers-section {
    background: var(--gray-50);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.providers-section h3 {
    font-size: 1.3rem;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.location-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--secondary) 0%, #0891B2 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.providers-list {
    margin-top: 20px;
}

.provider-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.provider-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.provider-type {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.provider-address {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.provider-distance {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.provider-actions {
    display: flex;
    gap: 10px;
}

.provider-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 15px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Footer */
.footer {
    background: var(--gray-100);
    padding: 20px;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-content {
        padding: 20px;
    }

    .header {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .symptom-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .symptom-categories {
        gap: 8px;
    }

    .category-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .condition-name {
        font-size: 1.1rem;
    }

    .provider-actions {
        flex-direction: column;
    }

    .provider-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }

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