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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    font-size: 0.9rem;
}

/* 通用按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #2d2d44;
    color: #e0e0e0;
    border: 1px solid #3d3d5c;
}

.btn-secondary:hover {
    background: #3d3d5c;
}

.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
}

.btn-small {
    padding: 6px 12px;
    background: #2d2d44;
    border: none;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 12px;
}

.btn-small:hover {
    background: #3d3d5c;
}

.btn-remove {
    background: #e74c3c;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-remove:hover {
    background: #c0392b;
}

/* 配置区域 */
.config-section {
    background: #0f0f1a;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #2d2d44;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    font-size: 1.3rem;
}

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

.field-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #2d2d44;
    transition: all 0.2s;
}

.field-header {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.field-name {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    background: #0f0f1a;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
}

.field-name:focus {
    outline: none;
    border-color: #667eea;
}

.field-type {
    flex: 1;
    min-width: 130px;
    padding: 8px 12px;
    background: #0f0f1a;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}

.field-options {
    padding-left: 10px;
}

.option-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #aaa;
}

.option-group input, .option-group select {
    padding: 6px 10px;
    background: #0f0f1a;
    border: 1px solid #2d2d44;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 13px;
}

/* 全局设置 */
.global-section {
    background: #0f0f1a;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #2d2d44;
}

.global-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.global-options {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.global-options label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.global-options input {
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #e0e0e0;
}

/* 操作按钮区 */
.action-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* 输出区 */
.output-section {
    background: #0f0f1a;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #2d2d44;
}

.output-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.json-output {
    background: #0a0a12;
    padding: 15px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #2d2d44;
}

/* API 端点区 */
.api-section {
    background: #0f0f1a;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #2d2d44;
}

.api-section h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.api-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.api-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.api-url-container input {
    flex: 1;
    padding: 10px;
    background: #1a1a2e;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #667eea;
    font-size: 13px;
    font-family: monospace;
}

.api-note {
    font-size: 12px;
    color: #666;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #555;
    border-top: 1px solid #2d2d44;
    margin-top: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .field-header {
        flex-direction: column;
    }
    
    .field-name, .field-type {
        width: 100%;
    }
    
    .btn-remove {
        align-self: flex-end;
    }
    
    .action-section {
        justify-content: center;
    }
  }
