/* Base Variables matching the Sample App */
:root { 
    --billy-orange: #F5A623; 
    --billy-dark: #333; 
    --billy-blue: #008080; 
    --bg-light: #f9f9f9; 
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-800: #1e293b;
}

#billy-notes-wrapper {
    line-height: 1.6; 
    color: #333; 
    width: 100%; 
    max-width: 900px;
    margin: 0 auto; 
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.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;
}

/* 3D Canvas Area */
.diagram-container {
    position: relative;
    width: 100%;
    background: #111;
    border-bottom: 1px solid var(--slate-200);
    padding: 0;
    line-height: 0;
    /* Prevent Layout Shift */
    aspect-ratio: 16/10;
    min-height: 300px;
    overflow: hidden;
    cursor: grab;
}
.diagram-container:active {
    cursor: grabbing;
}

/* Controls */
.controls-wrapper {
    padding: 25px;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .controls-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.select-styled {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--slate-200);
    border-radius: 8px;
    background-color: #fff;
    font-size: 1rem;
    color: var(--slate-800);
    cursor: pointer;
    transition: border-color 0.2s;
}
.select-styled:focus {
    outline: none;
    border-color: var(--billy-blue);
}

/* Custom Checkbox */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--slate-800);
    user-select: none;
}
.toggle-label input {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--billy-blue);
    cursor: pointer;
}

.btn-reset {
    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;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-reset:hover { background: #f0f8f8; transform: translateY(-2px); }

/* 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;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}
.color-box {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}