 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #FCF8DD;
            color: #333333;
            min-height: 100vh;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
            padding: 20px;
            background: linear-gradient(135deg, #00809D 0%, #2196F3 100%);
            border-radius: 15px;
            color: white;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            font-size: 3em;
            margin-bottom: 10px;
            color: white;
        }

        .header p {
            font-size: 1.2em;
            opacity: 0.9;
            color: white;
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        .control-panel {
            background: linear-gradient(135deg, #FFD700 0%, #FFD700 100%);
            padding: 30px;
            border-radius: 15px;
            height: fit-content;
            max-height: 90vh;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 2px solid #e3e8ff;
            scroll-behavior: smooth;
        }

        .control-panel::-webkit-scrollbar {
            width: 8px;
        }

        .control-panel::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .control-panel::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #00809D 0%, #2196F3 100%);
            border-radius: 10px;
        }

        .control-panel::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #00809D 0%, #1976d2 100%);
        }

        .chart-container {
            background: linear-gradient(135deg, #FFD700 0%, #FFD700 100%);
            padding: 30px;
            border-radius: 15px;
            position: relative;
            max-height: 90vh;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 2px solid #e8f5e8;
            scroll-behavior: smooth;
        }

        .chart-container::-webkit-scrollbar {
            width: 8px;
        }

        .chart-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .chart-container::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #00809D 0%, #64B5F6 100%);
            border-radius: 10px;
        }

        .chart-container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #00809D 0%, #42A5F5 100%);
        }



        .chart-container {
            background: linear-gradient(135deg, #fefff7 0%, #fcfdff 100%);
            padding: 30px;
            border-radius: 15px;
            position: relative;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 2px solid #e8f5e8;
        }

        .section {
            margin-bottom: 30px;
        }

        .section h3 {
            margin-bottom: 15px;
            color: #ffffff;
            font-size: 1.3em;
        }

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

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        input, select, textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid #e3f2fd;
            border-radius: 8px;
            background: white;
            color: #333333;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        input::placeholder, textarea::placeholder {
            color: #999999;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: #2196F3;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
            transform: translateY(-2px);
        }

        .btn {
            background: linear-gradient(135deg, #00809D 0%, #2196F3 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            margin-right: 10px;
            margin-bottom: 10px;
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .btn-secondary {
            background: linear-gradient(135deg, #00809D 0%, #64B5F6 100%);
        }

        .btn-danger {
            background: linear-gradient(135deg, #F44336 0%, #E91E63 100%);
        }

        .btn-small {
            padding: 8px 16px;
            font-size: 12px;
        }

        .serial-status {
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
        }

        .status-disconnected {
            background: rgba(244, 67, 54, 0.1);
            border: 2px solid #F44336;
            color: #F44336;
        }

        .status-connected {
            background: rgba(76, 175, 80, 0.1);
            border: 2px solid #4CAF50;
            color: #4CAF50;
        }

        .data-preview {
            background: linear-gradient(135deg, #f1f8e9 0%, #e3f2fd 100%);
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
            max-height: 200px;
            overflow-y: auto;
            border: 2px solid #e8f5e8;
        }

        .data-preview h4 {
            margin-bottom: 10px;
            color: #2196F3;
        }

        .data-point {
            font-family: monospace;
            font-size: 12px;
            opacity: 0.8;
            padding: 2px 0;
        }

        .chart-wrapper {
            position: relative;
            height: 400px;
            margin-bottom: 20px;
        }

        .download-section {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 20px;
        }

        .color-input {
            width: 60px !important;
            height: 40px;
            padding: 5px;
            cursor: pointer;
        }

        .flex-row {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 1000;
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 30px;
            border-radius: 15px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            border: 2px solid #e3f2fd;
        }

        .modal h3 {
            margin-bottom: 20px;
            color: #2196F3;
        }

        .close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            cursor: pointer;
            color: #333333;
        }

        .file-input {
            position: relative;
            overflow: hidden;
            display: inline-block;
        }

        .file-input input[type=file] {
            position: absolute;
            left: -9999px;
        }

        .file-input-label {
            background: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .file-input-label:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
        }

        .ai-chatbox {
            background: linear-gradient(135deg, #fff3e0 0%, #f3e5f5 100%);
            border: 2px solid #ff9800;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .ai-chatbox h4 {
            color: #ff9800;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ai-input {
            min-height: 100px;
            resize: vertical;
            border: 2px solid #ffcc80;
        }

        .ai-output {
            background: #f5f5f5;
            border: 2px solid #ddd;
            border-radius: 8px;
            padding: 15px;
            min-height: 100px;
            font-family: monospace;
            font-size: 12px;
            white-space: pre-wrap;
            word-break: break-all;
            margin-top: 10px;
            max-height: 200px;
            overflow-y: auto;
        }

        .ai-status {
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 12px;
            text-align: center;
            margin: 10px 0;
        }

        .status-idle {
            background: #e3f2fd;
            color: #1976d2;
        }

        .status-processing {
            background: #fff3e0;
            color: #f57c00;
        }

        .status-success {
            background: #e8f5e8;
            color: #388e3c;
        }

        .status-error {
            background: #ffebee;
            color: #d32f2f;
        }

        .button-group {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .api-config {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
        }

        .api-config label {
            font-size: 12px;
            color: #666;
        }

        .api-config input {
            padding: 8px;
            font-size: 12px;
        }

        @media (max-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
            }
            
            .header h1 {
                font-size: 2em;
            }
            
            .flex-row {
                flex-direction: column;
                align-items: stretch;
            }

            .button-group {
                flex-direction: column;
            }
        }
        footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 15px 0;
  position: static; /* remove this if not needed */
  bottom: 0;
  width: 100%;
}

.footer-content a {
  display: inline-block;
  color: #ccc;
  text-decoration: none;
  margin-top: 8px;
  font-size: 14px;
}

.footer-content a:hover {
  color: white;
  text-decoration: underline;
}

#about-us {
  padding: 60px;
  background-color: #f9f9f9;
  margin-bottom: 60px; /* to avoid overlap with fixed footer */
}
