
:root {
    --primary: #2b6cb0;
    --primary-dark: #2c5282;
    --secondary: #4299e1;
    --accent: #38a169;
    --danger: #e53e3e;
    --warning: #dd6b20;
    --light: #f7fafc;
    --dark: #2d3748;
    --gray: #718096;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ec 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 20px;
}

.container {
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 1rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.card {
    background: white;
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.symptom-checker {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #4a5568;
}

input, select, textarea {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f7fafc;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

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

.btn-success {
    background: var(--accent);
}

.btn-success:hover {
    background: #2f855a;
    transform: translateY(-2px);
}

.results {
    display: none;
}

.condition-card {
    background: #f0fff4;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.condition-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.condition-confidence {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.confidence-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    flex-grow: 1;
}

.confidence-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.recommendation {
    background: #ebf8ff;
    border-left: 4px solid var(--secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.recommendation ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.recommendation li {
    margin-bottom: 0.5rem;
}

.health-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s;
}

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

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.health-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.tip {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.tip:hover {
    transform: translateX(5px);
}

.tip i {
    background: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.disclaimer {
    background: #fff5f5;
    border-left: 4px solid var(--danger);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.status-indicator.offline {
    background: var(--danger);
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 1.5rem;
    }

    .health-metrics {
        grid-template-columns: repeat(4, 1fr);
    }

    .health-tips {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .symptom-checker {
        flex-direction: row;
    }

    .symptom-input {
        flex: 2;
    }

    .health-data {
        flex: 1;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Animation for results */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-visible {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100vw);
    transition: transform 0.3s ease-out;
    z-index: 1000;
}

.notification.success {
    border-left: 4px solid var(--accent);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.show {
    transform: translateX(0);
}
