/* ShouChao dark theme - GangDan-compatible design system */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #16213e;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.08);
    --text-primary: #e0e0e0;
    --text-muted: #90a4ae;
    --primary: #4fc3f7;
    --primary-dark: #29b6f6;
    --success: #66bb6a;
    --danger: #ef5350;
    --warning: #ff9800;
    --border: rgba(255,255,255,0.1);
    --radius: 8px;
    --sidebar-width: 220px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
        "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.logo { text-align: center; padding: 10px 15px 20px; border-bottom: 1px solid var(--border); }
.logo h2 { color: var(--primary); font-size: 1.5em; }
.logo .version { color: var(--text-muted); font-size: 0.8em; }

.nav-links { list-style: none; flex: 1; padding: 10px 0; }
.nav-links li {
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.nav-links li:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-links li.active {
    color: var(--primary);
    background: var(--bg-card);
    border-left-color: var(--primary);
}

.nav-footer { padding: 15px; border-top: 1px solid var(--border); }
.lang-select {
    width: 100%; padding: 6px; background: var(--bg-card);
    color: var(--text-primary); border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Main content */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 25px;
    overflow-y: auto;
}

.view { display: none; }
.view.active { display: block; }

h1 { color: var(--primary); margin-bottom: 20px; font-size: 1.5em; }
h3 { color: var(--text-primary); margin-bottom: 12px; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}
.card:hover { border-color: rgba(255,255,255,0.15); }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-number { font-size: 2em; color: var(--primary); font-weight: bold; }
.stat-label { color: var(--text-muted); margin-top: 5px; }

/* Buttons */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
    display: inline-block;
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-card-hover); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 0.85em; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* Toolbar */
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Form */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; color: var(--text-muted); margin-bottom: 4px; font-size: 0.85em; }
.form-group input, .form-group select {
    width: 100%; padding: 8px 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9em;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-sm { padding: 6px 10px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); }
.input-lg { flex: 1; padding: 8px 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); }
.input-lg:focus, .input-sm:focus { outline: none; border-color: var(--primary); }

select { padding: 6px 10px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); }

/* Settings grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

/* Split pane */
.split-pane {
    display: flex;
    gap: 15px;
    height: calc(100vh - 250px);
    min-height: 400px;
}
.list-pane {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.detail-pane {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    padding: 15px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9em;
}

/* List items */
.list-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.list-item:hover { background: var(--bg-card-hover); }
.list-item.active { background: rgba(79,195,247,0.1); border-left: 3px solid var(--primary); }
.list-item .title { color: var(--text-primary); font-weight: 500; }
.list-item .meta { color: var(--text-muted); font-size: 0.8em; margin-top: 3px; }

/* Output area */
.output-area {
    min-height: 300px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.placeholder { color: var(--text-muted); font-style: italic; padding: 40px; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .nav-links li span { display: none; }
    .sidebar .logo h2 { font-size: 1em; }
    .sidebar .nav-footer { display: none; }
    .content { margin-left: 60px; }
    .split-pane { flex-direction: column; height: auto; }
    .settings-grid { grid-template-columns: 1fr; }
}
