* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.control-panel {
    padding: 20px;
    border-right: 1px solid #eee;
}

.data-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.panel-section {
    margin-bottom: 25px;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

h2 i {
    margin-right: 10px;
    color: #3498db;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

select, input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-connected {
    background: #2ecc71;
}

.status-disconnected {
    background: #e74c3c;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
}

.options {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
}

.log-area {
    flex: 1;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-left: 3px solid #3498db;
    background: white;
}

.timestamp {
    font-size: 12px;
    color: #7f8c8d;
}

.port-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
}