53ff08f45e
- API-Host dynamisch vom Seiten-URI abgeleitet (nicht mehr hardcoded) - Lade-Overlay mit Spinner beim Start und bei Verbindungsproblemen - Footer/Rundenverlauf entfernt, Scoreboard füllt jetzt die ganze Seite - Team-Panels sind klickbar (Single-Click = Punkt, Double-Click = nächste Runde) - Verbindungszustand mit grünem/rotem Dot angezeigt - CSS neu strukturiert, Duplikate entfernt
562 lines
11 KiB
CSS
562 lines
11 KiB
CSS
/* ========================================
|
||
goSportpunktetafel – Stylesheet
|
||
Dunkles, kontrastreiches Design
|
||
======================================== */
|
||
|
||
/* ---------- CSS Custom Properties ---------- */
|
||
:root {
|
||
--bg-primary: #0a0a1a;
|
||
--bg-secondary: #12122a;
|
||
--bg-tertiary: #1a1a3e;
|
||
--bg-card: #16163a;
|
||
|
||
--text-primary: #f0f0ff;
|
||
--text-secondary: #a0a0cc;
|
||
--text-muted: #606090;
|
||
|
||
--team-red: #ff2244;
|
||
--team-red-dim: #aa1133;
|
||
--team-red-glow: rgba(255, 34, 68, 0.4);
|
||
--team-red-bg: rgba(255, 34, 68, 0.08);
|
||
|
||
--team-green: #22dd55;
|
||
--team-green-dim: #11aa33;
|
||
--team-green-glow: rgba(34, 221, 85, 0.4);
|
||
--team-green-bg: rgba(34, 221, 85, 0.08);
|
||
|
||
--accent-gold: #ffcc00;
|
||
--accent-gold-dim: #b38f00;
|
||
|
||
--border-color: #2a2a55;
|
||
--border-radius: 8px;
|
||
--border-radius-lg: 12px;
|
||
|
||
--font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
|
||
|
||
--score-size: clamp(60px, 15vw, 140px);
|
||
--label-size: clamp(20px, 4vw, 42px);
|
||
--header-title-size: clamp(14px, 2.5vw, 24px);
|
||
--round-text-size: clamp(14px, 2.5vw, 22px);
|
||
|
||
--transition-speed: 0.2s;
|
||
--transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||
}
|
||
|
||
/* ---------- Reset & Base ---------- */
|
||
*, *::before, *::after {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
html {
|
||
font-size: 16px;
|
||
-webkit-text-size-adjust: 100%;
|
||
-webkit-tap-highlight-color: transparent;
|
||
touch-action: manipulation;
|
||
}
|
||
|
||
body {
|
||
font-family: var(--font-family);
|
||
background-color: var(--bg-primary);
|
||
color: var(--text-primary);
|
||
min-height: 100vh;
|
||
min-height: 100dvh;
|
||
overflow: hidden;
|
||
line-height: 1.4;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
|
||
/* ---------- Fullscreen Container ---------- */
|
||
.fullscreen-container {
|
||
display: grid;
|
||
grid-template-rows: auto 1fr;
|
||
height: 100vh;
|
||
height: 100dvh;
|
||
max-width: 100vw;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* ---------- Header ---------- */
|
||
.app-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 8px 16px;
|
||
background: var(--bg-secondary);
|
||
border-bottom: 1px solid var(--border-color);
|
||
min-height: 60px;
|
||
gap: 12px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.header-left,
|
||
.header-right {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.header-center {
|
||
flex: 1;
|
||
text-align: center;
|
||
}
|
||
|
||
.app-title {
|
||
font-size: var(--header-title-size);
|
||
font-weight: 700;
|
||
letter-spacing: 0.5px;
|
||
white-space: nowrap;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.round-display {
|
||
font-size: var(--round-text-size);
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ---------- Buttons ---------- */
|
||
.fullscreen-btn,
|
||
.reset-btn {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 8px 14px;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
background: var(--bg-tertiary);
|
||
color: var(--text-primary);
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
transition: background var(--transition-speed), border-color var(--transition-speed), transform var(--transition-speed);
|
||
-webkit-tap-highlight-color: transparent;
|
||
min-height: 40px;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.fullscreen-btn:hover,
|
||
.reset-btn:hover {
|
||
background: var(--border-color);
|
||
border-color: var(--text-muted);
|
||
}
|
||
|
||
.fullscreen-btn:active,
|
||
.reset-btn:active {
|
||
transform: scale(0.96);
|
||
}
|
||
|
||
.icon {
|
||
width: 20px;
|
||
height: 20px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.icon-sm {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
|
||
/* ---------- Error Banner ---------- */
|
||
.error-banner {
|
||
background: rgba(255, 50, 50, 0.15);
|
||
border-bottom: 1px solid rgba(255, 50, 50, 0.4);
|
||
color: #ff6b6b;
|
||
text-align: center;
|
||
padding: 8px 16px;
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
animation: errorShake 0.3s ease-in-out;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.error-banner.hidden {
|
||
display: none;
|
||
}
|
||
|
||
@keyframes errorShake {
|
||
0%, 100% { transform: translateX(0); }
|
||
25% { transform: translateX(-4px); }
|
||
75% { transform: translateX(4px); }
|
||
}
|
||
|
||
/* ---------- Scoreboard ---------- */
|
||
.scoreboard {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 0;
|
||
padding: 0;
|
||
min-height: 0;
|
||
height: 100%;
|
||
}
|
||
|
||
/* ---------- Team Panel ---------- */
|
||
.team-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 20px 16px;
|
||
border-radius: 0;
|
||
position: relative;
|
||
overflow: hidden;
|
||
transition: box-shadow var(--transition-speed);
|
||
cursor: pointer;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
height: 100%;
|
||
}
|
||
|
||
.team-panel::before {
|
||
content: '';
|
||
position: absolute;
|
||
inset: 0;
|
||
opacity: 0.03;
|
||
border-radius: inherit;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.team-panel:hover::before {
|
||
opacity: 0.08;
|
||
}
|
||
|
||
.team-panel:active::before {
|
||
opacity: 0.15;
|
||
}
|
||
|
||
.team-panel:active {
|
||
transform: scale(0.99);
|
||
}
|
||
|
||
/* Red Team */
|
||
.red-team {
|
||
background: var(--team-red-bg);
|
||
border-right: 2px solid var(--border-color);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.red-team::before {
|
||
background: linear-gradient(135deg, var(--team-red) 0%, transparent 60%);
|
||
}
|
||
|
||
/* Green Team */
|
||
.green-team {
|
||
background: var(--team-green-bg);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.green-team::before {
|
||
background: linear-gradient(225deg, var(--team-green) 0%, transparent 60%);
|
||
}
|
||
|
||
/* Color bar on top */
|
||
.team-color-bar {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 4px;
|
||
}
|
||
|
||
.red-team .team-color-bar {
|
||
background: linear-gradient(90deg, var(--team-red-dim), var(--team-red), var(--team-red-dim));
|
||
}
|
||
|
||
.green-team .team-color-bar {
|
||
background: linear-gradient(90deg, var(--team-green-dim), var(--team-green), var(--team-green-dim));
|
||
}
|
||
|
||
/* Team Label */
|
||
.team-label {
|
||
font-size: var(--label-size);
|
||
font-weight: 700;
|
||
letter-spacing: 3px;
|
||
text-transform: uppercase;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.red-team .team-label {
|
||
color: var(--team-red);
|
||
}
|
||
|
||
.green-team .team-label {
|
||
color: var(--team-green);
|
||
}
|
||
|
||
/* Score Value */
|
||
.score-value {
|
||
display: block;
|
||
font-size: var(--score-size);
|
||
font-weight: 800;
|
||
line-height: 1;
|
||
font-variant-numeric: tabular-nums;
|
||
letter-spacing: -1px;
|
||
color: var(--text-primary);
|
||
transition: color var(--transition-speed);
|
||
}
|
||
|
||
/* Points indicator */
|
||
.last-points {
|
||
font-size: clamp(12px, 1.8vw, 16px);
|
||
color: var(--text-secondary);
|
||
margin-top: 8px;
|
||
font-weight: 500;
|
||
min-height: 1.4em;
|
||
}
|
||
|
||
/* ---------- Flash Animation for Score Updates ---------- */
|
||
@keyframes scoreFlashRed {
|
||
0% { transform: scale(1); color: var(--text-primary); }
|
||
30% { transform: scale(1.15); color: #fff; }
|
||
100% { transform: scale(1); color: var(--text-primary); }
|
||
}
|
||
|
||
@keyframes scoreFlashGreen {
|
||
0% { transform: scale(1); color: var(--text-primary); }
|
||
30% { transform: scale(1.15); color: #fff; }
|
||
100% { transform: scale(1); color: var(--text-primary); }
|
||
}
|
||
|
||
.flash-red {
|
||
animation: scoreFlashRed 0.4s ease-out;
|
||
}
|
||
|
||
.flash-green {
|
||
animation: scoreFlashGreen 0.4s ease-out;
|
||
}
|
||
|
||
/* ---------- Loading Spinner ---------- */
|
||
.loading-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 2000;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--bg-primary);
|
||
gap: 24px;
|
||
}
|
||
|
||
.loading-overlay.hidden {
|
||
display: none;
|
||
}
|
||
|
||
.loading-spinner {
|
||
width: 64px;
|
||
height: 64px;
|
||
border: 4px solid var(--border-color);
|
||
border-top-color: var(--accent-gold);
|
||
border-radius: 50%;
|
||
animation: spin 1s linear infinite;
|
||
}
|
||
|
||
@keyframes spin {
|
||
to { transform: rotate(360deg); }
|
||
}
|
||
|
||
.loading-text {
|
||
font-size: 16px;
|
||
color: var(--text-secondary);
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* ---------- Connection Status ---------- */
|
||
.connection-status {
|
||
position: fixed;
|
||
bottom: 4px;
|
||
right: 8px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
padding: 4px 8px;
|
||
border-radius: 4px;
|
||
background: rgba(10, 10, 26, 0.8);
|
||
z-index: 100;
|
||
}
|
||
|
||
.status-dot {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
background: var(--text-muted);
|
||
flex-shrink: 0;
|
||
transition: background var(--transition-speed);
|
||
}
|
||
|
||
.status-dot.connected {
|
||
background: var(--team-green);
|
||
box-shadow: 0 0 4px var(--team-green-glow);
|
||
}
|
||
|
||
.status-dot.disconnected {
|
||
background: var(--team-red);
|
||
box-shadow: 0 0 4px var(--team-red-glow);
|
||
}
|
||
|
||
/* ---------- Modal / Dialog ---------- */
|
||
.modal-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 1000;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: rgba(0, 0, 0, 0.7);
|
||
backdrop-filter: blur(4px);
|
||
-webkit-backdrop-filter: blur(4px);
|
||
padding: 20px;
|
||
}
|
||
|
||
.modal-overlay.hidden {
|
||
display: none;
|
||
}
|
||
|
||
.modal-dialog {
|
||
background: var(--bg-secondary);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius-lg);
|
||
padding: 32px;
|
||
max-width: 380px;
|
||
width: 100%;
|
||
text-align: center;
|
||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
.modal-title {
|
||
font-size: 20px;
|
||
font-weight: 700;
|
||
margin-bottom: 12px;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.modal-text {
|
||
font-size: 14px;
|
||
color: var(--text-secondary);
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.modal-actions {
|
||
display: flex;
|
||
gap: 12px;
|
||
justify-content: center;
|
||
}
|
||
|
||
.modal-btn {
|
||
padding: 12px 24px;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
transition: all var(--transition-speed);
|
||
min-width: 100px;
|
||
font-family: inherit;
|
||
min-height: 44px;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
|
||
.modal-btn-secondary {
|
||
background: var(--bg-tertiary);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.modal-btn-secondary:hover {
|
||
background: var(--border-color);
|
||
}
|
||
|
||
.modal-btn-danger {
|
||
background: var(--team-red);
|
||
color: #fff;
|
||
border-color: var(--team-red);
|
||
}
|
||
|
||
.modal-btn-danger:hover {
|
||
background: var(--team-red-dim);
|
||
border-color: var(--team-red-dim);
|
||
}
|
||
|
||
/* ---------- Hidden Utility ---------- */
|
||
.hidden {
|
||
display: none !important;
|
||
}
|
||
|
||
/* ---------- Responsive ---------- */
|
||
|
||
/* Small phones */
|
||
@media (max-width: 480px) {
|
||
.app-header {
|
||
padding: 6px 10px;
|
||
min-height: 48px;
|
||
}
|
||
|
||
.app-title {
|
||
font-size: 13px;
|
||
}
|
||
|
||
.round-display {
|
||
font-size: 12px;
|
||
}
|
||
|
||
.fullscreen-btn span,
|
||
.reset-btn span {
|
||
display: none;
|
||
}
|
||
|
||
.fullscreen-btn,
|
||
.reset-btn {
|
||
padding: 8px 10px;
|
||
}
|
||
}
|
||
|
||
/* Large screens / tablets */
|
||
@media (min-width: 768px) {
|
||
.app-header {
|
||
padding: 12px 32px;
|
||
min-height: 72px;
|
||
}
|
||
}
|
||
|
||
/* Landscape mobile */
|
||
@media (max-height: 500px) and (orientation: landscape) {
|
||
.app-header {
|
||
min-height: 40px;
|
||
padding: 4px 16px;
|
||
}
|
||
|
||
.round-display {
|
||
font-size: 14px;
|
||
}
|
||
|
||
.scoreboard {
|
||
padding: 8px;
|
||
gap: 0;
|
||
}
|
||
|
||
.team-panel {
|
||
padding: 10px 8px;
|
||
}
|
||
}
|
||
|
||
/* ---------- Prefers reduced motion ---------- */
|
||
@media (prefers-reduced-motion: reduce) {
|
||
:root {
|
||
--transition-speed: 0.01s;
|
||
}
|
||
|
||
.flash-red,
|
||
.flash-green {
|
||
animation-duration: 0.1s;
|
||
}
|
||
|
||
.rounds-list {
|
||
scroll-behavior: auto;
|
||
}
|
||
}
|