:root {
    /* Sophisticated Medical Color Palette */
    --primary: #2c7da0;
    --primary-light: #3498db;
    --primary-dark: #195e83;
    --secondary: #2a9d8f;
    --accent: #e76f51;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --white: #ffffff;

    /* Glow Colors */
    --glow-primary: rgba(44, 125, 160, 0.5);
    --glow-secondary: rgba(42, 157, 143, 0.5);
    --glow-accent: rgba(231, 111, 81, 0.5);

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-4);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, rgba(255, 255, 255, 0.05) 21%, transparent 22%);
    background-size: 20px 20px;
    animation: backgroundMove 20s linear infinite;
    opacity: 0.5;
    z-index: 0;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-2);
}

.logo i {
    font-size: 2.5rem;
    margin-right: var(--space-3);
    color: var(--white);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.logo h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 1px;
}

.tagline {
    font-size: var(--text-base);
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
}

/* Progress Bar */
.progress-container {
    margin: var(--space-6) 0;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.progress-bar::before {
    content: '';
    background-color: var(--gray);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    z-index: 0;
}

.progress {
    background-color: var(--primary);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 0%;
    z-index: 1;
    transition: var(--transition-normal);
}

.circle {
    background-color: var(--white);
    color: var(--gray);
    border-radius: 50%;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gray);
    transition: var(--transition-normal);
    z-index: 2;
    font-weight: 600;
    position: relative;
}

.circle.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--glow-primary);
}

.circle.active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    opacity: 0.4;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

/* Content Area */
.content {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.step-container {
    animation: fadeIn 0.5s ease;
    transition: var(--transition-normal);
}

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

.step-container.hidden {
    display: none;
}

.step-title {
    font-size: var(--text-xl);
    color: var(--primary);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--light);
}

.step-title i {
    margin-right: var(--space-2);
    color: var(--primary);
}

/* Symptom Groups */
.symptom-group {
    margin-bottom: var(--space-6);
    animation: slideUp 0.5s ease;
    position: relative;
}

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

.symptom-group::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: var(--radius-md);
    z-index: -1;
    opacity: 0;
    transition: var(--transition-fast);
}

.symptom-group:hover::before {
    opacity: 0.2;
    background-color: var(--primary-light);
    box-shadow: 0 0 20px var(--glow-primary);
}

.symptom-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: var(--space-3);
    color: var(--dark);
}

.symptom-label i {
    color: var(--primary);
    margin-right: var(--space-2);
    font-size: 1.2em;
}

.option-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.option-btn {
    background-color: var(--light);
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    color: var(--dark);
    font-family: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    background-color: rgba(44, 125, 160, 0.1);
    transform: translateY(-2px);
}

.option-btn.selected {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 15px var(--glow-primary);
}

.option-btn.selected::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-light);
    opacity: 0;
    animation: selectGlow 2s infinite;
}

@keyframes selectGlow {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Diagnosis Results */
.diagnosis-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.7s ease;
    position: relative;
    overflow: hidden;
}

.diagnosis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.diagnosis-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-6);
}

.diagnosis-header i {
    font-size: var(--text-2xl);
    color: var(--primary);
    margin-right: var(--space-3);
}

.diagnosis-header h2 {
    color: var(--primary-dark);
    font-weight: 600;
}

.primary-diagnosis {
    margin-bottom: var(--space-4);
}

.primary-diagnosis h3 {
    font-size: var(--text-lg);
    color: var(--dark);
    margin-bottom: var(--space-2);
}

.diagnosis-value {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--primary);
    padding: var(--space-3) var(--space-4);
    background-color: rgba(44, 125, 160, 0.1);
    border-radius: var(--radius-md);
    display: inline-block;
    margin-bottom: var(--space-4);
    position: relative;
    overflow: hidden;
}

.diagnosis-value::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.confidence-level {
    margin-bottom: var(--space-6);
    font-weight: 500;
}

#confidence-level-value {
    font-weight: 600;
}

#confidence-level-value.high {
    color: var(--success);
}

#confidence-level-value.medium {
    color: var(--warning);
}

#confidence-level-value.low {
    color: var(--danger);
}

.differential-diagnoses {
    margin-bottom: var(--space-6);
}

.differential-diagnoses h3, .treatment-recommendations h3 {
    font-size: var(--text-lg);
    color: var(--dark);
    margin-bottom: var(--space-3);
}

#differential-list, #treatment-list {
    list-style-type: none;
    padding-left: var(--space-4);
}

#differential-list li {
    margin-bottom: var(--space-2);
    position: relative;
    padding-left: var(--space-4);
}

#differential-list li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

#treatment-list li {
    margin-bottom: var(--space-3);
    position: relative;
    padding-left: var(--space-6);
    display: flex;
    align-items: flex-start;
}

#treatment-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--success);
    position: absolute;
    left: 0;
}

.disclaimer {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
}

.disclaimer i {
    color: var(--warning);
    margin-right: var(--space-3);
    margin-top: var(--space-1);
}

.disclaimer p {
    font-size: var(--text-sm);
    color: var(--dark);
}

/* Action Buttons */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-6);
}

.action-btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    border: none;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(44, 125, 160, 0.3);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(44, 125, 160, 0.4);
}

.primary-btn:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background-color: var(--light);
    color: var(--dark);
}

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

.action-btn i {
    margin: 0 var(--space-2);
}

/* Footer */
.footer {
    margin-top: var(--space-8);
    text-align: center;
    color: var(--gray);
    font-size: var(--text-xs);
}

.footer p {
    margin-bottom: var(--space-2);
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        padding: var(--space-3);
    }

    .content {
        padding: var(--space-4);
    }

    .step-title {
        font-size: var(--text-lg);
    }

    .option-container {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
    }

    .circle {
        height: 30px;
        width: 30px;
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .header {
        padding: var(--space-3);
    }

    .logo h1 {
        font-size: var(--text-xl);
    }

    .tagline {
        font-size: var(--text-sm);
    }

    .diagnosis-header h2 {
        font-size: var(--text-lg);
    }

    .action-btn {
        min-width: auto;
        padding: var(--space-2) var(--space-4);
    }
}