﻿        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #0077B6;
            --primary-dark: #005A8C;
            --primary-light: #00B4D8;
            --secondary: #48CAE4;
            --accent: #90E0EF;
            --success: #06D6A0;
            --warning: #FFD166;
            --danger: #EF476F;
            --purple: #8B5CF6;
            --pink: #EC4899;
            --dark: #1A1A2E;
            --gray: #6B7280;
            --light-gray: #F3F4F6;
            --white: #FFFFFF;
            --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            --gradient-purple: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
        }

        /* Улучшения для мобильных устройств */
        html {
            -webkit-text-size-adjust: 100%;
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--light-gray);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        /* Безопасная область для iPhone с вырезом */
        @supports (padding: max(0px)) {
            body {
                padding-left: max(0px, env(safe-area-inset-left));
                padding-right: max(0px, env(safe-area-inset-right));
            }
        }

        /* Header */
        header {
            background: var(--white);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
        }

        .logo-icon {
            width: 45px;
            height: 45px;
            background: var(--gradient);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.4rem;
        }

        .logo-text {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
        }

        .logo-text span {
            color: var(--primary-light);
        }

        nav ul {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        nav a {
            text-decoration: none;
            color: var(--gray);
            font-weight: 500;
            transition: color 0.3s;
        }

        nav a:hover {
            color: var(--primary);
        }

        /* Main Content */
        main {
            padding-top: 80px;
        }

        /* Hero Section */
        .hero {
            background: var(--gradient);
            padding: 4rem 2rem;
            text-align: center;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 600px;
            height: 600px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }

        .hero::after {
            content: '';
            position: absolute;
            bottom: -30%;
            left: -10%;
            width: 400px;
            height: 400px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 50%;
        }

        .hero-content {
            position: relative;
            z-index: 1;
            max-width: 900px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: 2.8rem;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .hero p {
            font-size: 1.2rem;
            opacity: 0.95;
            margin-bottom: 1.5rem;
        }

        .hero-features {
            display: flex;
            justify-content: center;
            gap: 2rem;
            flex-wrap: wrap;
            margin-top: 1.5rem;
        }

        .hero-feature {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(255, 255, 255, 0.15);
            padding: 0.6rem 1.2rem;
            border-radius: 30px;
            font-size: 0.95rem;
        }

        .hero-feature i {
            font-size: 1.1rem;
        }

        /* Warning Banner */
        .warning-banner {
            background: linear-gradient(135deg, #FFF3CD 0%, #FFE69C 100%);
            border: 2px solid var(--warning);
            border-radius: 16px;
            padding: 1.5rem 2rem;
            margin: -2rem auto 2rem;
            max-width: 950px;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            position: relative;
            z-index: 10;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }

        .warning-banner i {
            font-size: 2rem;
            color: #B8860B;
            flex-shrink: 0;
        }

        .warning-content h3 {
            color: #856404;
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .warning-content p {
            color: #664D03;
            font-size: 0.95rem;
        }

        /* Diagnosis Form Section */
        .diagnosis-section {
            max-width: 950px;
            margin: 0 auto;
            padding: 2rem;
        }

        .form-card {
            background: var(--white);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.08);
        }

        .form-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .form-header h2 {
            font-size: 1.8rem;
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .form-header p {
            color: var(--gray);
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 2rem;
            border-bottom: 2px solid var(--light-gray);
            padding-bottom: 0;
        }

        .tab {
            padding: 1rem 1.5rem;
            background: none;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            color: var(--gray);
            cursor: pointer;
            position: relative;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .tab:hover {
            color: var(--primary);
        }

        .tab.active {
            color: var(--primary);
        }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--gradient);
            border-radius: 3px 3px 0 0;
        }

        .tab .badge {
            background: var(--gradient-purple);
            color: white;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            font-size: 0.7rem;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Form Elements */
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        .form-group label {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .form-group label i {
            color: var(--primary);
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 1rem 1.2rem;
            border: 2px solid #E5E7EB;
            border-radius: 12px;
            font-size: 1rem;
            font-family: inherit;
            transition: all 0.3s;
            background: var(--light-gray);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--white);
            box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 150px;
        }

        /* File Upload Sections */
        .upload-section {
            margin-bottom: 1.5rem;
        }

        .upload-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .upload-section-header h3 {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.1rem;
            color: var(--dark);
        }

        .upload-section-header h3 i {
            color: var(--primary);
            font-size: 1.3rem;
        }

        .upload-info {
            font-size: 0.85rem;
            color: var(--gray);
        }

        .upload-area {
            border: 2px dashed #D1D5DB;
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
        }

        .upload-area:hover {
            border-color: var(--primary-light);
            background: rgba(0, 119, 182, 0.03);
        }

        .upload-area.drag-over {
            border-color: var(--primary);
            background: rgba(0, 119, 182, 0.08);
            transform: scale(1.01);
        }

        .upload-area.has-files {
            border-style: solid;
            border-color: var(--success);
            background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
        }

        .upload-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
        }

        .upload-area.unified .upload-icon {
            color: var(--primary);
        }

        .upload-area.images .upload-icon {
            color: var(--purple);
        }

        .upload-area.documents .upload-icon {
            color: var(--primary);
        }

        .upload-area h4 {
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .upload-area p {
            color: var(--gray);
            font-size: 0.9rem;
        }

        /* Formats container for unified upload */
        .formats-container {
            margin-top: 1.2rem;
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .formats-group {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .formats-label {
            font-size: 0.8rem;
            color: var(--gray);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .formats-label i {
            font-size: 0.9rem;
        }

        .upload-area .formats {
            margin-top: 1rem;
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .formats-group .formats {
            margin-top: 0;
        }

        .format-badge {
            background: var(--light-gray);
            padding: 0.3rem 0.6rem;
            border-radius: 6px;
            font-size: 0.75rem;
            color: var(--gray);
            font-weight: 600;
        }

        .format-badge.image {
            background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
            color: var(--purple);
        }

        .format-badge.doc {
            background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
            color: var(--primary);
        }

        .file-input {
            display: none;
        }

        /* File Preview */
        .file-preview-container {
            margin-top: 1rem;
        }

        .file-preview-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 1rem;
        }

        .file-preview {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            background: var(--light-gray);
            border: 2px solid #E5E7EB;
            transition: all 0.3s;
        }

        .file-preview:hover {
            border-color: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .file-preview-image {
            aspect-ratio: 1;
            width: 100%;
            object-fit: cover;
        }

        .file-preview-doc {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .file-preview-doc i {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }

        .file-preview-doc.pdf i { color: #EF4444; }
        .file-preview-doc.word i { color: #3B82F6; }
        .file-preview-doc.excel i { color: #22C55E; }
        .file-preview-doc.txt i { color: var(--gray); }

        .file-preview-name {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 0.5rem;
            background: rgba(0, 0, 0, 0.75);
            color: white;
            font-size: 0.7rem;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }

        .file-preview-type {
            position: absolute;
            top: 8px;
            left: 8px;
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
        }

        .file-preview-type.xray { background: #FBBF24; color: #78350F; }
        .file-preview-type.ct { background: #60A5FA; color: #1E3A8A; }
        .file-preview-type.mri { background: #A78BFA; color: #4C1D95; }
        .file-preview-type.ultrasound { background: #34D399; color: #064E3B; }
        .file-preview-type.ecg { background: #F87171; color: #7F1D1D; }
        .file-preview-type.photo { background: #FB923C; color: #7C2D12; }
        .file-preview-type.document { background: #94A3B8; color: #1E293B; }

        .file-remove-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 26px;
            height: 26px;
            background: var(--danger);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            transition: transform 0.2s;
            opacity: 0;
        }

        .file-preview:hover .file-remove-btn {
            opacity: 1;
        }

        .file-remove-btn:hover {
            transform: scale(1.1);
        }

        /* Image Type Selector */
        .image-type-selector {
            display: none;
            margin-top: 1rem;
            padding: 1rem;
            background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
            border-radius: 12px;
            border: 1px solid var(--purple);
        }

        .image-type-selector.visible {
            display: block;
        }

        .image-type-selector h4 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #5B21B6;
            margin-bottom: 0.75rem;
            font-size: 0.9rem;
        }

        .image-type-selector p {
            color: #6D28D9;
            font-size: 0.85rem;
            margin-bottom: 1rem;
        }

        .image-types-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 0.5rem;
        }

        .image-type-badge {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: white;
            border-radius: 8px;
            font-size: 0.8rem;
            color: var(--dark);
        }

        .image-type-badge i {
            color: var(--purple);
        }

        /* Symptoms Tags */
        .symptoms-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .symptom-tag {
            background: var(--accent);
            color: var(--primary-dark);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .symptom-tag:hover {
            background: var(--secondary);
        }

        .symptom-tag.selected {
            background: var(--primary);
            color: white;
        }

        .symptom-tag i {
            font-size: 0.8rem;
        }

        /* Submit Button */
        .submit-btn {
            width: 100%;
            padding: 1.2rem;
            background: var(--gradient);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            transition: all 0.3s;
            margin-top: 1.5rem;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 119, 182, 0.3);
        }

        .submit-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .submit-btn .spinner {
            display: none;
            width: 22px;
            height: 22px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .submit-btn.loading .spinner {
            display: block;
        }

        .submit-btn.loading .btn-text {
            display: none;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Multimodal Button */
        .submit-btn.multimodal {
            background: var(--gradient-purple);
        }

        .submit-btn.multimodal:hover {
            box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
        }

        /* Progress Section */
        .progress-section {
            display: none;
            margin-top: 1.5rem;
            padding: 1.5rem;
            background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
            border-radius: 16px;
            border: 2px solid var(--primary-light);
        }

        .progress-section.visible {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        .progress-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .progress-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid var(--primary-light);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .progress-text {
            font-weight: 600;
            color: var(--primary-dark);
        }

        .progress-bar-container {
            background: rgba(255, 255, 255, 0.8);
            border-radius: 10px;
            height: 12px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .progress-bar {
            height: 100%;
            background: var(--gradient);
            border-radius: 10px;
            transition: width 0.3s ease;
            width: 0%;
        }

        .progress-percentage {
            text-align: right;
            font-size: 0.85rem;
            color: var(--primary);
            font-weight: 600;
        }

        .progress-steps {
            margin-top: 1rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .progress-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            background: rgba(255, 255, 255, 0.6);
            color: var(--gray);
        }

        .progress-step.active {
            background: var(--primary);
            color: white;
        }

        .progress-step.completed {
            background: var(--success);
            color: white;
        }

        .progress-step i {
            font-size: 0.7rem;
        }

        /* Results Section */
        .results-section {
            max-width: 950px;
            margin: 2rem auto;
            padding: 0 2rem 2rem;
            display: none;
        }

        .results-section.visible {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        .results-card {
            background: var(--white);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.08);
        }

        .results-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 2px solid var(--light-gray);
            flex-wrap: wrap;
        }

        .results-header-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--success) 0%, #05C793 100%);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
        }

        .results-header-text {
            flex: 1;
        }

        .results-header h2 {
            font-size: 1.6rem;
            color: var(--dark);
        }

        .results-header p {
            color: var(--gray);
            font-size: 0.95rem;
        }

        .results-meta {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .results-meta-badge {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 1rem;
            background: var(--light-gray);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--gray);
        }

        .results-meta-badge i {
            color: var(--primary);
        }

        /* Summary Box */
        .summary-box {
            background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
            border: 2px solid var(--primary-light);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 2rem;
        }

        .summary-box h3 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--primary-dark);
            margin-bottom: 1rem;
        }

        .summary-box h3 i {
            color: var(--primary);
        }

        .summary-text {
            color: var(--dark);
            line-height: 1.8;
        }

        /* Analysis Sections */
        .analysis-section {
            margin-bottom: 1.5rem;
            border-radius: 16px;
            overflow: hidden;
            border: 2px solid #E5E7EB;
        }

        .analysis-section-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.5rem;
            background: var(--light-gray);
            cursor: pointer;
            transition: background 0.3s;
        }

        .analysis-section-header:hover {
            background: #E5E7EB;
        }

        .analysis-section-header i {
            font-size: 1.3rem;
        }

        .analysis-section-header.text i { color: var(--primary); }
        .analysis-section-header.images i { color: var(--purple); }
        .analysis-section-header.documents i { color: var(--success); }

        .analysis-section-header h4 {
            flex: 1;
            font-size: 1rem;
            color: var(--dark);
        }

        .analysis-section-header .toggle-icon {
            color: var(--gray);
            transition: transform 0.3s;
        }

        .analysis-section.expanded .toggle-icon {
            transform: rotate(180deg);
        }

        .analysis-section-content {
            display: none;
            padding: 1.5rem;
        }

        .analysis-section.expanded .analysis-section-content {
            display: block;
        }

        /* Image Analysis Results */
        .image-analysis-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1.5rem;
        }

        .image-analysis-item {
            border: 2px solid #E5E7EB;
            border-radius: 12px;
            overflow: hidden;
        }

        .image-analysis-preview {
            height: 150px;
            overflow: hidden;
            position: relative;
        }

        .image-analysis-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .image-analysis-type {
            position: absolute;
            top: 10px;
            left: 10px;
            padding: 0.3rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .image-analysis-content {
            padding: 1rem;
        }

        .image-analysis-content h5 {
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .image-analysis-content p {
            color: var(--gray);
            font-size: 0.9rem;
            line-height: 1.6;
        }

        /* Diagnosis Item */
        .diagnosis-item {
            background: var(--light-gray);
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            border-left: 4px solid var(--primary);
            transition: all 0.3s;
        }

        .diagnosis-item:hover {
            transform: translateX(5px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
        }

        .diagnosis-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .diagnosis-name {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--dark);
        }

        .diagnosis-description {
            color: var(--gray);
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        /* Symptoms Comparison */
        .symptoms-comparison {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-top: 1rem;
        }

        .symptoms-box {
            padding: 1rem;
            border-radius: 12px;
        }

        .symptoms-box.matching {
            background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
            border: 1px solid var(--success);
        }

        .symptoms-box.not-matching {
            background: linear-gradient(135deg, #FEF2F2 0%, #FECACA 100%);
            border: 1px solid var(--danger);
        }

        .symptoms-box h5 {
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .symptoms-box.matching h5 { color: #059669; }
        .symptoms-box.not-matching h5 { color: #DC2626; }

        .symptoms-box ul {
            list-style: none;
            padding: 0;
        }

        .symptoms-box li {
            font-size: 0.85rem;
            padding: 0.25rem 0;
            padding-left: 1rem;
            position: relative;
        }

        .symptoms-box.matching li { color: #047857; }
        .symptoms-box.not-matching li { color: #B91C1C; }

        .symptoms-box li::before {
            content: '•';
            position: absolute;
            left: 0;
        }

        /* Doctor Recommendation */
        .doctor-recommendation {
            margin: 2rem 0 0;
            background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
            border: 2px solid var(--primary);
            border-radius: 16px;
            padding: 1.5rem;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
        }

        .doctor-recommendation i {
            font-size: 2rem;
            color: var(--primary);
        }

        .doctor-recommendation h3 {
            color: var(--primary-dark);
            margin-bottom: 0.5rem;
        }

        .doctor-recommendation p {
            color: var(--primary-dark);
            font-size: 0.95rem;
        }

        /* Follow-up Questions Section */
        .followup-section {
            margin: 2rem 0;
            background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
            border: 2px solid var(--warning);
            border-radius: 16px;
            padding: 1.5rem;
        }

        .followup-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .followup-header i {
            font-size: 1.5rem;
            color: #B45309;
        }

        .followup-header h3 {
            color: #92400E;
            margin: 0;
            font-size: 1.25rem;
        }

        .followup-description {
            color: #92400E;
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        .followup-questions {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
        }

        .followup-question-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.75rem 0;
            border-bottom: 1px solid #F3F4F6;
        }

        .followup-question-item:last-child {
            border-bottom: none;
        }

        .followup-question-number {
            background: var(--warning);
            color: #92400E;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 600;
            flex-shrink: 0;
        }

        .followup-question-text {
            color: var(--dark);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        .followup-answers textarea {
            width: 100%;
            padding: 1rem;
            border: 2px solid #FCD34D;
            border-radius: 12px;
            font-family: inherit;
            font-size: 0.95rem;
            resize: vertical;
            transition: border-color 0.3s;
        }

        .followup-answers textarea:focus {
            outline: none;
            border-color: #F59E0B;
        }

        .followup-submit-btn {
            width: 100%;
            margin-top: 1rem;
            padding: 1rem 2rem;
            background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .followup-submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
        }

        .followup-submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Not Matching Button */
        .not-matching-section {
            margin-top: 1.5rem;
            text-align: center;
        }

        .not-matching-btn {
            background: transparent;
            border: 2px dashed var(--gray);
            color: var(--gray);
            padding: 1rem 2rem;
            border-radius: 12px;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .not-matching-btn:hover {
            border-color: var(--warning);
            color: #B45309;
            background: #FEF3C7;
        }

        .not-matching-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .not-matching-btn.loading::after {
            content: '';
            width: 16px;
            height: 16px;
            border: 2px solid transparent;
            border-top-color: currentColor;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-left: 0.5rem;
        }

        /* Disease Info Modal */
        .disease-info-modal {
            background: var(--white);
            border-radius: 20px;
            max-width: 800px;
            width: 95%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
            animation: modalIn 0.3s ease-out;
        }

        .disease-info-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem 2rem;
            border-bottom: 1px solid var(--light-gray);
            background: var(--gradient);
            border-radius: 20px 20px 0 0;
        }

        .disease-info-header h3 {
            color: white;
            margin: 0;
            font-size: 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .modal-close-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
        }

        .modal-close-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .disease-info-tabs {
            display: flex;
            gap: 0.5rem;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--light-gray);
            overflow-x: auto;
            flex-wrap: wrap;
        }

        .disease-tab {
            padding: 0.75rem 1.25rem;
            border: 2px solid var(--light-gray);
            background: white;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--gray);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .disease-tab:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .disease-tab.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .disease-tab.loading {
            opacity: 0.7;
            pointer-events: none;
        }

        .disease-info-content {
            padding: 1.5rem 2rem;
            overflow-y: auto;
            flex: 1;
            min-height: 300px;
        }

        .disease-info-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            color: var(--gray);
            gap: 1rem;
        }

        .disease-info-loading i {
            font-size: 2rem;
            color: var(--primary);
        }

        .disease-info-html {
            line-height: 1.7;
            color: var(--dark);
        }

        .disease-info-html h1,
        .disease-info-html h2,
        .disease-info-html h3,
        .disease-info-html h4 {
            color: var(--primary-dark);
            margin: 1.5rem 0 1rem;
        }

        .disease-info-html h1:first-child,
        .disease-info-html h2:first-child,
        .disease-info-html h3:first-child {
            margin-top: 0;
        }

        .disease-info-html ul,
        .disease-info-html ol {
            margin: 1rem 0;
            padding-left: 1.5rem;
        }

        .disease-info-html li {
            margin: 0.5rem 0;
        }

        .disease-info-html p {
            margin: 1rem 0;
        }

        .disease-info-html strong {
            color: var(--primary-dark);
        }

        /* Disease Info Button in Diagnosis Item */
        .diagnosis-info-btn {
            background: transparent;
            border: 1px solid var(--primary);
            color: var(--primary);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.85rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s;
            margin-top: 0.75rem;
        }

        .diagnosis-info-btn:hover {
            background: var(--primary);
            color: white;
        }

        /* Differential Symptoms List */
        .differential-symptoms {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .differential-symptom-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            background: var(--light-gray);
            border-radius: 8px;
        }

        .differential-symptom-item.checked {
            background: #D1FAE5;
        }

        .differential-symptom-item i {
            color: var(--gray);
        }

        .differential-symptom-item.checked i {
            color: var(--success);
        }

        /* Wizard Tab Styles */
        .wizard-steps-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem 1rem;
            margin-bottom: 1.5rem;
        }

        .wizard-step-dot {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
        }

        .wizard-step-dot .step-number {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--light-gray);
            border: 3px solid var(--gray);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            color: var(--gray);
            transition: all 0.3s;
        }

        .wizard-step-dot.active .step-number {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
            box-shadow: 0 4px 15px rgba(0, 119, 182, 0.4);
        }

        .wizard-step-dot.completed .step-number {
            background: var(--success);
            border-color: var(--success);
            color: white;
        }

        .wizard-step-dot .step-label {
            font-size: 0.85rem;
            color: var(--gray);
            font-weight: 500;
        }

        .wizard-step-dot.active .step-label,
        .wizard-step-dot.completed .step-label {
            color: var(--dark);
        }

        .wizard-step-line {
            width: 80px;
            height: 3px;
            background: var(--light-gray);
            margin: 0 0.5rem;
            margin-bottom: 1.5rem;
            border-radius: 2px;
            transition: background 0.3s;
        }

        .wizard-step-line.active {
            background: var(--primary);
        }

        .wizard-step-content {
            animation: fadeIn 0.3s ease;
        }

        .wizard-step-content.hidden {
            display: none;
        }

        .wizard-step-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .wizard-step-header i {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 1rem;
        }

        .wizard-step-header h3 {
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .wizard-step-header p {
            color: var(--gray);
            font-size: 0.95rem;
        }

        .wizard-next-btn,
        .wizard-back-btn {
            padding: 1rem 2rem;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.3s;
            border: none;
        }

        .wizard-next-btn {
            background: var(--gradient);
            color: white;
            width: 100%;
            margin-top: 1.5rem;
        }

        .wizard-next-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 119, 182, 0.4);
        }

        .wizard-next-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .wizard-next-btn.loading .btn-text {
            display: none;
        }

        .wizard-next-btn.loading .spinner {
            display: block;
        }

        .wizard-back-btn {
            background: var(--light-gray);
            color: var(--gray);
            border: 2px solid var(--light-gray);
        }

        .wizard-back-btn:hover {
            border-color: var(--gray);
            color: var(--dark);
        }

        .wizard-buttons {
            display: flex;
            gap: 1rem;
            margin-top: 1.5rem;
        }

        .wizard-buttons .wizard-next-btn {
            flex: 2;
            margin-top: 0;
        }

        .wizard-buttons .wizard-back-btn {
            flex: 1;
        }

        /* Wizard Questions Container */
        .wizard-questions-container {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .wizard-question-item {
            background: var(--light-gray);
            border-radius: 12px;
            padding: 1.25rem;
        }

        .wizard-question-item label {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            font-weight: 500;
            color: var(--dark);
            margin-bottom: 0.75rem;
        }

        .wizard-question-item label .question-number {
            background: var(--primary);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            flex-shrink: 0;
        }

        .wizard-question-item input,
        .wizard-question-item textarea {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid #E5E7EB;
            border-radius: 8px;
            font-family: inherit;
            font-size: 0.95rem;
            transition: border-color 0.3s;
        }

        .wizard-question-item input:focus,
        .wizard-question-item textarea:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* Enhanced Description Box */
        .enhanced-description-box {
            background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
            border: 2px solid var(--success);
            border-radius: 12px;
            padding: 1.5rem;
        }

        .enhanced-description-box h4 {
            color: #065F46;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .enhanced-description-box p {
            color: #047857;
            line-height: 1.7;
            white-space: pre-wrap;
        }

        /* Messages */
        .message-box {
            border-radius: 12px;
            padding: 1.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            display: none;
        }

        .message-box.visible {
            display: flex;
        }

        .message-box.error {
            background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
            border: 2px solid var(--danger);
        }

        .message-box.error i { color: var(--danger); font-size: 1.5rem; }
        .message-box.error p { color: #991B1B; }

        .message-box.success {
            background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
            border: 2px solid var(--success);
        }

        .message-box.success i { color: var(--success); font-size: 1.5rem; }
        .message-box.success p { color: #065F46; }

        /* CTA Section */
        .cta-section {
            background: var(--gradient);
            padding: 4rem 2rem;
            text-align: center;
            color: white;
            margin-top: 3rem;
        }

        .cta-content {
            max-width: 600px;
            margin: 0 auto;
        }

        .cta-content h2 {
            font-size: 2rem;
            margin-bottom: 1rem;
        }

        .cta-content p {
            opacity: 0.95;
            margin-bottom: 2rem;
        }

        .cta-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .cta-btn {
            padding: 1rem 2rem;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .cta-btn.primary {
            background: white;
            color: var(--primary);
        }

        .cta-btn.primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .cta-btn.secondary {
            background: transparent;
            color: white;
            border: 2px solid white;
        }

        .cta-btn.secondary:hover {
            background: white;
            color: var(--primary);
        }

        /* Footer */
        footer {
            background: var(--dark);
            color: white;
            padding: 3rem 2rem 1.5rem;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 3rem;
        }

        .footer-brand p {
            color: rgba(255, 255, 255, 0.7);
            margin-top: 1rem;
            font-size: 0.95rem;
        }

        .footer-section h4 {
            font-size: 1.1rem;
            margin-bottom: 1rem;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section li {
            margin-bottom: 0.5rem;
        }

        .footer-section a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-section a:hover {
            color: var(--secondary);
        }

        .footer-bottom {
            max-width: 1200px;
            margin: 2rem auto 0;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9rem;
        }

        .social-links {
            display: flex;
            gap: 1rem;
        }

        .social-links a {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            transition: all 0.3s;
        }

        .social-links a:hover {
            background: var(--primary);
            transform: translateY(-3px);
        }

        /* Modal */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.visible {
            display: flex;
        }

        .modal {
            background: white;
            border-radius: 20px;
            padding: 2rem;
            max-width: 500px;
            width: 90%;
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        .modal h3 {
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .modal h3 i {
            color: var(--primary);
        }

        .modal p {
            color: var(--gray);
            margin-bottom: 1.5rem;
        }

        .modal-buttons {
            display: flex;
            gap: 1rem;
            justify-content: flex-end;
        }

        .modal-btn {
            padding: 0.75rem 1.5rem;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .modal-btn.cancel {
            background: var(--light-gray);
            border: none;
            color: var(--gray);
        }

        .modal-btn.confirm {
            background: var(--gradient);
            border: none;
            color: white;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .header-container {
                flex-direction: column;
                gap: 1rem;
            }

            nav ul {
                gap: 1rem;
                font-size: 0.9rem;
            }

            .hero h1 {
                font-size: 1.8rem;
            }

            .hero-features {
                flex-direction: column;
                align-items: center;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .tabs {
                flex-wrap: wrap;
            }

            .tab {
                padding: 0.75rem 1rem;
                font-size: 0.9rem;
            }

            .symptoms-comparison {
                grid-template-columns: 1fr;
            }

            .warning-banner {
                flex-direction: column;
                text-align: center;
                margin: -2rem 1rem 2rem;
            }

            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .footer-bottom {
                flex-direction: column;
                gap: 1rem;
                text-align: center;
            }

            .cta-buttons {
                flex-direction: column;
            }

            .results-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .image-analysis-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile Small (до 480px) */
        @media (max-width: 480px) {
            body {
                font-size: 14px;
            }

            .hero {
                padding: 4rem 0 2rem;
            }

            .hero h1 {
                font-size: 1.5rem;
                line-height: 1.3;
            }

            .hero p {
                font-size: 0.95rem;
            }

            .hero-tags {
                gap: 0.3rem;
            }

            .hero-tag {
                padding: 0.3rem 0.6rem;
                font-size: 0.75rem;
            }

            .main-content {
                padding: 1rem;
            }

            .diagnosis-form {
                padding: 1rem;
            }

            .tab {
                padding: 0.6rem 0.8rem;
                font-size: 0.8rem;
                flex: 1 1 45%;
            }

            .tabs {
                gap: 0.5rem;
            }

            .symptom-tag {
                padding: 0.4rem 0.8rem;
                font-size: 0.8rem;
            }

            textarea {
                min-height: 120px;
                font-size: 14px;
            }

            .submit-btn {
                padding: 0.9rem 1.5rem;
                font-size: 1rem;
            }

            .file-upload-area {
                padding: 1.5rem 1rem;
            }

            .file-preview-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.5rem;
            }

            .file-preview {
                height: 70px;
            }

            .diagnosis-card {
                padding: 1rem;
            }

            .diagnosis-card h3 {
                font-size: 1rem;
            }

            .diagnosis-card p {
                font-size: 0.85rem;
            }

            .symptoms-list {
                gap: 0.3rem;
            }

            .symptom-badge {
                padding: 0.2rem 0.5rem;
                font-size: 0.7rem;
            }

            .cta-section {
                padding: 2rem 1rem;
            }

            .cta-content h2 {
                font-size: 1.3rem;
            }

            .cta-btn {
                padding: 0.8rem 1.2rem;
                font-size: 0.9rem;
                width: 100%;
                justify-content: center;
            }

            .logo-text {
                font-size: 1.1rem;
            }

            nav ul {
                gap: 0.5rem;
            }

            nav ul li a {
                font-size: 0.8rem;
                padding: 0.4rem 0.6rem;
            }

            .warning-banner {
                padding: 1rem;
                margin: -1.5rem 0.5rem 1.5rem;
                font-size: 0.85rem;
            }

            .warning-banner i {
                font-size: 1.5rem;
            }

            .footer-section h4 {
                font-size: 1rem;
            }

            .footer-section ul li,
            .footer-section p {
                font-size: 0.85rem;
            }

            /* Wizard на мобильных */
            .step-indicators {
                gap: 0.3rem;
            }

            .step-indicator {
                width: 30px;
                height: 30px;
                font-size: 0.8rem;
            }

            .step-line {
                width: 20px;
            }

            .wizard-step h3 {
                font-size: 1.1rem;
            }

            /* Результаты */
            .results-summary {
                padding: 1rem;
            }

            .results-actions {
                flex-direction: column;
                gap: 0.5rem;
            }

            .results-actions button {
                width: 100%;
            }

            /* Модальные окна */
            .modal-content {
                margin: 10% auto;
                padding: 1.5rem;
                width: 95%;
            }

            .modal-content h2 {
                font-size: 1.2rem;
            }

            /* Улучшение тач-интерфейса */
            button, .tab, .symptom-tag, .cta-btn, a {
                -webkit-tap-highlight-color: transparent;
            }

            /* Убираем hover эффекты на тач-устройствах */
            @media (hover: none) {
                .tab:hover,
                .symptom-tag:hover,
                .diagnosis-card:hover {
                    transform: none;
                }
            }
        }

        /* Landscape mode для мобильных */
        @media (max-height: 500px) and (orientation: landscape) {
            .hero {
                padding: 2rem 0 1rem;
            }

            .hero h1 {
                font-size: 1.4rem;
            }

            .warning-banner {
                margin: -1rem 1rem 1rem;
                padding: 0.8rem;
            }
        }

        /* Планшеты (768px - 1024px) */
        @media (min-width: 769px) and (max-width: 1024px) {
            .form-grid {
                grid-template-columns: 1fr 1fr;
            }

            .file-preview-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .diagnosis-card {
                padding: 1.25rem;
            }
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 10px;
        }

        ::-webkit-scrollbar-track {
            background: var(--light-gray);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

/* ================================
   Disclaimer Checkbox
   ================================ */
.disclaimer-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.disclaimer-checkbox-wrapper:hover {
    background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.disclaimer-checkbox-wrapper input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.disclaimer-checkbox-wrapper label {
    font-size: 0.95rem;
    color: #92400E;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.disclaimer-checkbox-wrapper label a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.disclaimer-checkbox-wrapper label a:hover {
    color: var(--primary-dark);
}

.submit-btn.disabled-until-agree:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.submit-btn.disabled-until-agree:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ================================
   Disclaimer Modal
   ================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.disclaimer-modal {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .disclaimer-modal {
    transform: scale(1) translateY(0);
}

.disclaimer-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.disclaimer-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
}

.disclaimer-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.disclaimer-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.disclaimer-content {
    padding: 2rem;
    max-height: 50vh;
    overflow-y: auto;
}

.disclaimer-content h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1rem;
}

.disclaimer-content h4:first-child {
    margin-top: 0;
}

.disclaimer-content p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.disclaimer-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    color: var(--gray);
}

.disclaimer-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.disclaimer-warning {
    background: #FEF3C7;
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.disclaimer-warning i {
    color: #D97706;
    font-size: 1.2rem;
    margin-top: 2px;
}

.disclaimer-warning p {
    color: #92400E;
    margin: 0;
    font-weight: 500;
}

.disclaimer-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.disclaimer-accept-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.disclaimer-accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 119, 182, 0.3);
}

/* ================================
   PDF Download Button
   ================================ */
.pdf-download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.pdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.pdf-download-btn:active {
    transform: translateY(0);
}

.pdf-download-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pdf-download-btn i {
    font-size: 1.1rem;
}

/* ================================
   Lab Analysis Tab Styles
   ================================ */

/* Lab Warning Banner */
.lab-warning-banner {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.lab-warning-banner i {
    font-size: 1.5rem;
    color: #D97706;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.lab-warning-content p {
    color: #92400E;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Lab Upload Area */
.upload-area.lab-upload {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
}

.upload-area.lab-upload:hover {
    border-color: #7C3AED;
    background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
}

.upload-area.lab-upload .upload-icon {
    color: #8B5CF6;
}

.upload-area.lab-upload.has-files {
    border-color: var(--success);
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

/* Lab Text Hint */
.lab-text-hint {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lab-text-hint i {
    color: var(--primary);
}

/* Lab Types Info */
.lab-types-info {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.lab-types-info h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lab-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lab-type-badge {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #E0F2FE;
}

.lab-type-badge i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Lab Submit Button */
.submit-btn.lab-submit {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.submit-btn.lab-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* ================================
   Lab Results Section Styles
   ================================ */
.results-section.lab-results {
    display: none;
}

.results-section.lab-results.visible {
    display: block;
}

.results-header.lab-header {
    border-bottom-color: #8B5CF6;
}

.results-header-icon.lab-icon {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

/* Lab Results Warning */
.lab-results-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.lab-results-warning > i {
    font-size: 1.8rem;
    color: #D97706;
    flex-shrink: 0;
}

.lab-results-warning strong {
    color: #92400E;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.lab-results-warning p {
    color: #92400E;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Lab Sections */
.lab-section {
    background: var(--white);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
}

.lab-section-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.lab-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    flex-grow: 1;
}

.lab-section-header.abnormal {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #DC2626;
    border-bottom: 2px solid #FCA5A5;
}

.lab-section-header.abnormal i {
    font-size: 1.3rem;
}

.lab-section-header.normal {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #059669;
    cursor: pointer;
    transition: all 0.3s;
}

.lab-section-header.normal:hover {
    background: linear-gradient(135deg, #A7F3D0 0%, #6EE7B7 100%);
}

.lab-section-header.diagnoses {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #D97706;
    border-bottom: 2px solid #FCD34D;
}

.lab-section-header.recommendations {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #2563EB;
    border-bottom: 2px solid #93C5FD;
}

.lab-section-header.full-analysis {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    color: #4F46E5;
    cursor: pointer;
    transition: all 0.3s;
}

.lab-section-header.full-analysis:hover {
    background: linear-gradient(135deg, #C7D2FE 0%, #A5B4FC 100%);
}

.lab-section-header .toggle-icon {
    transition: transform 0.3s;
}

.lab-section.collapsed .lab-section-header .toggle-icon {
    transform: rotate(-90deg);
}

.lab-section.collapsed .lab-parameters-grid,
.lab-section.collapsed .lab-full-analysis-content {
    display: none;
}

/* Lab Parameters Grid */
.lab-parameters-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Lab Parameter Card */
.lab-param-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 2px solid #E5E7EB;
    transition: all 0.3s;
}

.lab-param-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.lab-param-card.high {
    border-color: #F87171;
    background: linear-gradient(135deg, #FFF5F5 0%, #FEE2E2 100%);
}

.lab-param-card.low {
    border-color: #60A5FA;
    background: linear-gradient(135deg, #F0F9FF 0%, #DBEAFE 100%);
}

.lab-param-card.normal {
    border-color: #6EE7B7;
    background: linear-gradient(135deg, #F0FDF4 0%, #D1FAE5 100%);
}

.lab-param-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.lab-param-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.lab-param-status {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.lab-param-status.high {
    background: #FEE2E2;
    color: #DC2626;
}

.lab-param-status.low {
    background: #DBEAFE;
    color: #2563EB;
}

.lab-param-status.normal {
    background: #D1FAE5;
    color: #059669;
}

.lab-param-values {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.lab-param-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.lab-param-card.high .lab-param-value {
    color: #DC2626;
}

.lab-param-card.low .lab-param-value {
    color: #2563EB;
}

.lab-param-card.normal .lab-param-value {
    color: #059669;
}

.lab-param-unit {
    color: var(--gray);
    font-size: 0.85rem;
}

.lab-param-range {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.lab-param-interpretation {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--dark);
    line-height: 1.4;
}

/* Lab Possible Diagnoses */
#labPossibleDiagnoses {
    padding: 1.5rem;
}

.lab-diagnosis-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
}

.lab-diagnosis-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.lab-diagnosis-item:last-child {
    margin-bottom: 0;
}

.lab-diagnosis-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.lab-diagnosis-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D97706;
    font-size: 1rem;
}

.lab-diagnosis-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.05rem;
}

.lab-diagnosis-description {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-left: 2.85rem;
}

/* Lab Recommendations */
#labRecommendations {
    padding: 1.5rem;
}

.lab-recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid #E5E7EB;
}

.lab-recommendation-item:last-child {
    margin-bottom: 0;
}

.lab-recommendation-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563EB;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.lab-recommendation-text {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Lab Full Analysis */
.lab-full-analysis-content {
    padding: 1.5rem;
}

.lab-full-analysis-text {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--dark);
    white-space: pre-wrap;
}

/* Lab Doctor Recommendation */
.doctor-recommendation.lab-doctor {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-color: #F59E0B;
}

.doctor-recommendation.lab-doctor i {
    color: #D97706;
}

.doctor-recommendation.lab-doctor h3 {
    color: #92400E;
}

.doctor-recommendation.lab-doctor p {
    color: #92400E;
}

/* Mobile Responsive for Lab Analysis */
@media (max-width: 768px) {
    .lab-parameters-grid {
        grid-template-columns: 1fr;
    }
    
    .lab-types-grid {
        gap: 0.5rem;
    }
    
    .lab-type-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .lab-param-value {
        font-size: 1.25rem;
    }
    
    .lab-warning-banner {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .lab-results-warning {
        flex-direction: column;
        gap: 0.75rem;
    }
}
