.billy-app-container {
    --billy-orange: #F5A623; 
    --billy-dark: #333; 
    --billy-blue: #008080; 
    --bg-light: #f9f9f9; 
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    color: var(--billy-dark);
}

.billy-app-container * { box-sizing: border-box; }
.zh-text { color: #666; font-size: 0.9em; display: inline; font-weight: normal; }

.note-card { 
    background: var(--bg-light); border-radius: 12px; padding: 0; margin: 20px 0; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-top: 4px solid var(--billy-blue); overflow: hidden;
}

.card-header {
    padding: 20px 25px; border-bottom: 1px solid var(--slate-200);
    display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; gap: 15px;
}

.status-badge {
    padding: 6px 24px; border-radius: 9999px; font-size: 0.85rem; font-weight: 700; text-align: center; border: 1px solid transparent; transition: all 0.3s ease;
}
.status-running { background: #fee2e2; color: #b91c1c; border-color: #fecaca; animation: pulse 2s infinite; }
.status-paused { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }

.hud-display {
    text-align: center; width: 100%; padding: 15px; background: var(--bg-light); border-radius: 8px; border: 1px solid var(--slate-200); position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
@media (max-width: 600px) { .hud-display { grid-template-columns: 1fr; } }
.hud-display::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--billy-blue), var(--billy-orange));
}
.hud-label { font-size: 0.85rem; font-weight: bold; color: var(--slate-500); text-transform: uppercase; }
.hud-val { font-size: 1.2rem; font-weight: bold; color: var(--slate-800); line-height: 1.2; margin-top: 5px; text-transform: capitalize; }

.diagram-container { position: relative; width: 100%; background: #fff; border-bottom: 1px solid var(--slate-200); padding: 0; line-height: 0; overflow: hidden; aspect-ratio: 16/10; }
.diagram-container canvas { width: 100%; height: 100%; display: block; }

.legend-overlay { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,0.9); backdrop-filter: blur(4px); padding: 0.5rem; border-radius: 0.375rem; border: 1px solid var(--slate-200); font-size: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); pointer-events: none; user-select: none; }
.legend-item { display: flex; align-items: center; margin-bottom: 0.25rem; }
.legend-item:last-child { margin-bottom: 0; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; margin-right: 0.5rem; display: inline-block; }

.sliders-wrapper { padding: 25px; background: #fff; border-bottom: 1px solid var(--slate-200); display: grid; grid-template-columns: 1fr; gap: 20px; }
.slider-group { display: flex; flex-direction: column; gap: 8px; }
.slider-header { display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 0.9rem; color: var(--slate-800); }
.val-badge { background: var(--bg-light); border: 1px solid var(--slate-200); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.85rem; }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 18px; width: 18px; border-radius: 50%; background: var(--billy-blue); cursor: pointer; margin-top: -6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); border: 2px solid white; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; cursor: pointer; background: var(--slate-200); border-radius: 3px; }

.controls { padding: 25px; display: flex; flex-direction: column; gap: 20px; background: #fff; }
.control-group { display: flex; flex-direction: column; gap: 10px; }
.control-title { font-size: 0.875rem; font-weight: bold; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.05em; }
.btn-group { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.btn-toggle { flex: 1; min-width: 80px; padding: 10px; border-radius: 8px; font-weight: bold; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border: 2px solid var(--slate-200); background: white; color: var(--slate-600); display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn-toggle:hover { background: var(--bg-light); }
.btn-toggle.active { background: var(--billy-blue); color: white; border-color: var(--billy-blue); }

.btn-action { background: white; border: 2px solid var(--billy-blue); color: var(--billy-blue); padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }
.btn-action:hover { background: #f0f8f8; transform: translateY(-2px); }
.btn-action.primary { background: var(--billy-blue); color: white; }
.btn-action.primary:hover { background: #006666; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.no-select { user-select: none; -webkit-user-select: none; }