:root { 
    --billy-orange: #F5A623; 
    --billy-blue: #008080; 
    --bg-light: #f9f9f9; 
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
}

#billy-notes-wrapper {
    line-height: 1.6; color: #333; width: 100%; max-width: 800px;
    margin: 0 auto; background: #fff;
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#billy-notes-wrapper h1 { 
    color: var(--billy-blue); border-bottom: 3px solid var(--billy-orange); 
    padding-bottom: 10px; font-size: 2em; text-align: center; 
    margin-bottom: 20px; margin-top: 0; 
}
.zh-text { color: #666; font-size: 0.9em; display: block; margin-top: 4px; 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; min-width: 160px;
}
.status-idle { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.status-active { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; animation: pulse 2s infinite; }
.status-ionizing { background: #fee2e2; color: #b91c1c; border-color: #fecaca; animation: pulse 1s infinite; }

.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; gap: 10px; min-height: 90px;
}
.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-val { font-size: 2rem; font-family: monospace; font-weight: bold; color: var(--slate-800); line-height: 1.1; }

.diagram-container {
    position: relative; width: 100%; background: var(--slate-900);
    border-bottom: 1px solid var(--slate-200); padding: 0; line-height: 0;
    aspect-ratio: 1/1; overflow: hidden; display: flex; justify-content: center; align-items: center;
}

.controls-wrapper { padding: 25px; background: #fff; border-bottom: 1px solid var(--slate-200); }

.slider-container { position: relative; height: 64px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 30; }
input[type=range]:disabled { cursor: not-allowed; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 0; width: 0; }
input[type=range]::-moz-range-thumb { height: 0; width: 0; opacity: 0; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.no-select { user-select: none; -webkit-user-select: none; }

/* SVG Animations */
.spin-animation {
    animation: spin 4s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

.anim-incoming { animation: fly-in 1s linear forwards; }
.anim-passing { animation: fly-pass 1s linear forwards; }
.anim-emitting { animation: fly-emit 1.5s ease-out forwards; }

@keyframes fly-in {
    0% { transform: translate(-50px, -50px) rotate(45deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate(200px, 200px) rotate(45deg); opacity: 1; }
}
@keyframes fly-pass {
    0% { transform: translate(200px, 200px) rotate(45deg); opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(450px, 450px) rotate(45deg); opacity: 0; }
}
@keyframes fly-emit {
    0% { transform: translate(200px, 200px) rotate(45deg); opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(450px, 450px) rotate(45deg); opacity: 0; }
}