379 lines
11 KiB
CSS
379 lines
11 KiB
CSS
/* Display mode — full-screen TV layout. Replaces layout.css + components.css entirely. */
|
|
|
|
/* ── Display mode typography scale ──────────────────────────────────────── */
|
|
:root {
|
|
--display-font-primary: 96px;
|
|
--display-font-secondary: 48px;
|
|
--display-font-label: 32px;
|
|
--display-font-body: 28px;
|
|
}
|
|
|
|
/* ── Full-screen shell ────────────────────────────────────────────────────── */
|
|
html, body {
|
|
width: 100vw;
|
|
height: 100dvh;
|
|
overflow: hidden;
|
|
background: var(--display-bg);
|
|
color: var(--display-text);
|
|
cursor: none;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
.display-container {
|
|
width: 100vw;
|
|
height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
background-color: var(--display-bg);
|
|
transition: background-color var(--transition-phase);
|
|
}
|
|
.phase-work { background-color: #061a0e; }
|
|
.phase-rest { background-color: #1a0606; }
|
|
.phase-move { background-color: #1a1300; }
|
|
.phase-idle { background-color: var(--display-bg); }
|
|
|
|
/* ── Status bar (top strip — LAP/EX/SET only) ────────────────────────────── */
|
|
.display-status-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
padding: var(--space-4) var(--space-8);
|
|
height: 64px;
|
|
flex-shrink: 0;
|
|
}
|
|
.display-status-right {
|
|
display: flex;
|
|
gap: var(--space-8);
|
|
font-size: var(--display-font-label);
|
|
font-weight: var(--weight-semibold);
|
|
color: #ffffff;
|
|
}
|
|
|
|
/* ── Main timer display ───────────────────────────────────────────────────── */
|
|
.display-main {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 var(--space-8);
|
|
text-align: center;
|
|
}
|
|
|
|
/* ── Radial pie analog clock ──────────────────────────────────────────────── */
|
|
|
|
/* CSS grid stacks SVG + timer text in the same cell so both are centered */
|
|
.display-pie-wrapper {
|
|
display: grid;
|
|
place-items: center;
|
|
width: min(55vw, 55vh);
|
|
height: min(55vw, 55vh);
|
|
}
|
|
|
|
.display-pie-svg {
|
|
grid-area: 1 / 1;
|
|
width: 100%;
|
|
height: 100%;
|
|
transform: rotate(-90deg); /* arc starts at 12 o'clock */
|
|
pointer-events: none;
|
|
}
|
|
|
|
.display-pie-track {
|
|
fill: none;
|
|
stroke: rgba(255, 255, 255, 0.07);
|
|
stroke-width: 20;
|
|
}
|
|
|
|
/* Fill ring — grows from empty to full as the phase elapses.
|
|
Color is set per phase via the container class on .display-container. */
|
|
.display-pie-fill {
|
|
fill: none;
|
|
stroke-width: 20;
|
|
stroke-linecap: round;
|
|
stroke: rgba(255, 255, 255, 0.4);
|
|
transition: stroke-dashoffset 1s linear, stroke var(--transition-phase);
|
|
}
|
|
|
|
.phase-work .display-pie-fill { stroke: var(--color-work); }
|
|
.phase-rest .display-pie-fill { stroke: var(--color-rest); }
|
|
.phase-move .display-pie-fill { stroke: var(--color-move); }
|
|
|
|
/* ── Phase label (below the ring) ────────────────────────────────────────── */
|
|
.display-phase-label {
|
|
font-size: var(--display-font-secondary);
|
|
font-weight: var(--weight-bold);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
margin-top: var(--space-6);
|
|
color: rgba(255, 255, 255, 0.5);
|
|
transition: color var(--transition-phase);
|
|
}
|
|
.phase-work .display-phase-label { color: var(--color-work); }
|
|
.phase-rest .display-phase-label { color: var(--color-rest); }
|
|
.phase-move .display-phase-label { color: var(--color-move); }
|
|
.phase-warning .display-phase-label { color: var(--color-warning); }
|
|
|
|
.display-timer {
|
|
grid-area: 1 / 1; /* sits in same grid cell as the SVG */
|
|
position: relative;
|
|
z-index: 1;
|
|
font-size: var(--display-font-primary);
|
|
font-weight: var(--weight-black);
|
|
line-height: 1;
|
|
letter-spacing: -2px;
|
|
transition: color var(--transition-phase);
|
|
font-variant-numeric: tabular-nums;
|
|
text-align: center;
|
|
}
|
|
|
|
.display-exercise {
|
|
font-size: var(--display-font-label);
|
|
font-weight: var(--weight-bold);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
margin-top: var(--space-6);
|
|
color: var(--text-secondary);
|
|
transition: color var(--transition-phase);
|
|
}
|
|
|
|
.display-total-time {
|
|
font-size: var(--display-font-body);
|
|
color: var(--text-muted);
|
|
margin-top: var(--space-8);
|
|
}
|
|
|
|
/* ── Phase colors ─────────────────────────────────────────────────────────── */
|
|
.phase-work .display-timer { color: var(--color-work); }
|
|
.phase-rest .display-timer { color: var(--color-rest); }
|
|
.phase-move .display-timer { color: var(--color-move); }
|
|
.phase-idle .display-timer { color: var(--color-idle); }
|
|
.phase-warning .display-timer { color: var(--color-warning); }
|
|
.phase-complete .display-timer { color: var(--display-text); }
|
|
|
|
.phase-work .display-status-label { color: var(--color-work); }
|
|
.phase-rest .display-status-label { color: var(--color-rest); }
|
|
.phase-move .display-status-label { color: var(--color-move); }
|
|
.phase-idle .display-status-label { color: var(--color-idle); }
|
|
.phase-warning .display-status-label { color: var(--color-warning); }
|
|
|
|
/* ── Workout video pane grid ─────────────────────────────────────────────── */
|
|
.display-video-grid {
|
|
flex: 1;
|
|
display: grid;
|
|
gap: 3px;
|
|
background: #000;
|
|
min-height: 0;
|
|
}
|
|
.display-video-grid.panes-1 {
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: 1fr;
|
|
}
|
|
.display-video-grid.panes-2 {
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: 1fr;
|
|
}
|
|
.display-video-grid.panes-3,
|
|
.display-video-grid.panes-4 {
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: 1fr 1fr;
|
|
}
|
|
|
|
.display-pane {
|
|
position: relative;
|
|
background: #111;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
.display-pane-video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
.display-pane-missing {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: rgba(255,255,255,0.3);
|
|
font-size: var(--display-font-label);
|
|
}
|
|
.display-pane-corner {
|
|
position: absolute;
|
|
bottom: var(--space-4);
|
|
right: var(--space-5);
|
|
font-size: var(--display-font-primary);
|
|
font-weight: var(--weight-black);
|
|
color: #fff;
|
|
text-shadow: 0 2px 12px rgba(0,0,0,0.9);
|
|
line-height: 1;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.display-no-videos {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--display-font-body);
|
|
color: rgba(255,255,255,0.4);
|
|
}
|
|
|
|
/* ── CrossFit display ────────────────────────────────────────────────────── */
|
|
.display-crossfit-list {
|
|
width: 100%;
|
|
max-width: 760px;
|
|
list-style: none;
|
|
counter-reset: cf-counter;
|
|
}
|
|
.display-crossfit-item {
|
|
display: flex;
|
|
gap: var(--space-5);
|
|
padding: var(--space-4) 0;
|
|
font-size: var(--display-font-body);
|
|
font-weight: var(--weight-medium);
|
|
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
counter-increment: cf-counter;
|
|
}
|
|
.display-crossfit-item:last-child { border-bottom: none; }
|
|
.display-crossfit-item::before {
|
|
content: counter(cf-counter) ".";
|
|
font-weight: var(--weight-bold);
|
|
color: var(--color-primary);
|
|
min-width: 32px;
|
|
}
|
|
|
|
/* ── Coach touch zones (invisible on TV) ────────────────────────────────── */
|
|
.touch-zone {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 80px;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
.touch-zone-left { left: 0; }
|
|
.touch-zone-right { right: 0; }
|
|
|
|
/* ── Pause menu overlay ──────────────────────────────────────────────────── */
|
|
.display-pause-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.78);
|
|
display: none;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: var(--z-modal);
|
|
}
|
|
.display-pause-overlay.visible { display: flex; }
|
|
|
|
.display-pause-menu {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-5);
|
|
width: 420px;
|
|
max-width: 80vw;
|
|
}
|
|
|
|
.display-pause-btn {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 2px solid rgba(255, 255, 255, 0.25);
|
|
color: #ffffff;
|
|
font-size: var(--display-font-label);
|
|
font-weight: var(--weight-bold);
|
|
padding: var(--space-5) var(--space-8);
|
|
border-radius: var(--radius-lg);
|
|
cursor: pointer;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
transition: background var(--transition-fast), border-color var(--transition-fast);
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
.display-pause-btn:hover,
|
|
.display-pause-btn:active {
|
|
background: rgba(255, 255, 255, 0.18);
|
|
border-color: rgba(255, 255, 255, 0.55);
|
|
}
|
|
.display-pause-btn-stop {
|
|
border-color: rgba(255, 68, 68, 0.4);
|
|
color: var(--color-rest);
|
|
}
|
|
.display-pause-btn-stop:hover,
|
|
.display-pause-btn-stop:active {
|
|
background: rgba(255, 68, 68, 0.15);
|
|
border-color: var(--color-rest);
|
|
}
|
|
|
|
/* ── Done / stopped overlay ─────────────────────────────────────────────── */
|
|
.display-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(10, 10, 10, 0.96);
|
|
display: none;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-6);
|
|
z-index: var(--z-modal); /* above the grid timer (z-index:1) */
|
|
}
|
|
.display-overlay.visible { display: flex; }
|
|
.display-overlay-title {
|
|
font-size: var(--display-font-primary);
|
|
font-weight: var(--weight-black);
|
|
color: var(--color-complete);
|
|
}
|
|
.display-overlay-sub {
|
|
font-size: var(--display-font-label);
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* ── Offline banners ─────────────────────────────────────────────────────── */
|
|
.display-offline-banner {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(26,26,26,0.85);
|
|
border: 1px solid var(--color-warning-ui);
|
|
border-radius: 0 0 var(--radius-md) var(--radius-md);
|
|
padding: var(--space-2) var(--space-6);
|
|
font-size: var(--display-font-body);
|
|
color: var(--color-warning-ui);
|
|
z-index: var(--z-overlay);
|
|
pointer-events: none;
|
|
display: none;
|
|
}
|
|
.display-offline-banner.visible { display: block; }
|
|
|
|
.display-local-indicator {
|
|
position: fixed;
|
|
bottom: var(--space-4);
|
|
right: var(--space-6);
|
|
font-size: 18px;
|
|
color: var(--color-warning-ui);
|
|
opacity: 0.7;
|
|
z-index: var(--z-overlay);
|
|
pointer-events: none;
|
|
display: none;
|
|
}
|
|
.display-local-indicator.visible { display: block; }
|
|
|
|
/* ── AirPlay keep-alive (imperceptible pulse) ────────────────────────────── */
|
|
@keyframes keepAlive {
|
|
0%, 100% { opacity: 0.995; }
|
|
50% { opacity: 1.0; }
|
|
}
|
|
.keep-alive {
|
|
position: fixed;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
animation: keepAlive 4s ease-in-out infinite;
|
|
z-index: -1;
|
|
}
|