        /* Reset and base styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            background: #eaf0f5;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.8rem;
            line-height: 1.5;
            color: #113946;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Main container */
        .ai-doctor-panel {
            max-width: 1000px;
            width: 100%;
            background: #ffffff;
            border-radius: 1.5rem;
            box-shadow: 0 20px 40px -12px rgba(21, 65, 82, 0.25), 0 8px 24px -8px rgba(42, 111, 140, 0.15);
            overflow: hidden;
            margin: 0 auto;
        }

        /* Responsive header */
        .panel-header {
            padding: 1.2rem 1.5rem;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(42, 111, 140, 0.12);
            gap: 1rem;
        }

        .brand-group {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            flex-wrap: wrap;
        }

        .medical-emblem {
            background: #EEF4F6;
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .medical-emblem svg {
            width: 40px;
            height: 40px;
            stroke: C7D9E1;
            stroke-width: 4;
            fill: none;
        }

        .title-section h1 {
            font-size: 1.6rem;
            font-weight: 600;
            letter-spacing: -0.02em;
            background: linear-gradient(150deg, #1a4f63, #1a3f4f);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }

        .title-section .badge {
            font-size: 0.7rem;
            font-weight: 500;
            background: rgba(42, 111, 140, 0.08);
            color: #266482;
            padding: 0.2rem 0.8rem;
            border-radius: 30px;
            display: inline-block;
            margin-top: 0.1rem;
            border: 1px solid rgba(42, 111, 140, 0.2);
        }

        .status-pulse {
            background: #ffffffd9;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 40px;
            padding: 0.4rem 1.2rem;
            border: 1px solid rgba(42, 111, 140, 0.3);
            font-size: 0.85rem;
            font-weight: 500;
            color: #14566e;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
            flex-shrink: 0;
        }

        .live-indicator {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .live-indicator::before {
            content: '';
            width: 8px;
            height: 8px;
            background: #2f9e8a;
            border-radius: 50%;
            box-shadow: 0 0 0 2px rgba(47, 158, 138, 0.25);
            animation: softPulse 2s infinite;
        }

        @keyframes softPulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        /* STEP INDICATOR - Responsive */
        .step-indicator {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.2rem 1.5rem 0;
            font-weight: 500;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex: 1 1 auto;
            min-width: 100px;
        }

        .step-marker {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #e1f0f7;
            color: #1b5e7a;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9rem;
            border: 1px solid rgba(42, 111, 140, 0.2);
            flex-shrink: 0;
        }

        .step.active .step-marker {
            background: #1b5e7a;
            color: white;
            border-color: #1b5e7a;
            box-shadow: 0 4px 10px rgba(27, 94, 122, 0.3);
        }

        .step-label {
            font-size: 0.9rem;
            color: #2b5f78;
            white-space: nowrap;
        }

        .step-connector {
            width: 30px;
            height: 2px;
            background: #c7dde8;
            border-radius: 2px;
            flex-shrink: 0;
        }

        /* CARD CONTENT - Responsive */
        .question-deck {
            padding: 1.2rem 1.5rem;
        }

        /* Common card styles */
        .info-card,
        .symptom-card,
        .question-card {
            background: #f2f8fc;
            border-radius: 1.5rem;
            padding: 1.5rem;
            border: 1px solid rgba(42, 111, 140, 0.15);
            box-shadow: 0 10px 20px -12px rgba(27, 94, 122, 0.2);
        }

        /* Form elements - Responsive */
        .form-row {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1.2rem;
        }

        .field {
            flex: 1 1 250px;
            min-width: 200px;
        }

        .field label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: #1b5e7a;
            margin-bottom: 0.3rem;
            letter-spacing: 0.3px;
        }

        .field input,
        .field textarea,
        .question-input {
            width: 100%;
            padding: 0.8rem 1.2rem;
            background: white;
            border: 1px solid #c7dde8;
            border-radius: 40px;
            font-size: 1rem;
            color: #113946;
            outline: none;
            transition: 0.15s;
            font-family: inherit;
            -webkit-appearance: none;
            appearance: none;
        }

        .field textarea {
            border-radius: 24px;
            resize: vertical;
            min-height: 80px;
            padding: 1rem 1.2rem;
        }

        .field input:focus,
        .field textarea:focus,
        .question-input:focus {
            border-color: #2a8c9c;
            box-shadow: 0 0 0 3px rgba(42, 140, 156, 0.1);
        }

        /* ===== IMPROVED RADIO BUTTON STYLES ===== */
        .gender-group {
            display: flex;
            gap: 2rem;
            padding: 0.5rem 1.2rem;
            background: white;
            border-radius: 40px;
            border: 1px solid #c7dde8;
            align-items: center;
            flex-wrap: wrap;
        }

        .gender-option {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            position: relative;
            padding: 0.25rem 0;
        }

        /* Hide the default radio button */
        .gender-option input[type="radio"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
            margin: 0;
            padding: 0;
            pointer-events: none;
        }

        /* Custom radio button - perfect circle */
        .gender-option .radio-custom {
            display: inline-block;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid #1b5e7a;
            background: white;
            position: relative;
            transition: all 0.2s ease;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        /* Inner dot when selected */
        .gender-option input[type="radio"]:checked + .radio-custom::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #1b5e7a;
            transition: all 0.2s ease;
        }

        /* Hover effect */
        .gender-option:hover .radio-custom {
            border-color: #2a8c9c;
            box-shadow: 0 0 0 2px rgba(42, 140, 156, 0.2);
        }

        /* Focus state for accessibility */
        .gender-option input[type="radio"]:focus + .radio-custom {
            box-shadow: 0 0 0 3px rgba(27, 94, 122, 0.3);
        }

        /* Label text */
        .gender-option span {
            font-size: 1rem;
            color: #113946;
            line-height: 1;
            display: inline-block;
            vertical-align: middle;
        }

        /* Question card radio buttons */
        .question-options {
            display: flex;
            gap: 2rem;
            margin: 0.5rem 0;
            flex-wrap: wrap;
        }

        .boolean-option {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            position: relative;
            padding: 0.25rem 0;
        }

        .boolean-option input[type="radio"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
            margin: 0;
            padding: 0;
            pointer-events: none;
        }

        .boolean-option .radio-custom {
            display: inline-block;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid #1b5e7a;
            background: white;
            position: relative;
            transition: all 0.2s ease;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        .boolean-option input[type="radio"]:checked + .radio-custom::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #1b5e7a;
            transition: all 0.2s ease;
        }

        .boolean-option:hover .radio-custom {
            border-color: #2a8c9c;
            box-shadow: 0 0 0 2px rgba(42, 140, 156, 0.2);
        }

        .boolean-option span {
            font-size: 1rem;
            color: #113946;
            line-height: 1;
        }

        /* Patient summary - Responsive */
        .patient-summary {
            background: white;
            border-radius: 20px;
            padding: 1rem 1.2rem;
            margin-bottom: 1.5rem;
            border: 1px solid rgba(42, 111, 140, 0.2);
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            align-items: center;
        }

        .patient-summary-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            flex-wrap: wrap;
        }

        .patient-summary-item .label {
            font-weight: 600;
            color: #1b5e7a;
        }

        .patient-summary-item .value {
            color: #113946;
            background: #f2f8fc;
            padding: 0.2rem 1rem;
            border-radius: 30px;
            border: 1px solid rgba(42, 111, 140, 0.15);
        }

        /* Buttons - Responsive */
        .button-group {
            display: flex;
            gap: 0.8rem;
            justify-content: flex-end;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }

        .action-btn,
        .next-btn,
        .secondary-btn {
            border: none;
            border-radius: 60px;
            padding: 0.8rem 1.8rem;
            font-size: 1rem;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 48px;
            justify-content: center;
        }

        .action-btn,
        .next-btn {
            background: #25738b;
            color: white;
            box-shadow: 0 8px 16px -10px #165f77;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .action-btn:hover:not(:disabled),
        .next-btn:hover:not(:disabled) {
            background: #1f5e73;
            transform: translateY(-2px);
        }

        .action-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        .secondary-btn {
            background: white;
            border: 1px solid #25738b;
            color: #25738b;
        }

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

        /* Loading animations */
        .loading-container {
            text-align: center;
            padding: 2rem 1rem;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            margin: 0 auto 1.5rem;
            border: 4px solid rgba(27, 94, 122, 0.2);
            border-top: 4px solid #1b5e7a;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loading-message {
            font-size: 1.2rem;
            color: #1b5e7a;
            margin: 1rem 0;
            min-height: 3rem;
        }

        .progress-bar {
            width: 100%;
            height: 6px;
            background: #e1f0f7;
            border-radius: 10px;
            margin: 1.5rem 0;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #1b5e7a, #2f9e8a);
            width: 0%;
            transition: width 0.3s;
        }

        /* Question card specific */
        .question-counter {
            font-size: 0.85rem;
            color: #1b5e7a;
            margin-bottom: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .question-main {
            font-size: 1.5rem;
            font-weight: 440;
            line-height: 1.4;
            color: #0d3846;
            margin-bottom: 1.2rem;
        }

        .question-main strong {
            font-weight: 600;
            color: #115f78;
        }

        .question-help {
            font-size: 0.9rem;
            color: #2a6f8c;
            margin-bottom: 0.8rem;
            font-style: italic;
        }

        #question-input-container {
            margin: 1rem 0;
        }

        .question-input {
            width: 100%;
            padding: 0.9rem 1.2rem;
            background: white;
            border: 1px solid #c7dde8;
            border-radius: 40px;
            font-size: 1rem;
            outline: none;
        }

        .question-input:focus {
            border-color: #2a8c9c;
            box-shadow: 0 0 0 3px rgba(42, 140, 156, 0.1);
        }

        /* Prescription View Styles - Fully Responsive */
        .prescription-view {
            --brand-primary: #10b981;
            --brand-dark: #064e3b;
            --text-main: #1e293b;
            --text-muted: #64748b;
            --border-color: #f1f5f9;
            --accent-soft: #ecfdf5;
            font-family: 'Plus Jakarta Sans', 'Noto Sans Bengali', sans-serif;
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .prescription-view .rx-container {
            min-width: 320px;
            width: 100%;
            background: white;
            border-radius: 20px;
            border: 1px solid var(--border-color);
            overflow: hidden;
        }

        .prescription-view .rx-header {
            padding: 1.5rem;
            background: white;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
        }

        .prescription-view .logo-area {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .prescription-view .brand-icon {
            width: 48px;
            height: 48px;
            background: transparent;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .prescription-view .brand-icon svg {
            width: 30px;
            height: 30px;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
        }

        .prescription-view .brand-text h1 {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.6rem;
            color: var(--brand-dark);
            line-height: 1.2;
        }

        .prescription-view .brand-text p {
            font-size: 0.7rem;
            color: var(--text-muted);
        }

        .prescription-view .rx-badge {
            background: var(--accent-soft);
            border-radius: 100px;
            padding: 0.5rem 1.2rem;
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .prescription-view .badge-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .prescription-view .badge-value {
            font-weight: 700;
            color: var(--brand-dark);
            font-size: 0.9rem;
        }

        .prescription-view .patient-bar {
            background: var(--accent-soft);
            padding: 1.2rem 1.5rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .prescription-view .stat-item span {
            display: block;
            font-size: 0.7rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .prescription-view .stat-item strong {
            font-size: 0.9rem;
            color: var(--brand-dark);
            word-break: break-word;
        }

        .prescription-view .rx-body {
            display: grid;
            grid-template-columns: 280px 1fr;
            gap: 0;
        }

        .prescription-view .rx-sidebar {
            padding: 1.5rem;
            border-right: 1px solid var(--border-color);
            background: #fafbfc;
        }

        .prescription-view .section-title {
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 1rem;
        }

        .prescription-view .diagnosis-card {
            background: white;
            padding: 1.2rem;
            border-radius: 14px;
            border: 1px solid var(--border-color);
            margin-bottom: 1.5rem;
        }

        .prescription-view .diagnosis-card h4 {
            font-size: 1rem;
            color: var(--brand-dark);
            margin-bottom: 0.5rem;
            word-break: break-word;
        }

        .prescription-view .icd-code {
            font-size: 0.7rem;
            background: #f1f5f9;
            padding: 2px 6px;
            border-radius: 4px;
            color: var(--text-muted);
        }

        .prescription-view .rx-main {
            padding: 1.5rem;
            overflow-x: auto;
        }

        .prescription-view .rx-symbol {
            font-size: 3rem;
            color: var(--brand-primary);
            font-family: 'Cormorant Garamond', 'Times New Roman', serif;
            margin-bottom: 1rem;
            opacity: 0.6;
        }

        .prescription-view .medication-card {
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 14px;
            padding: 1.2rem;
            margin-bottom: 1rem;
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            justify-content: space-between;
            align-items: flex-start;
        }

        .prescription-view .med-info {
            flex: 1 1 250px;
        }

        .prescription-view .med-info h4 {
            font-size: 1rem;
            margin-bottom: 0.3rem;
            word-break: break-word;
        }

        .prescription-view .med-sub {
            font-size: 0.8rem;
            color: var(--text-muted);
            word-break: break-word;
        }

        .prescription-view .med-note {
            font-size: 0.8rem;
            color: #e67e22;
            margin: 0.5rem 0;
            word-break: break-word;
        }

        .prescription-view .med-instruction {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
            font-style: italic;
            word-break: break-word;
        }

        .prescription-view .dosage-badge {
            text-align: right;
            min-width: 120px;
            flex-shrink: 0;
        }

        .prescription-view .schedule {
            color: var(--brand-primary);
            font-weight: 700;
            font-size: 0.85rem;
            background: var(--accent-soft);
            padding: 0.4rem 1rem;
            border-radius: 8px;
            display: inline-block;
        }

        .prescription-view .rx-footer {
            padding: 1.5rem;
            background: #f8fafc;
            border-top: 1px solid var(--border-color);
        }

        .prescription-view .advice-box {
            margin-bottom: 1.5rem;
        }

        .prescription-view .advice-box h4 {
            font-size: 0.9rem;
            color: var(--brand-dark);
            margin-bottom: 0.8rem;
        }

        .prescription-view .advice-text {
            font-size: 0.85rem;
            color: var(--text-muted);
            word-break: break-word;
        }

        .prescription-view .disclaimer {
            margin-top: 1.5rem;
            padding: 1rem;
            background: #fffbeb;
            border-radius: 12px;
            font-size: 0.8rem;
            color: #92400e;
            text-align: center;
            border: 1px solid #fde68a;
        }

        .prescription-view .investigations-section {
            margin-top: 1.5rem;
            border-top: 1px dashed var(--border-color);
            padding-top: 1.2rem;
        }

        .prescription-view .investigations-section ul {
            list-style: none;
            padding: 0;
        }

        .prescription-view .investigations-section li {
            background: var(--accent-soft);
            margin: 0.3rem 0;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            word-break: break-word;
        }

        .info-footer {
            padding: 1rem 1.5rem;
            background: #f6fafd;
            border-top: 1px solid rgba(42, 111, 140, 0.15);
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }

        .disclaimer-note {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            color: #4e7589;
            background: rgba(255, 255, 255, 0.7);
            padding: 0.3rem 1rem;
            border-radius: 60px;
            border: 1px solid rgba(42, 111, 140, 0.15);
        }

        .hidden {
            display: none !important;
        }

        #overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(26, 79, 99, 0.95);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        @media (max-width: 768px) {
            body { padding: 0.5rem; }
            .panel-header { padding: 1rem; }
            .step-indicator { padding: 1rem 1rem 0; }
            .step-connector { width: 15px; }
            .step-label { font-size: 0.8rem; }
            .question-deck { padding: 1rem; }
            .info-card, .symptom-card, .question-card { padding: 1.2rem; }
            .prescription-view .rx-body { grid-template-columns: 1fr; }
            .prescription-view .rx-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); }
            .prescription-view .patient-bar { grid-template-columns: repeat(2, 1fr); }
            .prescription-view .medication-card { flex-direction: column; }
            .prescription-view .dosage-badge { text-align: left; width: 100%; }
            .action-btn, .next-btn, .secondary-btn { width: 100%; padding: 0.8rem 1rem; }
        }

        @media (max-width: 480px) {
            .step-label { display: none; }
            .step { justify-content: center; }
            .step-connector { width: 10px; }
            .patient-summary-item { width: 100%; }
            .prescription-view .patient-bar { grid-template-columns: 1fr; }
            .prescription-view .rx-header { flex-direction: column; align-items: flex-start; }
            .prescription-view .rx-badge { align-self: flex-start; }
            .gender-group { gap: 1rem; }
        }

        @media (hover: none) and (pointer: coarse) {
            .action-btn, .next-btn, .secondary-btn { min-height: 52px; }
            input, textarea, select { font-size: 16px !important; }
        }