/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* Section */
.section {
    padding: 2rem 0;
}

/* Survey Container */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

/* Progress Bar */
.survey-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 25%;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Survey Steps */
.survey-step {
    display: none;
}

.survey-step.active {
    display: block;
}

.survey-step h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Cancer Type Grid */
.cancer-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cancer-type-card {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.cancer-type-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.cancer-type-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.cancer-type-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cancer-type-card .name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

/* Options List */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-card {
    display: block;
    cursor: pointer;
}

.option-card input {
    display: none;
}

.option-content {
    display: block;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.option-card:hover .option-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.option-card input:checked + .option-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.option-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.option-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

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

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-item input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

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

.survey-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Navigator Section */
.profile-summary {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.profile-details h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.profile-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Pathway Navigation */
.pathway-nav {
    margin-bottom: 2rem;
    overflow-x: auto;
}

.pathway-steps {
    display: flex;
    gap: 0;
    min-width: max-content;
}

.pathway-step-btn {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pathway-step-btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.pathway-step-btn:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.pathway-step-btn:hover {
    background: var(--primary-light);
}

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

.pathway-step-btn.recommended {
    border-color: var(--success-color);
}

.pathway-step-btn.recommended::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border-radius: 50%;
}

.step-number {
    font-size: 0.75rem;
    opacity: 0.7;
}

.step-name {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Main Content */
.main-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Pathway Content */
.pathway-section {
    margin-bottom: 2rem;
}

.pathway-section:last-child {
    margin-bottom: 0;
}

.pathway-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pathway-section h3 .icon {
    color: var(--primary-color);
}

.info-card {
    background: var(--background);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.info-card.highlight {
    border-left-color: var(--success-color);
    background: #f0fdf4;
}

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

.info-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-card ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.info-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Action Items */
.action-list {
    list-style: none;
}

.action-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.action-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.action-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer .disclaimer {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.footer .source {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer a {
    color: var(--primary-light);
}

/* Current Step Indicator */
#current-step-indicator {
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    text-align: center;
}

#current-step-indicator .step-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

#current-step-indicator .step-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .survey-container {
        padding: 1.5rem;
    }

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

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        flex-direction: column;
        text-align: center;
    }

    .pathway-steps {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .pathway-step-btn {
        min-width: 100px;
        padding: 0.75rem 0.5rem;
    }

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

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

.survey-step.active {
    animation: fadeIn 0.3s ease;
}
