/* public/index.css */

:root {
    /* 核心色彩变量 */
    --primary-color: #2563eb;       /* 交互主色调 */
    --primary-hover: #1d4ed8;
    --bg-color: #f1f5f9;            /* 页面背景 */
    --card-bg: #ffffff;             /* 面板背景 */
    --text-main: #0f172a;           /* 主文本 */
    --text-muted: #64748b;          /* 辅助文本 */
    --border-color: #cbd5e1;        /* 边框 */
    
    /* 终端控制台色彩 */
    --console-bg: #020617;          /* 极深色背景 */
    --console-text: #e2e8f0;        /* 终端默认文本 */
    --log-success: #10b981;
    --log-error: #ef4444;
    --log-warning: #f59e0b;
    --log-info: #3b82f6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* 增加极简的入场动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    padding: 2.5rem;
    animation: fadeIn 0.5s ease-out forwards; /* 应用动画 */
}

/* --- 头部排版 --- */
header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 1rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* --- 表单区域 --- */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.help-text code {
    background-color: var(--bg-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* --- 按钮 --- */
.primary-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 0.5rem;
}

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

.primary-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.primary-btn:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- 终端日志面板 --- */
.status-panel {
    margin-top: 3rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.status-panel h3 {
    background-color: #f8fafc;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.log-area {
    background-color: var(--console-bg);
    color: var(--console-text);
    padding: 1rem;
    height: 250px;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* 日志条目样式 */
.log-msg {
    margin-bottom: 0.3rem;
    word-break: break-all;
}

.log-msg.success { color: var(--log-success); }
.log-msg.error { color: var(--log-error); font-weight: bold; }
.log-msg.warning { color: var(--log-warning); }
.log-msg.info { color: var(--log-info); }

/* 滚动条美化 (针对 Webkit) */
.log-area::-webkit-scrollbar {
    width: 8px;
}
.log-area::-webkit-scrollbar-track {
    background: var(--console-bg);
}
.log-area::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
.log-area::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* --- 响应式调整 --- */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
        animation: none; /* 移动端关闭入场动画，保证极速渲染 */
    }
}