/* Base Reset & Variables */
:root { 
    --billy-orange: #F5A623; 
    --billy-dark: #333; 
    --billy-blue: #008080; 
    --bg-light: #f9f9f9; 
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
}

#billy-notes-wrapper {
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6; 
    color: #333; 
    width: 100%; 
    max-width: 800px;
    margin: 0 auto; 
    padding: 20px; 
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

#billy-notes-wrapper * { 
    box-sizing: border-box; 
}

/* Typography */
#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; 
}
.en-text { font-weight: bold; color: #222; }
.zh-text { color: #666; font-size: 0.9em; display: block; margin-top: 4px; font-weight: normal; }

/* Cards & Layout */
.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;
}

/* Display Area */
.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;
}
.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: 1.8rem;
    font-family: monospace;
    font-weight: bold;
    color: var(--slate-800);
    line-height: 1.1;
}

/* Diagram Area */
.diagram-container {
    position: relative;
    width: 100%;
    background: #0f172a;
    border-bottom: 1px solid var(--slate-200);
    padding: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .diagram-container {
        flex-direction: row;
    }
}

.diagram-panel {
    flex: 1;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #334155;
    margin: 0;
}

@media (min-width: 640px) {
    .diagram-panel {
        border-bottom: none;
        border-right: 1px solid #334155;
    }
    .diagram-panel:last-child {
        border-right: none;
    }
}

/* Sliders */
.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;
}
.val-badge.temp { color: #ef4444; border-color: #fecaca; background: #fef2f2; }

input[type=range] {
    -webkit-appearance: none; 
    width: 100%; 
    background: transparent; 
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--red-500);
    cursor: pointer;
    margin-top: -7px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
    transition: background 0.3s;
}
input[type=range].cold-thumb::-webkit-slider-thumb {
    background: var(--blue-500);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(90deg, #3b82f6, #e2e8f0 50%, #ef4444);
    border-radius: 3px;
}

/* Info Box */
.info-box {
    margin: 25px;
    padding: 20px;
    background: #fffbf0;
    border-left: 5px solid var(--billy-orange);
    border-radius: 0 8px 8px 0;
    color: #333;
    font-size: 0.95rem;
}

.no-select { user-select: none; -webkit-user-select: none; }