* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

h1 {
    color: #4fc3f7;
    font-size: 1.5em;
}

h2 {
    color: #81d4fa;
    font-size: 1.1em;
    margin-bottom: 10px;
}

h3 {
    color: #b0bec5;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.status-dot.connected {
    background: #4caf50;
    box-shadow: 0 0 8px #4caf50;
}

.status-dot.disconnected {
    background: #f44336;
    box-shadow: 0 0 8px #f44336;
}

section {
    background: #16213e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #2a3a5e;
}

.connection-panel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mtu-info {
    color: #78909c;
    font-size: 0.85em;
    margin-left: auto;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1565c0;
}

.btn-danger {
    background: #d32f2f;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c62828;
}

.btn-success {
    background: #388e3c;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #2e7d32;
}

.btn-endpoint {
    background: #37474f;
    color: #b2dfdb;
    font-family: 'Courier New', monospace;
}

.btn-endpoint:hover:not(:disabled) {
    background: #455a64;
}

.btn-small {
    padding: 4px 10px;
    font-size: 0.75em;
    background: #455a64;
    color: #ccc;
}

.button-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.endpoint-group {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a3a5e;
}

.endpoint-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.custom-request {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-row label {
    min-width: 100px;
    color: #90a4ae;
    font-size: 0.85em;
}

input[type="text"],
input[type="number"],
textarea {
    background: #0d1b2a;
    border: 1px solid #37474f;
    border-radius: 4px;
    padding: 6px 10px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    flex: 1;
}

textarea {
    resize: vertical;
    min-height: 50px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4fc3f7;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.log-output {
    background: #0d1b2a;
    border-radius: 4px;
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    line-height: 1.5;
}

.log-entry {
    padding: 2px 0;
}

.log-info { color: #90a4ae; }
.log-success { color: #4caf50; }
.log-warn { color: #ff9800; }
.log-error { color: #f44336; }

.response-output {
    background: #0d1b2a;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
    color: #a5d6a7;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0d1b2a;
}
::-webkit-scrollbar-thumb {
    background: #37474f;
    border-radius: 3px;
}
