:root {
    /* 飞书官方主色调 */
    --primary-color: #3370FF;
    --primary-hover: #5085FF;
    --primary-active: #245CDB;
    
    /* 文本颜色 */
    --text-title: #1F2329;
    --text-body: #333333;
    --text-muted: #8F959E;
    --text-placeholder: #C2C6CC;
    
    /* 背景和边框 */
    --bg-page: #F5F6F7;
    --bg-panel: #FFFFFF;
    --border-color: #DEE0E3;
    --input-bg: #FFFFFF;
    --input-bg-hover: #F8F9FA;
    
    /* 状态色 */
    --success-bg: #E4F8E7;
    --success-text: #20A835;
    --error-bg: #FFECE8;
    --error-text: #F54A45;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(31, 35, 41, 0.05);
    --shadow-md: 0 4px 10px rgba(31, 35, 41, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* 去除之前的动画泡泡 */
.background-bubbles {
    display: none;
}

.container {
    width: 100%;
    max-width: 440px;
    background: var(--bg-panel);
    padding: 32px 36px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(222, 224, 227, 0.5);
}

header {
    text-align: center;
    margin-bottom: 28px;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

header p {
    font-size: 14px;
    color: var(--text-muted);
}

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

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-title);
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-title);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

input::placeholder {
    color: var(--text-placeholder);
}

input:hover, select:hover {
    border-color: #BFC2C7;
    background-color: var(--input-bg-hover);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--input-bg);
    box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.2);
}

.steps-info {
    background: #F8F9FA;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.step {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.step:last-child {
    margin-bottom: 0;
}

.step .icon {
    font-size: 14px;
    margin-right: 6px;
    opacity: 0.8;
}

.btn-primary {
    width: 100%;
    height: 40px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
    margin-top: 24px;
}

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

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}

.message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.message.success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(32, 168, 53, 0.2);
}

.message.error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid rgba(245, 74, 69, 0.2);
}

.message a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.message a:hover {
    text-decoration: underline !important;
}

/* 骨架屏 / 加载状态 */
.schema-loader {
    text-align: center;
    padding: 30px 0;
}

.schema-loader .loader {
    border-color: rgba(51, 112, 255, 0.2);
    border-top-color: var(--primary-color);
    width: 24px;
    height: 24px;
    margin: 0 auto;
}

.app-layout { display: flex; gap: 30px; }
.form-panel { flex: 1; min-width: 300px; }
.history-panel { flex: 1; border-left: 1px solid var(--border-color); padding-left: 30px; max-height: 480px; display: flex; flex-direction: column; }
.history-panel h3 { font-size: 16px; margin-bottom: 16px; color: var(--text-title); }
.history-list { overflow-y: auto; flex: 1; padding-right: 8px; }
.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.history-item { padding: 10px 12px; background: #f9f9f9; border-radius: 6px; margin-bottom: 8px; display: flex; flex-direction: column; }
.history-item a { color: var(--primary-color); text-decoration: none; font-size: 14px; font-weight: 500; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.history-item a:hover { text-decoration: underline; }
.history-empty { color: var(--text-muted); font-size: 13px; text-align: center; margin-top: 20px; }
@media (max-width: 600px) { .app-layout { flex-direction: column; } .history-panel { border-left: none; border-top: 1px solid var(--border-color); padding-left: 0; padding-top: 20px; } }
