* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.nav-links a {
    display: inline-block;
    margin-left: 16px;
    padding: 6px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: #1890ff;
    background: #e6f7ff;
}

.nav-links a.active {
    color: #fff;
    background: #1890ff;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.total-info {
    color: #666;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: #fff;
}

.btn-default:hover {
    background: #fafafa;
}

.table-wrap {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.data-table .empty-tip {
    text-align: center;
    color: #999;
    padding: 40px;
}

.method-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.method-GET { background: #52c41a; }
.method-POST { background: #1890ff; }
.method-PUT { background: #fa8c16; }
.method-DELETE { background: #f5222d; }
.method-PATCH { background: #722ed1; }

.cell-ellipsis {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-link {
    background: none;
    border: none;
    color: #1890ff;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination button.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.pagination button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination .page-info {
    color: #666;
    font-size: 14px;
    margin: 0 8px;
}

/* 弹框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-box {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.detail-item {
    margin-bottom: 16px;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    font-size: 13px;
}

.detail-item pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.detail-item .value-text {
    font-size: 14px;
    color: #333;
}

/* 测试页面 */
.test-panel {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.code-input {
    font-family: Consolas, Monaco, "Courier New", monospace;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.response-panel {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.response-panel h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.response-panel pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.response-panel pre.success {
    border-left: 4px solid #52c41a;
}

.response-panel pre.error {
    border-left: 4px solid #f5222d;
}
