body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.card h2 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-weight: 500;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

input[type="text"], textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

input[type="text"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.message-log {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fafafa;
    padding: 0;
}

.message {
    padding: 12px;
    margin: 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.message-direction {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.message-direction svg {
    margin-right: 5px;
}

.message-timestamp {
    color: #888;
    font-size: 12px;
}

.message-content {
    word-break: break-word;
}

.message-expand {
    color: #4CAF50;
    cursor: pointer;
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
}

.sent .message-direction {
    color: #2196F3;
}

.received .message-direction {
    color: #4CAF50;
}

.status {
    color: #666;
    font-style: italic;
}

.status.connected {
    color: green;
}

.status.disconnected {
    color: red;
}

.status.error {
    color: #d32f2f;
}

/* Tabs styling */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: background-color 0.2s;
}

.tab:hover {
    background-color: #f0f0f0;
}

.tab.active {
    background-color: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* JSON editor styling */
.json-editor {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    min-height: 150px;
    background-color: #f8f8f8;
    font-size: 14px;
    line-height: 1.5;
}

.json-error {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

/* File upload styling */
.file-info {
    margin-top: 10px;
    font-size: 0.9em;
}

.file-size {
    font-weight: bold;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

/* JSON syntax highlighting */
.json-key {
    color: #0000cd;
}

.json-string {
    color: #a31515;
}

.json-number {
    color: #0000ff;
}

.json-boolean {
    color: #a52a2a;
}

.json-null {
    color: #808080;
}

/* Connection status and controls */
#connectionStatus {
    margin-left: auto;
}

.endpoint-description {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.endpoints-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.refresh-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.refresh-button:hover {
    background-color: #e0e0e0;
}

/* Connection tabs */
.connection-tabs {
    margin-top: 15px;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-button {
    padding: 8px 15px;
    cursor: pointer;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: background-color 0.2s;
    color: #555;
    font-size: 14px;
}

.tab-button:hover {
    background-color: #f0f0f0;
}

.tab-button.active {
    background-color: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    font-weight: 500;
    color: #4CAF50;
}

.connection-tab-content {
    display: none;
    padding: 10px 0;
}

.connection-tab-content.active {
    display: block;
}

/* Params and Headers styling */
.params-container {
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #fafafa;
}

.params-headers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 50px;
    gap: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    color: #555;
}

.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 50px;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.param-row:last-child {
    border-bottom: none;
}

.param-key-input, .param-value-input, .param-desc-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.param-actions {
    display: flex;
    justify-content: center;
}

.remove-param {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-param:hover {
    background-color: #d32f2f;
}

.add-param-btn {
    margin: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
}

.add-param-btn:hover {
    background-color: #45a049;
}

/* Styling for the path parameters */
.param-pattern {
    font-size: 0.8em;
    color: #666;
    font-family: monospace;
    padding: 2px 5px;
    background-color: #f5f5f5;
    border-radius: 3px;
    cursor: help;
}

/* Styling for readonly inputs */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #ddd;
}

/* Path params tab styling */
#pathParamsTabButton {
    display: block;
}

/* Style the path parameter rows */
#pathParamsList .param-row {
    background-color: #f8f8ff;
    border-left: 3px solid #4a6da7;
}

/* Style for path param tab to make it distinct */
.tab-button[data-tab="connection-path-params"] {
    color: #4a6da7;
}

.tab-button[data-tab="connection-path-params"].active {
    border-bottom-color: #4a6da7;
}

.real-url-display {
    font-style: italic;
    color: #666;
    margin-top: 5px;
    font-size: 0.9em;
    padding-left: 2px;
    word-break: break-all;
}

/* Path parameter specific styles */
#pathParamsList .param-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Styling for the "Add Path Parameter" button */
.add-param-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.add-param-btn:hover {
    background-color: #45a049;
}

/* Styling for the remove button in path parameters */
.remove-param {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.remove-param:hover {
    background-color: #d32f2f;
}

/* Empty state styling */
.empty-params-state {
    padding: 15px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Added style for readonly fields */
input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}
