/* Base Reset & Variables from Demo App */
html, body { 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    background: #f4f7f6; 
    font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
* { box-sizing: border-box; }

: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;
    --green-500: #22c55e;
}

#billy-notes-wrapper {
    line-height: 1.6; 
    color: #333; 
    width: 100%; 
    max-width: 900px;
    margin: 0 auto; 
    padding: 20px; 
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* 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; }
.zh-inline { color: #666; font-size: 0.85em; font-weight: normal; margin-left: 4px; }

/* 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: 15px 25px;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

/* Sliders */
input[type=range] {
    -webkit-appearance: none; 
    width: 100%; 
    background: transparent; 
    margin: 10px 0;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
}
.slider-blue::-webkit-slider-thumb { background: var(--blue-500) !important; }
.slider-red::-webkit-slider-thumb { background: var(--red-500) !important; }
.slider-gray::-webkit-slider-thumb { background: var(--slate-500) !important; }

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--slate-200);
    border-radius: 3px;
}

/* Controls */
button.btn-start {
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: linear-gradient(135deg, #F5A623 0%, #F76B1C 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(245, 166, 35, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
button.btn-start.paused {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}
button.btn-start:hover { transform: translateY(-2px); }
button.btn-start:active { transform: scale(0.98); }
button.btn-start .zh-text { color: rgba(255,255,255,0.9); margin-top: 2px; }

button.btn-reset {
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 2px solid var(--billy-blue);
    color: var(--billy-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
button.btn-reset:hover { background: #f0f8f8; transform: translateY(-2px); }
button.btn-reset:active { transform: scale(0.98); }
button.btn-reset .zh-text { color: var(--billy-blue); margin-top: 2px; }

.no-select { user-select: none; -webkit-user-select: none; }

/* Custom Checkbox */
.custom-checkbox {
    accent-color: var(--billy-blue);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #billy-notes-wrapper { padding: 10px; }
    .card-header { flex-direction: column; gap: 10px; align-items: flex-start; }
}