:root {
    --primary-color: #10b981; 
    --primary-hover: #059669;
    --bg-color: #f8fafc;
    --panel-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; padding: 20px; min-height: 100vh; position: relative;}

/* 语言切换按钮靠右上角 */
.lang-switch-container { position: absolute; top: 20px; right: 20px; z-index: 100;}
.lang-btn { background: #e2e8f0; border: 1px solid #cbd5e1; color: #334155; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05);}
.lang-btn:hover { background: #cbd5e1; color: #0f172a; transform: translateY(-1px);}

.container { max-width: 1100px; margin: 20px auto 0; display: flex; flex-direction: column; gap: 20px; }

header { text-align: center; margin-bottom: 5px; }
header h1 { font-size: 26px; color: #0f172a; margin-bottom: 8px; }
header p { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }

.privacy-banner { display: inline-block; background-color: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 8px 16px; border-radius: 8px; font-size: 13px; }
.shield-icon { margin-right: 5px; }

.workspace { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 800px) {
    .workspace { flex-direction: row; align-items: stretch; height: 600px; }
    .panel { flex: 1; display: flex; flex-direction: column; width: 50%; }
}
@media (max-width: 799px) {
    .panel { height: 450px; }
}

.panel { position: relative; background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-header h3 { font-size: 16px; color: #1e293b; }

textarea { width: 100%; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.7; outline: none; transition: border-color 0.2s; flex-grow: 1; color: var(--text-main); background-color: #fafafa; resize: none; margin-bottom: 15px;}
textarea:focus { border-color: var(--primary-color); background-color: #fff; }
#output-text { background-color: #f8fafc; flex-grow: 0.5; min-height: 150px; margin-bottom: 10px;}

.controls-horizontal { display: flex; justify-content: space-between; align-items: center; padding-top: 5px;}
.options { display: flex; gap: 15px; font-size: 13px; color: var(--text-muted); }
.options label { display: flex; align-items: center; gap: 5px; cursor: pointer; }

.primary-btn { background-color: var(--primary-color); color: white; border: none; padding: 10px 20px; font-size: 15px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }
.primary-btn:hover { background-color: var(--primary-hover); transform: translateY(-1px); }
.primary-btn:disabled { background-color: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

.action-btn { background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; padding: 4px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.action-btn:hover { background: #e2e8f0; color: #0f172a; }

.loading-overlay { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.9); border-radius: 12px; z-index: 10; flex-direction: column; align-items: center; justify-content: center; }
.spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: #475569; font-weight: 500; }

.diagnostic-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-bottom: 10px; flex-grow: 1; overflow-y: auto; }
.diagnostic-box h4 { font-size: 14px; margin-bottom: 12px; color: #0f172a; display: flex; align-items: center; gap: 5px; }
.diagnostic-item { margin-bottom: 15px; }
.d-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 5px;}
.d-desc { font-size: 12px; color: #64748b; margin-top: 4px;}
.badge { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef08a; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.progress-bar { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; transition: width 0.5s; }
.progress-fill.success { background: #22c55e; }
.progress-fill.warning { background: #eab308; }
.progress-fill.danger { background: #ef4444; }
.fact-list { font-size: 13px; color: #334155; margin-top: 8px; padding-left: 20px; max-height: 100px; overflow-y: auto; }
.fact-list li { margin-bottom: 4px; }
.fact-list li strong { color: #b91c1c; }
.stats { font-size: 12px; color: var(--primary-color); text-align: right; }
footer { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 10px; }
