:root {
    --primary: #5298ff;
    --secondary: #3066be;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ffc107;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-300);
}

h1,
h2,
h3 {
    color: var(--gray-900);
    margin-bottom: 15px;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 18px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--secondary);
}

.btn:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
}

.btn-danger {
    background-color: var(--danger);
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

input,
select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    font-size: 14px;
}

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

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check input {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
}

.panel {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
}

.panel-header {
    border-bottom: 1px solid var(--gray-300);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-300);
}

th {
    background-color: var(--gray-200);
    font-weight: 600;
}

.hidden {
    display: none;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-300);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background-color: #fff8e1;
    color: #f57f17;
}

.mb-2 {
    margin-bottom: 10px;
}

.api-url-input {
    display: flex;
    margin-bottom: 15px;
}

.api-url-input input {
    flex: 1;
    margin-right: 10px;
    margin-bottom: 0;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

/* Response container */
.response-container {
    background-color: var(--gray-900);
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 3px;
}

.log-entry:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.section-title {
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gray-300);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--gray-800);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
