        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }
        .container {
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }
        h1 { color: #333; text-align: center; margin-bottom: 10px; }
        .subtitle { text-align: center; color: #666; margin-bottom: 30px; }
        
        /* Disclaimer Modal Styles */
        .modal {
            display: block;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .modal-content {
            background-color: #fefefe;
            margin: 20px auto;
            padding: 30px;
            border-radius: 12px;
            width: 80%;
            max-width: 600px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            position: relative;
            min-height: min-content;
        }
        .modal-header {
            color: #dc3545;
            font-size: 24px;
            font-weight: bold;
            text-align: center;
            margin-bottom: 20px;
        }
        .disclaimer-text {
            line-height: 1.6;
            margin-bottom: 20px;
            color: #333;
        }
        .warning-box {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            padding: 15px;
            border-radius: 6px;
            margin: 15px 0;
            color: #856404;
        }
        .checkbox-container {
            display: flex;
            align-items: center;
            margin: 20px 0;
            font-weight: 500;
        }
        .checkbox-container input {
            margin-right: 10px;
            transform: scale(1.2);
        }
        .modal-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 25px;
            flex-wrap: wrap;
        }
        
        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .modal {
                padding: 10px;
            }
            .modal-content {
                margin: 10px auto;
                padding: 15px;
                width: 95%;
                border-radius: 8px;
            }
            .modal-header {
                font-size: 20px;
                margin-bottom: 15px;
            }
            .disclaimer-text {
                font-size: 14px;
                line-height: 1.5;
            }
            .modal-buttons {
                flex-direction: column;
                gap: 10px;
            }
            .modal-buttons button {
                width: 100%;
                padding: 15px;
                font-size: 16px;
            }
            .checkbox-container {
                font-size: 14px;
                align-items: flex-start;
                margin: 15px 0;
            }
            .checkbox-container input {
                margin-top: 2px;
                flex-shrink: 0;
            }
        }
        
        @media (max-height: 600px) {
            .modal {
                padding: 5px;
            }
            .modal-content {
                margin: 5px auto;
                padding: 10px;
            }
            .modal-header {
                font-size: 18px;
                margin-bottom: 10px;
            }
            .disclaimer-text {
                font-size: 13px;
            }
        }
        .btn-accept {
            background: #28a745;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
        }
        .btn-decline {
            background: #dc3545;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
        }
        .btn-accept:disabled {
            background: #ccc;
            cursor: not-allowed;
        }
        
        /* Main Interface Styles */
        .main-interface {
            display: none;
        }
        .status {
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            margin: 15px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .connected { color: #28a745; font-weight: bold; }
        .disconnected { color: #dc3545; font-weight: bold; }
        .connecting { color: #ffc107; font-weight: bold; }
        .command-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            margin: 15px 0;
        }
        button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }
        button:hover { transform: translateY(-1px); }
        button:disabled { background: #ccc; cursor: not-allowed; transform: none; }
        
        /* OTA disabled state for buttons */
        button.ota-disabled {
            background: #555 !important;
            cursor: not-allowed !important;
            opacity: 0.5 !important;
            position: relative;
        }
        
        button.ota-disabled:hover {
            background: #555 !important;
            transform: none !important;
        }
        
        button.ota-disabled::after {
            content: '🔒';
            position: absolute;
            top: 2px;
            right: 5px;
            font-size: 12px;
            opacity: 0.8;
        }
        
        /* Event log styling */
        .event-log-container,
        .hm-event-log-container {
            margin: 10px 0;
        }
        
        .event-log-container .summary,
        .hm-event-log-container .summary {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .event-log-container .payload-header,
        .hm-event-log-container .hm-event-records {
            background: #e7f3ff;
            border: 1px solid #bee5eb;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .valid-row {
            background-color: #e6ffe6;
        }
        
        .invalid-row {
            background-color: #ffe6e6;
        }
        
        /* Error codes styling */
        .error-codes-container {
            margin: 10px 0;
        }
        
        .error-codes-container .summary {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .error-codes-container .subsystem-summary {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .error-codes-container .subsystem-summary ul {
            margin: 5px 0 0 20px;
            padding: 0;
        }
        
        .error-row {
            background-color: #ffe6e6;
        }
        
        .info-row {
            background-color: #f8f9fa;
        }
        
        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
            margin-top: 10px;
        }
        
        .data-table th,
        .data-table td {
            border: 1px solid #ddd;
            padding: 6px 8px;
            text-align: left;
        }
        
        .data-table th {
            background-color: #f2f2f2;
            font-weight: bold;
        }
        
        .data-table tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        .btn-connect { background: #28a745; padding: 12px 24px; font-size: 16px; }
        .btn-warning { background: #ffc107; color: #212529; }
        .btn-warning:hover { background: #e0a800; }
        .btn-danger { background: #dc3545; color: white; }
        .btn-danger:hover { background: #c82333; }
        .command-section {
            margin: 20px 0;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #667eea;
        }
        .command-section h3 {
            margin: 0 0 15px 0;
            color: #333;
        }
        .data-card {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 15px;
            margin: 10px 0;
        }
        .data-card h3 {
            margin: 0 0 15px 0;
            color: #333;
            border-bottom: 2px solid #667eea;
            padding-bottom: 8px;
        }
        .data-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin: 10px 0;
        }
        .data-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }
        .data-item:last-child { border-bottom: none; }
        .data-label { font-weight: 500; color: #666; }
        .data-value { font-weight: bold; color: #333; }
        .log {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            padding: 15px;
            height: 300px;
            overflow-y: auto;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            white-space: pre-wrap;
            margin-top: 20px;
            border-radius: 6px;
        }
        .event-log {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
        }
        
        /* URL Broker Config styling */
        .url-broker-config-container {
            margin: 10px 0;
        }
        
        .url-broker-config-container .summary {
            background: #e8f5e8;
            border: 1px solid #c3e6c3;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .url-broker-config-container .current-chunk,
        .url-broker-config-container .processing-stages,
        .url-broker-config-container .final-config {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .url-broker-config-container .data-section,
        .url-broker-config-container .stage {
            margin: 8px 0;
            padding: 8px;
            background: #ffffff;
            border-radius: 3px;
        }
        
        .url-broker-config-container code {
            background: #f1f3f4;
            padding: 4px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
            word-break: break-all;
            display: block;
            margin-top: 4px;
        }
        
        /* HM Summary styling */
        .hm-summary-container {
            margin: 10px 0;
        }
        
        .hm-summary-container .summary {
            background: #f0f8ff;
            border: 1px solid #b3d9ff;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .hm-summary-container .raw-data,
        .hm-summary-container .metadata,
        .hm-summary-container .description {
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 10px;
            margin-bottom: 10px;
        }
        
        .hm-summary-container .description {
            background: #f9f9f9;
            border-left: 4px solid #007bff;
        }
        
        .hm-summary-container code {
            background: #f1f3f4;
            padding: 8px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
            display: block;
            word-break: break-all;
            font-size: 12px;
        }
        .error-entry {
            background: #f8d7da;
            border: 1px solid #f5c6cb;
            padding: 8px;
            margin: 3px 0;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
        }
        .footer {
            text-align: center;
            margin-top: 30px;
            padding: 15px;
            color: #666;
            border-top: 1px solid #eee;
            font-size: 14px;
        }
        .github-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }
        .github-link:hover {
            text-decoration: underline;
        }
        #versionInfo {
            margin: 10px 0;
            font-style: italic;
        }
        #versionInfo code {
            background: #f0f0f0;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
        }
        
        /* Command info styles */
        .cmd-button {
            position: relative;
            width: 100%;
            text-align: left;
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .cmd-button-text {
            flex-grow: 1;
        }
        .info-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            color: white;
            font-size: 11px;
            font-weight: bold;
            margin-left: 8px;
            cursor: help;
        }
        .info-icon:hover {
            background: rgba(255, 255, 255, 0.5);
        }
        .section-caption {
            margin: 10px 0;
            padding: 8px 12px;
            background: #e7f3ff;
            border-left: 3px solid #667eea;
            font-size: 14px;
            color: #495057;
            border-radius: 4px;
        }
        
        /* Command info modal */
        .info-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            overflow-y: auto;
        }
        .info-modal-content {
            background-color: #fefefe;
            margin: 50px auto;
            padding: 20px;
            border-radius: 8px;
            width: 90%;
            max-width: 700px;
            position: relative;
        }
        .info-modal-close {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            color: #aaa;
        }
        .info-modal-close:hover {
            color: #000;
        }
        .command-details h3 {
            color: #667eea;
            margin-top: 0;
        }
        .command-details .detail-section {
            margin: 15px 0;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 4px;
        }
        .command-details code {
            background: #e9ecef;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
        }
        .command-details pre {
            background: #282c34;
            color: #abb2bf;
            padding: 10px;
            border-radius: 4px;
            overflow-x: auto;
            font-size: 12px;
        }
        
        /* Tooltip styles */
        [data-tooltip] {
            position: relative;
        }
        [data-tooltip]:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #333;
            color: white;
            padding: 8px 12px;
            border-radius: 4px;
            white-space: nowrap;
            font-size: 12px;
            z-index: 10;
            pointer-events: none;
            margin-bottom: 5px;
            max-width: 300px;
            white-space: normal;
            text-align: center;
        }
        [data-tooltip]:hover::before {
            content: '';
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 5px solid transparent;
            border-top-color: #333;
            z-index: 10;
            pointer-events: none;
        }

        /* Tabbed Log Interface */
        .log-container {
            margin-top: 20px;
            border: 1px solid #333;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .log-tabs {
            display: flex;
            background: #2a2a2a;
            border-bottom: 1px solid #333;
        }
        
        .tab-button {
            flex: 1;
            padding: 12px 16px;
            background: #2a2a2a;
            color: #ccc;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            font-weight: 500;
        }
        
        .tab-button:hover {
            background: #363636;
            color: white;
        }
        
        .tab-button.active {
            background: #667eea;
            color: white;
        }
        
        .log-tab {
            display: none;
            background: #1a1a1a;
            color: #f0f0f0;
            padding: 15px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 12px;
            line-height: 1.4;
            max-height: 400px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .log-tab.active {
            display: block;
        }
        
        .log-tab:empty::before {
            content: 'No entries yet...';
            color: #666;
            font-style: italic;
        }
        
        /* Connection Status Area */
        .connection-status {
            background: #e7f3ff;
            border: 1px solid #b3d9ff;
            border-radius: 6px;
            padding: 10px 15px;
            margin: 10px 0;
            font-family: 'Courier New', monospace;
            font-size: 13px;
            color: #0066cc;
            line-height: 1.4;
        }
        
        /* Command Tabs Interface */
        .command-tabs-container {
            margin-top: 20px;
            border: 1px solid #333;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .command-tabs {
            display: flex;
            background: #2a2a2a;
            border-bottom: 1px solid #333;
            flex-wrap: wrap;
        }
        
        .command-tab-button {
            flex: 1;
            min-width: 100px;
            padding: 12px 8px;
            background: #2a2a2a;
            color: #ccc;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 12px;
            font-weight: 500;
            border-right: 1px solid #333;
        }
        
        .command-tab-button:last-child {
            border-right: none;
        }
        
        .command-tab-button:hover {
            background: #363636;
            color: white;
        }
        
        .command-tab-button.active {
            background: #667eea;
            color: white;
        }
        
        .command-tab {
            display: none;
            padding: 20px;
            background: white;
        }
        
        .command-tab.active {
            display: block;
        }
        
        /* Mobile responsiveness for command tabs */
        @media (max-width: 768px) {
            .command-tabs {
                flex-direction: column;
            }
            .command-tab-button {
                flex: none;
                border-right: none;
                border-bottom: 1px solid #333;
                font-size: 14px;
                padding: 15px;
            }
            .command-tab-button:last-child {
                border-bottom: none;
            }
        }