/* frontend/config.css - Cyberpunk Edition v3 */
:root {
    --bg-app: #0f172a;
    --primary: #6366f1;
    --text-main: #f8fafc;
    --glass: blur(16px);
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a 60%, #020617);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
}

.config-container { 
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.config-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.config-header { 
    text-align: center; 
    margin-bottom: 40px; 
}
.config-header h1 { 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
    color: white; 
}
.config-header p { 
    color: #94a3b8; 
}

/* API 卡片样式 */
.api-section {
    background: rgba(0,0,0,0.2); 
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 20px; 
    transition: 0.3s;
}
.api-section:hover { 
    border-color: rgba(99, 102, 241, 0.5); 
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1); 
}

.api-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding-bottom: 15px; 
}
.api-icon { 
    width: 40px; 
    height: 40px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 8px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px;
}
.api-title h3 { 
    font-size: 1rem; 
    color: white; 
    margin-bottom: 2px; 
}
.api-title p { 
    font-size: 12px; 
    color: #64748b; 
}

/* 状态点 */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.status-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    background: #475569; 
    box-shadow: 0 0 5px rgba(0,0,0,0.5); 
}
.status-dot.connected { 
    background: #10b981; 
    box-shadow: 0 0 8px #10b981; 
}

/* 输入框区域 */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 统一输入框样式 */
input[type="password"], input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #a5b4fc;
    font-family: monospace;
    font-size: 0.95rem;
    box-sizing: border-box; /* 防止 padding 撑破 */
}
input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 按钮样式 */
.btn-save, .btn-back {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-save {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.btn-back {
    background: rgba(55, 65, 81, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-save:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-back:hover { background: rgba(75, 85, 99, 0.8); }

/* 提示区 */
.tips {
    margin-top: 25px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}
.tips h4 {
    margin: 0 0 10px 0;
    color: #3b82f6;
    font-size: 0.9rem;
}
.tips ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* 全局消息 */
#global-message {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
    display: none;
}
#global-message:not(:empty) {
    display: block;
}
.status-message.success { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-message.error { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* 响应式 */
@media (max-width: 600px) {
    .config-card { padding: 20px; }
    .api-header { flex-wrap: wrap; }
    .status-indicator { margin-left: 0; width: 100%; margin-top: 10px; }
}
