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

:root {
    --primary-color: #50C878;
    --primary-dark: #3FA863;
    --secondary-color: #2ECC71;
    --accent-color: #FF6B6B;
    --warning-color: #FFA500;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;
    --border-color: #DEE2E6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

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

.header-content {
    margin-bottom: 20px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* Progress Indicator */
.progress-container {
    padding: 30px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: var(--transition);
    border: 3px solid var(--border-color);
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

.progress-step.completed .step-number {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 40px 30px;
    min-height: 500px;
}

.step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step.active {
    display: block;
}

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

.step-header {
    margin-bottom: 30px;
}

.step-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Search Container */
.search-container {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

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

/* Symptom Categories */
.symptom-categories {
    margin-bottom: 30px;
}

.category-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.symptom-item {
    padding: 15px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.symptom-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.symptom-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Selected Symptoms */
.selected-symptoms {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

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

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

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

.tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: var(--transition);
}

.tag-remove:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Form Styles */
.health-form {
    max-width: 100%;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.range-labels span:nth-child(2) {
    font-weight: 600;
    color: var(--primary-color);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.radio-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.radio-option:has(input[type="radio"]:checked) {
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--primary-color);
}

/* Tag Input */
.tag-input-container {
    margin-top: 15px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

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

.tag-item .tag-remove {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
    transition: var(--transition);
}

.tag-item .tag-remove:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Buttons */
.step-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

/* Loading State */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Insights Content */
.insights-content {
    animation: fadeIn 0.5s ease;
}

/* Summary Section */
.insight-summary {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    color: white;
}

.insight-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 600;
    color: white;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.summary-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.key-findings {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.key-findings h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.key-findings ul {
    list-style: none;
    padding: 0;
}

.key-findings li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 25px;
    position: relative;
}

.key-findings li:before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.key-findings li:last-child {
    border-bottom: none;
}

.insight-section {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.insight-section h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
}

.insight-section.medical-section {
    background: #FFF9E6;
    border: 2px solid var(--warning-color);
}

.pattern-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.pattern-card {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.pattern-card.warning {
    border-left-color: var(--warning-color);
    background: #FFF9E6;
}

.pattern-card.alert {
    border-left-color: var(--accent-color);
    background: #FFE6E6;
}

.pattern-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pattern-icon {
    font-size: 1.5rem;
}

.pattern-card h4 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.pattern-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.empty-state {
    padding: 30px;
    text-align: center;
    background: white;
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.recommendation-list,
.tips-list {
    list-style: none;
}

.recommendation-category {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.category-icon {
    font-size: 1.5rem;
}

.category-header h4 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.category-recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
    transition: var(--transition);
}

.recommendation-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.rec-number {
    min-width: 30px;
    height: 30px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.rec-content {
    flex: 1;
}

.rec-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.tip-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tip-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.tip-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.medical-advice {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.medical-advice-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.medical-advice-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.medical-advice-item.positive {
    border-left-color: var(--secondary-color);
    background: #E8F5E9;
}

.medical-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.medical-content {
    flex: 1;
}

.medical-content strong {
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.medical-content p {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

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

    .header {
        padding: 20px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .progress-container {
        padding: 20px 15px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .main-content {
        padding: 25px 20px;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

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

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

    .step-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .pattern-cards {
        grid-template-columns: 1fr;
    }

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

    .insight-summary {
        padding: 20px;
    }

    .insight-summary h3 {
        font-size: 1.3rem;
    }

    .summary-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.7rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}


