:root {
  --bg: #060913;
  --panel: #0e1422;
  --muted: #9bb0d6;
  --red: #ff5c70;
  --green: #3ae29a;
  --blue: #2aa8f8;
  --gold: #f8d445;
  --silver: #c8d0e0;
  --bronze: #d58b3f;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --glow: 0 0 28px rgba(42, 168, 248, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: #f4f7ff;
  min-height: 100vh;
  letter-spacing: 0.01em;
  position: relative;
  overflow-x: hidden;
}

/* Animated background lights container */
.bg-lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}

.bg-light-1 {
  width: 500px;
  height: 500px;
  background: rgba(229, 92, 112, 0.25);
  animation: floatLight1 25s ease-in-out infinite, colorShift1 15s ease-in-out infinite;
}

.bg-light-2 {
  width: 600px;
  height: 600px;
  background: rgba(42, 168, 248, 0.3);
  animation: floatLight2 30s ease-in-out infinite, colorShift2 18s ease-in-out infinite;
}

.bg-light-3 {
  width: 450px;
  height: 450px;
  background: rgba(58, 226, 154, 0.25);
  animation: floatLight3 22s ease-in-out infinite, colorShift3 12s ease-in-out infinite;
}

@keyframes floatLight1 {
  0%, 100% { top: -10%; left: 5%; }
  25% { top: 20%; left: 25%; }
  50% { top: 10%; left: 50%; }
  75% { top: 30%; left: 15%; }
}

@keyframes floatLight2 {
  0%, 100% { top: -15%; right: -10%; left: auto; }
  25% { top: 25%; right: 20%; }
  50% { top: 40%; right: 40%; }
  75% { top: 15%; right: 10%; }
}

@keyframes floatLight3 {
  0%, 100% { bottom: -5%; left: 10%; top: auto; }
  25% { bottom: 20%; left: 40%; }
  50% { bottom: 10%; left: 60%; }
  75% { bottom: 25%; left: 25%; }
}

@keyframes colorShift1 {
  0%, 100% { background: rgba(229, 92, 112, 0.25); }
  33% { background: rgba(42, 168, 248, 0.25); }
  66% { background: rgba(58, 226, 154, 0.25); }
}

@keyframes colorShift2 {
  0%, 100% { background: rgba(42, 168, 248, 0.3); }
  33% { background: rgba(58, 226, 154, 0.3); }
  66% { background: rgba(229, 92, 112, 0.3); }
}

@keyframes colorShift3 {
  0%, 100% { background: rgba(58, 226, 154, 0.25); }
  33% { background: rgba(229, 92, 112, 0.25); }
  66% { background: rgba(42, 168, 248, 0.25); }
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.page {
  padding: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(135deg, rgba(42, 168, 248, 0.08), rgba(6, 9, 19, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 168, 248, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: #031225;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: var(--glow);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 0 22px rgba(42, 168, 248, 0.55);
}

.btn.secondary {
  background: linear-gradient(135deg, var(--red), #ff7a7a);
  color: white;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e6ecf5;
  box-shadow: none;
}

.btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e6ecf5;
  outline: none;
  font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(42, 168, 248, 0.2);
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.time-chip {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(42, 168, 248, 0.25);
  font-size: 1.05rem;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: 150ms ease;
}

.tab.active {
  color: #fff;
  border-color: rgba(42, 168, 248, 0.4);
  box-shadow: var(--glow);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(42, 168, 248, 0.12);
  color: #9ad4ff;
  font-weight: 700;
  font-size: 0.9rem;
}

.leaderboard {
  display: grid;
  gap: 8px;
}

.leaderboard .row {
  align-items: center;
}

.medal {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: pulse 2.4s ease-in-out infinite;
}

.medal.gold {
  background: radial-gradient(circle, #fff5c2, var(--gold));
  box-shadow: 0 0 12px rgba(248, 212, 69, 0.6);
}

.medal.silver {
  background: radial-gradient(circle, #f4f8ff, var(--silver));
  box-shadow: 0 0 12px rgba(200, 208, 224, 0.5);
}

.medal.bronze {
  background: radial-gradient(circle, #ffe1c2, var(--bronze));
  box-shadow: 0 0 12px rgba(213, 139, 63, 0.5);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.98);
  }
  50% {
    transform: scale(1.04);
  }
}

.slot {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(6, 9, 19, 0.92));
  box-shadow: var(--shadow);
  height: 220px;
}

.slot-track {
  position: absolute;
  width: 100%;
  animation: slotRoll 1.5s ease-out forwards;
}

@keyframes slotRoll {
  0% {
    transform: translateY(-100%);
  }
  60% {
    transform: translateY(12%);
  }
  100% {
    transform: translateY(0);
  }
}

.slot-item {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.slot-item img {
  width: 82px;
  height: 82px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: end;
}

.podium .stage {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px 12px 0 0;
  padding: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stage.gold {
  background: linear-gradient(180deg, rgba(248, 212, 69, 0.55), rgba(6, 9, 19, 0.9));
}

.stage.silver {
  background: linear-gradient(180deg, rgba(200, 208, 224, 0.55), rgba(6, 9, 19, 0.9));
}

.stage.bronze {
  background: linear-gradient(180deg, rgba(213, 139, 63, 0.55), rgba(6, 9, 19, 0.9));
}

.confetti {
  position: absolute;
  width: 8px;
  height: 14px;
  background: var(--gold);
  opacity: 0.9;
  top: -10px;
  animation: fall 3s linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(260px) rotate(240deg);
    opacity: 0;
  }
}

.error-banner {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(229, 72, 77, 0.4);
  background: rgba(229, 72, 77, 0.12);
  color: #ffb3b8;
  display: none;
  font-size: 1.05rem;
}

.error-banner.visible {
  display: block;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.label {
  color: var(--muted);
  font-size: 0.9rem;
}

.text-small {
  font-size: 0.9rem;
  color: var(--muted);
}

.preview-group {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.preview-group strong {
  color: var(--accent);
}

.group-preview {
  padding: 8px 12px;
  background: rgba(42, 168, 248, 0.1);
  border: 1px solid rgba(42, 168, 248, 0.2);
  border-radius: 8px;
  min-height: 20px;
}

.group-preview:empty {
  display: none;
}

.flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-option:has(input:checked) {
  background: rgba(42, 168, 248, 0.15);
  border-color: var(--accent);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.radio-option input[type="radio"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.radio-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

.radio-option span {
  font-size: 0.95rem;
  color: #e6ecf5;
}

.justify-between {
  justify-content: space-between;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-5 {
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: linear-gradient(135deg, #1a1d2e 0%, #0d0f1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.modal-body label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-body input,
.modal-body select {
  width: 100%;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-player-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-player-row select,
.modal-player-row input {
  width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(42, 168, 248, 0.12);
  color: #9ad4ff;
  font-weight: 700;
  font-size: 0.85rem;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Signage Optimierungen: maximale Lesbarkeit für TV/Beamer */
body[data-page="signage"] {
  font-size: 2.4rem;
  line-height: 1.5;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body[data-page="signage"] .signage-wrapper {
  padding: 30px 60px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: top left;
}

body[data-page="signage"] h1 {
  font-size: 3rem;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-shadow: 0 2px 24px rgba(42, 168, 248, 0.3);
}

body[data-page="signage"] h3 {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  font-weight: 700;
}

body[data-page="signage"] p {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 8px;
}

body[data-page="signage"] .card {
  padding: 40px;
  border-width: 2px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body[data-page="signage"] .grid {
  gap: 40px;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
}

body[data-page="signage"] .row {
  padding: 16px 24px;
  font-size: 1.8rem;
  border-width: 2px;
  border-radius: 20px;
}

body[data-page="signage"] .badge {
  font-size: 1.9rem;
  padding: 14px 28px;
}

body[data-page="signage"] .leaderboard {
  gap: 20px;
}

body[data-page="signage"] .leaderboard .row {
  background: rgba(255, 255, 255, 0.06);
  border-width: 2px;
}

body[data-page="signage"] .leaderboard .row strong {
  font-size: 2.6rem;
}

body[data-page="signage"] .leaderboard .row.rank-gold strong {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(248, 212, 69, 0.6);
  animation: rankGlow 2s ease-in-out infinite;
}

body[data-page="signage"] .leaderboard .row.rank-silver strong {
  color: var(--silver);
  text-shadow: 0 0 20px rgba(200, 208, 224, 0.5);
  animation: rankGlow 2s ease-in-out infinite 0.3s;
}

body[data-page="signage"] .leaderboard .row.rank-bronze strong {
  color: var(--bronze);
  text-shadow: 0 0 20px rgba(213, 139, 63, 0.5);
  animation: rankGlow 2s ease-in-out infinite 0.6s;
}

@keyframes rankGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

body[data-page="signage"] .slot {
  height: 400px;
  border-width: 3px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

body[data-page="signage"] .slot-reel {
  display: flex;
  flex-direction: column;
}

body[data-page="signage"] .slot-reel-item {
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-shrink: 0;
}

body[data-page="signage"] .slot-reel-item img {
  width: 160px;
  height: 160px;
}

body[data-page="signage"] .slot-reel-item .cup-name {
  font-size: 4rem;
  font-weight: 700;
}

body[data-page="signage"] .text-small {
  font-size: 1.8rem;
}

body[data-page="signage"] .podium {
  gap: 60px;
  padding: 40px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

body[data-page="signage"] .podium .stage {
  padding: 40px 32px;
  border-width: 3px;
  border-radius: 24px 24px 0 0;
}

body[data-page="signage"] .podium .stage strong {
  font-size: 3.5rem;
  display: block;
  margin-top: 20px;
}

body[data-page="signage"] .podium .stage .podium-rank {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 12px;
}

body[data-page="signage"] .podium .stage.gold .podium-rank {
  color: var(--gold);
  text-shadow: 0 4px 20px rgba(248, 212, 69, 0.7);
  animation: rankGlow 2s ease-in-out infinite;
}

body[data-page="signage"] .podium .stage.silver .podium-rank {
  color: var(--silver);
  text-shadow: 0 4px 20px rgba(200, 208, 224, 0.6);
  animation: rankGlow 2s ease-in-out infinite 0.3s;
}

body[data-page="signage"] .podium .stage.bronze .podium-rank {
  color: var(--bronze);
  text-shadow: 0 4px 20px rgba(213, 139, 63, 0.6);
  animation: rankGlow 2s ease-in-out infinite 0.6s;
}

body[data-page="signage"] .confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

body[data-page="signage"] .confetti-piece {
  position: absolute;
  width: 10px;
  height: 16px;
  top: -30px;
  border-radius: 2px;
  animation: confettiRain linear forwards;
}

@keyframes confettiRain {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: translateY(25vh) translateX(20px) rotate(180deg);
  }
  50% {
    transform: translateY(50vh) translateX(-10px) rotate(360deg);
  }
  75% {
    transform: translateY(75vh) translateX(15px) rotate(540deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) translateX(-5px) rotate(720deg);
    opacity: 0;
  }
}

body[data-page="signage"] .section {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-height: calc(100vh - 60px);
  overflow: hidden;
}

body[data-page="signage"] .header {
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
  flex-direction: column;
  flex-shrink: 0;
}

body[data-page="signage"] .card h3 {
  margin-bottom: 12px;
  flex-shrink: 0;
}

body[data-page="signage"] .card .list,
body[data-page="signage"] .card .leaderboard {
  overflow-y: auto;
  flex: 1;
}

body[data-page="signage"] #page-overview .leaderboard .row {
  padding: 10px 16px;
}

body[data-page="signage"] #page-overview .leaderboard .row strong {
  font-size: 1.4rem;
}

body[data-page="signage"] #page-overview .leaderboard .row .badge {
  font-size: 1.2rem;
  padding: 6px 12px;
}

body[data-page="signage"] #page-overview #leaderboard {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-page="signage"] #page-overview #leaderboard::-webkit-scrollbar {
  display: none;
}

body[data-page="signage"] .leaderboard-card {
  flex: 1;
  max-height: calc(100vh - 200px);
  overflow: hidden;
}

body[data-page="signage"] .leaderboard {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 8px;
}

body[data-page="signage"] .leaderboard::-webkit-scrollbar {
  display: none;
}

body[data-page="signage"] .leaderboard {
  gap: 12px;
}

body[data-page="signage"] .leaderboard .row {
  padding: 12px 20px;
}

body[data-page="signage"] .leaderboard .row strong {
  font-size: 1.6rem;
}

body[data-page="signage"] .leaderboard .row .badge {
  font-size: 1.4rem;
  padding: 8px 16px;
}

body[data-page="signage"] #page-leaderboard h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

body[data-page="signage"] #page-leaderboard .card {
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  max-height: calc(100vh - 140px);
  padding: 10px 16px;
  overflow: hidden;
}

body[data-page="signage"] #leaderboard-full {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 2px;
}

body[data-page="signage"] #leaderboard-full::-webkit-scrollbar {
  display: none;
}

body[data-page="signage"] #leaderboard-full .row {
  padding: 6px 14px;
}

body[data-page="signage"] #leaderboard-full .row strong {
  font-size: 1.3rem;
}

body[data-page="signage"] #leaderboard-full .row .badge {
  font-size: 1.1rem;
  padding: 5px 10px;
}

body[data-page="signage"] #page-random-cup .card {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

body[data-page="signage"] .cup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

body[data-page="signage"] .slot-wrapper {
  width: 100%;
  max-width: 900px;
}

body[data-page="signage"] .slot-group-display {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px 48px;
  text-align: center;
  width: 100%;
  max-width: 900px;
}

body[data-page="signage"] .slot-group-display .group-players {
  font-size: 2.2rem;
  color: #f4f7ff;
  line-height: 1.8;
  font-weight: 600;
}

body[data-page="signage"] .slot.rolling {
  overflow: hidden;
}

body[data-page="signage"] .slot-reel-item.slot-final {
  animation: cupReveal 0.5s ease-out;
}

@keyframes cupReveal {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

body[data-page="signage"] #page-overview .grid {
  height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  align-content: stretch;
  overflow: hidden;
}

body[data-page="signage"] #page-overview .grid > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

body[data-page="signage"] #page-overview .grid > .card > h3 {
  flex-shrink: 0;
}

body[data-page="signage"] #page-overview #recent-races {
  flex: 1;
  overflow: hidden;
}

body[data-page="signage"] .list {
  gap: 20px;
}

body[data-page="signage"] .time-chip {
  font-size: 2.4rem;
  padding: 20px 40px;
  font-weight: 700;
}

body[data-page="signage"] .error-banner {
  font-size: 2.2rem;
  padding: 28px 40px;
  margin: 20px auto;
  text-align: center;
  font-weight: 600;
  max-width: 1200px;
}

body[data-page="signage"] #random-groups {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  max-width: 100%;
}

body[data-page="signage"] #random-groups .card {
  text-align: center;
  min-height: auto;
}

body[data-page="signage"] #random-groups .card strong {
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
}

body[data-page="signage"] #random-groups .card .text-small {
  font-size: 2rem;
  line-height: 1.9;
}

body[data-page="signage"] #random-groups .card.group-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  animation: groupReveal 0.8s ease-out forwards;
}

@keyframes groupReveal {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Recent Races - Signage Display */
body[data-page="signage"] #recent-races {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

body[data-page="signage"] .race-card-signage {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-page="signage"] .race-header-signage {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

body[data-page="signage"] .race-cup-icon-signage {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

body[data-page="signage"] .race-cup-name-signage {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

body[data-page="signage"] .race-players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

body[data-page="signage"] .race-player-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  min-height: 0;
}

body[data-page="signage"] .race-player-tile.empty {
  opacity: 0.3;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-page="signage"] .race-player-tile .player-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

body[data-page="signage"] .race-player-tile .player-score {
  font-size: 1.2rem;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  padding: 2px 8px;
  border-radius: 5px;
  min-width: 36px;
  text-align: center;
}

body[data-page="signage"] .player-name {
  font-size: 1.4rem;
  color: #f4f7ff;
}

body[data-page="signage"] .player-score {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
}


body[data-page="signage"] .flex {
  gap: 20px;
}

body[data-page="signage"] .mt-2 {
  margin-top: 20px;
}

/* Optimierung für Full HD 1920x1080 (16:9) */
@media (min-width: 1920px) {
  body[data-page="signage"] .signage-wrapper {
    padding: 50px 100px;
  }
  
  body[data-page="signage"] h1 {
    font-size: 3.5rem;
  }
  
  body[data-page="signage"] .grid {
    gap: 40px;
  }
}

/* Optimierung für kleinere 16:9 Screens */
@media (max-height: 900px) {
  body[data-page="signage"] .signage-wrapper {
    padding: 20px 40px;
  }
  
  body[data-page="signage"] h1 {
    font-size: 2.5rem;
    margin-bottom: 6px;
  }
  
  body[data-page="signage"] h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  body[data-page="signage"] .header {
    margin-bottom: 16px;
  }
  
  body[data-page="signage"] .slot {
    height: 320px;
  }
}
/* Enlarged buttons for TV control pages too */
body[data-page="management"] .btn,
body[data-page="admin"] .btn,
body[data-page="index"] .btn {
  padding: 12px 18px;
}

/* Admin Page Specific Styles */
body[data-page="admin"] .login-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

body[data-page="admin"] .login-row input {
  flex: 1;
}

body[data-page="admin"] .status-message {
  display: block;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

body[data-page="admin"] .status-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

body[data-page="admin"] .status-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

body[data-page="admin"] .form-group {
  margin-bottom: 16px;
}

body[data-page="admin"] .form-group:last-child {
  margin-bottom: 0;
}

body[data-page="admin"] .slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

body[data-page="admin"] .slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

body[data-page="admin"] .slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(42, 168, 248, 0.4);
}

body[data-page="admin"] .slider-value {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
  background: rgba(42, 168, 248, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

body[data-page="admin"] .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

body[data-page="admin"] .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

body[data-page="admin"] .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

body[data-page="admin"] .stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

body[data-page="admin"] .stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

body[data-page="admin"] .stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

body[data-page="admin"] .button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-page="admin"] .button-stack .btn {
  width: 100%;
  justify-content: center;
}

body[data-page="admin"] .save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

body[data-page="admin"] .save-indicator.visible {
  opacity: 1;
}

body[data-page="admin"] .mb-3 {
  margin-bottom: 16px;
}

body[data-page="admin"] .import-export-row {
  display: flex;
  gap: 10px;
}

body[data-page="admin"] .import-export-row .btn {
  flex: 1;
  justify-content: center;
}

body[data-page="admin"] .file-input-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-page="admin"] .file-input-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

body[data-page="admin"] .input-with-button {
  display: flex;
  gap: 10px;
  align-items: center;
}

body[data-page="admin"] .input-with-button input {
  flex: 1;
}

body[data-page="admin"] .input-with-button .btn {
  white-space: nowrap;
}

