:root {
    /* 核心色板 - 赛博朋克风 */
    --bg-dark: #030305;
    --glass-surface: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-accent: #6366f1; /* 靛蓝 */
    --secondary-accent: #ec4899; /* 霓虹粉 */
    --success: #10b981;
    
    /* 字体 */
    --font-main: 'Inter', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* 动效 */
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: #fff;
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- 背景特效 --- */
.ambient-light {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
    z-index: -2;
    pointer-events: none;
}
.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* --- 布局容器 --- */
.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* --- 导航栏 --- */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}
.logo-icon { color: var(--primary-accent); width: 24px; }
.accent { color: var(--primary-accent); }

.lang-switch {
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 12px;
    display: flex;
    gap: 2px;
}
.lang-opt {
    background: none;
    border: none;
    color: #888;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}
.lang-opt.active {
    background: var(--glass-surface);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* --- Hero & Status --- */
.hero { text-align: center; margin-top: 20px; }
.hero h1 {
    font-size: 3rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -1px;
}
.subtitle { color: #94a3b8; font-size: 1.1rem; }
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-code);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.pulse {
    width: 6px; height: 6px; background: currentColor; border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    animation: blink 2s infinite;
}
@keyframes blink { 50% { opacity: 0.4; } }

/* --- 核心面板 (Glassmorphism) --- */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transition: transform 0.3s var(--ease-elastic);
}

/* 统计仪表盘 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
}
.stat-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.stat-box:not(:last-child)::after {
    content: ''; position: absolute; right: 0; top: 20%; height: 60%;
    width: 1px; background: var(--glass-border);
}
.stat-box .label { font-size: 0.7rem; color: #666; letter-spacing: 1px; font-weight: 700; }
.stat-box .value { 
    font-family: var(--font-code); 
    font-size: 1.5rem; 
    color: var(--primary-accent); 
    font-weight: 700;
    margin-top: 4px;
}

/* 编辑器 */
.editor-wrapper { position: relative; }
textarea {
    width: 100%;
    min-height: 400px;
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 25px;
    font-family: var(--font-code);
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}
.focus-border {
    position: absolute; bottom: 0; left: 0; width: 0%; height: 2px;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    transition: width 0.4s var(--ease-smooth);
}
textarea:focus + .focus-border { width: 100%; }

/* 工具栏 */
.toolbar {
    padding: 15px 25px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.tools-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-tool {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-tool:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}
.icon-text { font-family: serif; font-weight: bold; }

.btn-primary {
    background: var(--primary-accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.2s var(--ease-elastic);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}
.btn-primary.success {
    background: var(--success);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* --- 文档卡片 --- */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.info-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 16px;
    transition: all 0.3s;
}
.info-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--primary-accent);
    transform: translateY(-4px);
}
.info-card h3 { margin-bottom: 12px; color: #fff; font-size: 1.1rem; }
.info-card .content { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }

/* 移动端适配 */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .tools-group { justify-content: space-between; }
    .btn-primary { justify-content: center; }
}