Files
tutorialvault/src/styles/panels.css
Your Name 715c3c713a feat: add 15 UI enhancements
1. Mute toggle (M key + volume icon click)
2. Fullscreen shortcut (F key)
3. Seek feedback overlay (±5s flash with accumulation)
4. Playlist search/filter with clear button
5. Scroll-to-current button (IntersectionObserver)
6. Picture-in-Picture button
7. Timestamp insertion in notes
8. Keyboard shortcut help panel (? key)
9. Playback speed shortcuts ([ and ] keys)
10. Reset progress two-click confirmation
11. Video load error state overlay
12. Double-click video to fullscreen
13. Playlist stats in header (count + done)
14. Mini progress bars per playlist item
15. Collapsible dock panes with chevron icons

All enhancements are WCAG 2.2 AAA compliant with proper
aria-labels, aria-live regions, focus-visible states,
keyboard accessibility, and 44x44 touch targets.
2026-02-19 17:01:01 +02:00

193 lines
8.7 KiB
CSS

.panel{border:1px solid var(--stroke); border-radius:var(--r); background:var(--surface); box-shadow:var(--shadow3); overflow:hidden; min-height:0; display:flex; flex-direction:column; transition:border-color .3s ease;}
.panel:hover{border-color:rgba(140,160,210,.10);}
.panel::after{display:none;}
.panelHeader{padding:10px 12px 8px; border-bottom:1px solid rgba(140,160,210,.04); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex:0 0 auto; min-width:0; background:rgba(140,165,220,.015); transition:background .3s ease;}
.panelHeader:hover{background:rgba(140,165,220,.025);}
.panelHeader::after{display:none;}
.nowTitle{font-family:var(--brand); font-weight:700; font-size:14px; letter-spacing:-.01em; max-width:60ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:color .2s ease;}
.nowTitle:hover{color:rgba(235,240,252,.98);}
.nowSub{margin-top:4px; color:var(--textMuted); font-size:11px; font-family:var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:80ch; transition:color .2s ease;}
.dividerWrap{display:flex; align-items:stretch; justify-content:center;}
.divider{width:10px; cursor:col-resize; position:relative; background:transparent; border:none;}
.divider::after{
content:""; position:absolute; top:50%; left:50%;
width:4px; height:54px; transform:translate(-50%,-50%);
border-radius:999px;
background:
radial-gradient(circle, rgba(140,165,220,.10) 35%, transparent 40%) 0 0/4px 12px,
radial-gradient(circle, rgba(140,165,220,.10) 35%, transparent 40%) 0 6px/4px 12px;
opacity:.20; pointer-events:none; transition:opacity .3s var(--ease-spring), height .3s var(--ease-spring);
}
.divider:hover::after{opacity:.55; height:72px;}
.divider:active::after{opacity:.70;}
.dock{flex:1 1 auto; min-height:0; border-top:1px solid rgba(140,160,210,.04); display:grid; grid-template-columns:62% 10px 38%; background:rgba(0,0,0,.06); overflow:hidden;}
.dockPane{min-height:0; display:flex; flex-direction:column; overflow:hidden;}
.dockInner{padding:10px; min-height:0; display:flex; flex-direction:column; gap:8px; height:100%;}
.dockHeader{padding:10px 12px 9px; border:none; border-radius:var(--r2); display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--surface-2); flex:0 0 auto; transition:background .2s ease;}
.dockHeader:hover{background:var(--surface-3);}
#notesHeader{border-bottom-right-radius:7px;}
#infoHeader{border-bottom-left-radius:7px; margin-right:12px;}
.dockTitle{font-family:var(--brand); font-weight:700; letter-spacing:0; font-size:13px; color:rgba(218,225,240,.92); display:flex; align-items:center; gap:10px; transition:color .2s ease;}
.dockHeader:hover .dockTitle{color:rgba(235,240,252,.98);}
.dockTitle .fa{color:var(--iconStrong)!important; opacity:.88; font-size:14px; transition:transform .3s var(--ease-bounce), opacity .2s ease;}
.dockHeader:hover .dockTitle .fa{transform:scale(1.12) rotate(-5deg); opacity:1;}
.notesArea{flex:1 1 auto; min-height:0; overflow:hidden; position:relative;}
.notesSaved{
position:absolute;
bottom:12px; right:12px;
padding:6px 10px;
border-radius:var(--r2);
background:rgba(130,170,130,.12);
border:none;
color:rgba(160,195,160,.88);
font-size:11px;
font-weight:700;
letter-spacing:.02em;
display:flex; align-items:center; gap:6px;
opacity:0;
transform:translateY(4px) scale(.95);
transition:opacity .4s ease, transform .4s var(--ease-bounce);
pointer-events:none;
}
.notesSaved.show{
opacity:1;
transform:translateY(0) scale(1);
}
.notesSaved .fa{font-size:10px; color:rgba(150,190,150,.88)!important; transition:transform .3s var(--ease-bounce);}
.notesSaved.show .fa{animation:checkBounce .5s var(--ease-bounce);}
@keyframes checkBounce{
0%{transform:scale(0) rotate(-45deg);}
60%{transform:scale(1.3) rotate(5deg);}
100%{transform:scale(1) rotate(0);}
}
.notes{width:100%; height:100%; resize:none; border-radius:var(--r3); border:1px solid transparent; background:var(--surface-0); color:rgba(218,225,240,.90); padding:10px 12px; outline:none; font-family:var(--sans); font-size:13px; line-height:1.45; letter-spacing:0; box-shadow:var(--shadowInset); overflow:auto; scrollbar-width:thin; scrollbar-color:rgba(140,160,210,.10) transparent; transition:border-color .25s ease, box-shadow .25s ease, background .2s ease;}
.notes:hover{background:rgba(140,165,220,.03);}
.notes:focus{border-color:rgba(136,164,196,.25); box-shadow:var(--shadowInset), 0 0 0 2px rgba(136,164,196,.12);}
.notes::-webkit-scrollbar{width:2px; height:2px;}
.notes::-webkit-scrollbar-track{background:transparent;}
.notes::-webkit-scrollbar-thumb{background:rgba(140,160,210,.10); border-radius:0;}
.notes::-webkit-scrollbar-button{width:0; height:0; display:none;}
.notes::placeholder{color:rgba(155,170,200,.65); transition:color .2s ease;}
.notes:focus::placeholder{color:rgba(148,162,192,.25);}
.infoGrid{
flex:1 1 auto;
min-height:0;
overflow:auto;
padding-right:12px;
padding-top:8px;
padding-bottom:8px;
scrollbar-width:none;
--fade-top:30px;
--fade-bottom:30px;
mask-image:linear-gradient(180deg, transparent 0%, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
-webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
transition:--fade-top 0.8s ease, --fade-bottom 0.8s ease;
}
@property --fade-top {
syntax: '<length>';
initial-value: 30px;
inherits: false;
}
@property --fade-bottom {
syntax: '<length>';
initial-value: 30px;
inherits: false;
}
.infoGrid.at-top{--fade-top:0px;}
.infoGrid.at-bottom{--fade-bottom:0px;}
.infoGrid::-webkit-scrollbar{width:0; height:0;}
dl.kv{margin:0;}
dl.kv dt,dl.kv dd{margin:0; padding:0;}
.kv{
display:grid;
grid-template-columns:78px 1fr;
gap:3px 12px;
align-items:baseline;
padding:10px 12px;
border-radius:var(--r3);
border:none;
background:rgba(10,13,20,.45);
margin-bottom:6px;
transition:background .2s ease;
}
.kv:hover{background:rgba(10,13,20,.55);}
.k{
font-family:var(--sans);
font-size:10px;
font-weight:700;
text-transform:uppercase;
letter-spacing:.08em;
color:var(--textDim);
padding-top:3px;
white-space:nowrap;
transition:color .2s ease;
}
.kv:hover .k{color:rgba(148,162,192,.50);}
.v{
font-family:var(--brand);
font-size:13px;
font-weight:600;
color:var(--text);
letter-spacing:-.01em;
word-break:break-word;
overflow-wrap:anywhere;
line-height:1.35;
padding-left:6px;
transition:color .2s ease;
}
.kv:hover .v{color:rgba(230,235,248,.95);}
.v.mono{
font-family:var(--mono);
font-size:11px;
font-weight:400;
color:var(--textMuted);
letter-spacing:.02em;
font-variant-numeric:tabular-nums;
background:var(--accentBg);
padding:2px 6px;
border-radius:3px;
margin:-2px 0;
transition:background .2s ease, color .2s ease;
}
.kv:hover .v.mono{background:rgba(136,164,196,.09); color:rgba(170,185,215,.70);}
.dockDividerWrap{display:flex; align-items:stretch; justify-content:center;}
.dockDivider{width:10px; cursor:col-resize; position:relative; background:transparent; border:none;}
.dockDivider::after{
content:""; position:absolute; top:50%; left:50%;
width:4px; height:44px; transform:translate(-50%,-50%);
border-radius:999px;
background:
radial-gradient(circle, rgba(140,165,220,.10) 35%, transparent 40%) 0 0/4px 12px,
radial-gradient(circle, rgba(140,165,220,.10) 35%, transparent 40%) 0 6px/4px 12px;
opacity:.18; pointer-events:none; transition:opacity .3s var(--ease-spring), height .3s var(--ease-spring);
}
.dockDivider:hover::after{opacity:.50; height:60px;}
.dockDivider:active::after{opacity:.65;}
/* Timestamp button */
.timestampBtn{border:none; background:transparent; padding:0; margin:0 0 0 auto; cursor:pointer; display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:var(--r3); transition:all .2s var(--ease-bounce);}
.timestampBtn:hover{background:var(--surface-3); transform:scale(1.1);}
.timestampBtn:active{transform:scale(.9); transition-duration:.08s;}
.timestampBtn .fa{font-size:12px; color:var(--iconStrong)!important; opacity:.75; transition:opacity .15s ease;}
.timestampBtn:hover .fa{opacity:1;}
.timestampBtn:focus-visible{outline:2px solid rgba(136,164,196,.45); outline-offset:1px;}
/* Dock chevron */
.dockChevron{font-size:10px; color:var(--textDim); transition:transform .25s var(--ease-bounce), color .2s ease; margin-left:4px; flex:0 0 auto;}
.dockHeader:hover .dockChevron{color:var(--textMuted);}
/* Collapsible dock pane */
.dockPane.collapsed{flex:0 0 auto !important;}
.dockPane.collapsed .notesArea,
.dockPane.collapsed .infoGrid{display:none;}
/* Reset confirm state */
.toolbarBtn.confirming{background:rgba(255,70,70,.14);}
.toolbarBtn.confirming .fa{color:rgba(255,160,100,.9)!important;}