:root{
      --bg: #1a1a1a;           /* Dunkles Grau wie auf der Website */
      --panel: #2a2a2a;        /* Leicht helleres Grau für Panels */
      --fg: #ffffff;           /* Weißer Text */
      --muted: #aaaaaa;        /* Grau für sekundären Text */
      --sp-red: #e4002b;       /* HTL Spengergasse Rot */
      --sp-red-dark: #c00024;  /* Dunkleres Rot für Hover */
      --sp-cyan: #009ee0;      /* Blau-Akzent von der Website */
      --sp-gold: #ffcc00;      /* Gold für Highlights */
      --border: #444444;       /* Rahmenfarbe */
    }
    
    *{ 
      box-sizing: border-box; 
      font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; 
    }
    
    body{ 
      margin: 0; 
      background: var(--bg); 
      color: var(--fg); 
      line-height: 1.5;
    }
    
    /* Header im Corporate Design */
    header{
      padding: 12px 20px; 
      border-bottom: 3px solid var(--sp-red);
      display: flex; 
      align-items: center; 
      justify-content: space-between;
      background: linear-gradient(90deg, #2a2a2a, #333333);
      flex-wrap: wrap;
    }
    
    .header-left {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    
    .logo-container {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    .logo-container img {
      height: 40px;
      width: auto;
    }
    
    .title{ 
      font-weight: 700; 
      font-size: 22px; 
      color: white;
      letter-spacing: -0.5px;
    }
    
    .subtitle {
      font-weight: 400;
      font-size: 14px;
      color: var(--muted);
    }
    
    .hint{ 
      color: var(--muted); 
      font-size: 13px; 
      background: rgba(0,0,0,0.3);
      padding: 8px 12px;
      border-radius: 6px;
      border-left: 3px solid var(--sp-cyan);
    }
    
    /* Hauptlayout */
    .wrap{ 
      display: grid; 
      grid-template-columns: 1.2fr 0.8fr; 
      gap: 20px; 
      padding: 20px; 
      min-height: calc(100vh - 78px); 
    }
    
    /* Karten im modernen Stil */
    .card{ 
      background: var(--panel); 
      border: 1px solid var(--border); 
      border-radius: 12px; 
      overflow: hidden; 
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .card:hover {
      box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    }
    
    .card h2{ 
      margin:0; 
      padding: 16px 20px; 
      font-size:16px; 
      font-weight: 700;
      color:white; 
      background: linear-gradient(90deg, rgba(228,0,43,0.15), rgba(0,158,224,0.1));
      border-bottom:1px solid var(--border); 
      display:flex; 
      justify-content:space-between; 
      align-items:center; 
    }
    
    /* Spielbereich */
    .pane{ 
      position:relative; 
      aspect-ratio: 16/9; 
      background:#000; 
      border-bottom: 1px solid var(--border);
    }
    
    video{ 
      width:100%; 
      height:100%; 
      object-fit:cover; 
      display:block; 
      transform: scaleX(-1); 
    }
    
    canvas{ 
      position:absolute; 
      inset:0; 
    }
    
    /* HUD Elemente - oben links */
    .hud{
      position:absolute; 
      left:16px; 
      top:16px; 
      display:flex; 
      gap:16px; 
      flex-wrap:wrap;
      background: rgba(0,0,0,0.7); 
      border:1px solid rgba(255,255,255,0.15);
      padding: 12px 16px; 
      border-radius:10px; 
      backdrop-filter: blur(8px);
      font-weight:700; 
      font-size:15px;
      z-index: 30; /* Höher als das Info-Feld */
    }
    
    .hud div {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    
    .hud span{ 
      color:var(--muted); 
      font-weight:600; 
      font-size: 13px;
    }
    
    /* Badge - oben rechts */
    .badge{
      position:absolute; 
      right:16px; 
      top:16px;
      background: rgba(228,0,43,0.9); 
      border:1px solid rgba(255,255,255,0.2);
      padding: 10px 14px; 
      border-radius:10px; 
      backdrop-filter: blur(8px);
      display:flex; 
      align-items:center; 
      gap:12px;
      z-index: 30; /* Höher als das Info-Feld */
    }
    
    .badge img{ 
      width:28px; 
      height:28px; 
      object-fit:contain; 
      filter: brightness(0) invert(1);
    }
    
    .badge b{ 
      color:white; 
      font-size:14px; 
      font-weight: 700;
    }
    
    .badge small{ 
      color:rgba(255,255,255,0.8); 
      font-weight:600; 
      font-size: 11px;
    }
    
    /* Zentrierter Tipp - MITTE */
    .centerTip{
      position:absolute; 
      left:50%; 
      top:50%; 
      transform:translate(-50%,-50%);
      padding: 24px; 
      border-radius:14px; 
      background: rgba(0,0,0,0.85);
      border: 2px solid var(--sp-red); 
      text-align:center; 
      width:min(420px, 90%);
      box-shadow: 0 12px 40px rgba(0,0,0,0.5);
      z-index: 40; /* Höchste Priorität - über allem */
    }
    
    .centerTip .big{ 
      font-weight:800; 
      font-size:22px; 
      color: white;
      margin-bottom: 12px;
    }
    
    .centerTip .sub{ 
      color:var(--muted); 
      margin-top:4px; 
      line-height:1.6; 
      font-size: 15px;
    }
    
	/* Attract Mode Info-Feld - MITTE (unter dem HUD aber über Spiel) */
	.attractInfo{
	position:absolute; 
	left:50%; 
	top:50%; 
	transform:translate(-50%,-50%);
	width:min(560px, calc(100% - 32px));
	max-width: 90%;
	padding: 24px; 
	border-radius:14px; 
	background: rgba(0,0,0,0.85);
	border: 2px solid var(--sp-red); 
	box-shadow: 0 8px 32px rgba(0,0,0,0.8);
	z-index: 25; /* Unter dem HUD (30), über dem Spiel (20) */
	backdrop-filter: blur(8px);
	text-align: center;
	}

	.attractInfo .title{
	font-weight: 700; 
	font-size: 20px; 
	color: white;
	margin-bottom: 16px;
	border-left: 4px solid var(--sp-cyan);
	padding-left: 12px;
	text-align: left;
	}

	.attractInfo .content{
	color: var(--muted); 
	line-height: 1.6; 
	font-size: 15px;
	margin-bottom: 20px;
	text-align: left;
	}

	.attractInfo .callToAction{
	color: rgba(255,255,255,0.9);
	font-size: 14px;
	font-weight: 600;
	padding-top: 16px;
	border-top: 1px solid rgba(255,255,255,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	}
    
    .attractInfo .pulse{
      display: inline-block;
      width: 10px;
      height: 10px;
      background-color: var(--sp-red);
      border-radius: 50%;
      animation: pulse 1.5s infinite;
      margin-right: 6px;
    }
    
    /* Steuerungselemente */
    .controls{ 
      padding: 20px; 
      display:grid; 
      gap:16px; 
    }
    
    .btnRow{ 
      display:flex; 
      gap:12px; 
      flex-wrap:wrap; 
    }
    
    button{
      background: linear-gradient(135deg, #444, #333); 
      color:var(--fg);
      border: 1px solid var(--border); 
      border-radius:10px;
      padding: 14px 20px; 
      font-weight:700; 
      cursor:pointer;
      transition: all 0.2s ease;
      font-size: 15px;
      flex: 1;
      min-width: 120px;
    }
    
    button:hover{ 
      background: linear-gradient(135deg, #555, #444); 
      border-color: var(--sp-red);
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(228,0,43,0.2);
    }
    
    button:active{
      transform: translateY(0);
    }
    
    button.primary{ 
      background: linear-gradient(135deg, var(--sp-red), var(--sp-red-dark)); 
      border-color: var(--sp-red);
    }
    
    button.warn{ 
      background: linear-gradient(135deg, #ffcc00, #e6b800); 
      border-color: #ffcc00;
      color: #333;
    }
    
    button.bad{ 
      background: linear-gradient(135deg, #ff4757, #ff3742); 
      border-color: #ff4757;
    }
    
    input[type="range"] {
      width: 100%;
      height: 8px;
      background: #444;
      border-radius: 4px;
      outline: none;
      -webkit-appearance: none;
    }
    
    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 22px;
      height: 22px;
      background: var(--sp-red);
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid white;
    }
    
    .grid{ 
      display:grid; 
      grid-template-columns: 1fr 1fr; 
      gap:12px; 
    }
    
    .metric{ 
      padding: 16px; 
      border-radius:12px; 
      background: rgba(0,0,0,0.3); 
      border:1px solid var(--border); 
    }
    
    .metric .big{ 
      font-size:32px; 
      font-weight:900; 
      color: white;
      line-height: 1;
    }
    
    .metric .sub{ 
      color:var(--muted); 
      font-size:14px; 
      font-weight:600; 
      margin-top: 4px;
    }
    
    .slider{ 
      padding: 16px; 
      border-radius:12px; 
      background: rgba(0,0,0,0.3); 
      border:1px solid var(--border); 
      display:grid; 
      gap:10px; 
    }
    
    .slider label{ 
      font-size:14px; 
      color:var(--muted); 
      display:flex; 
      justify-content:space-between; 
      font-weight:600; 
    }
    
    .kbd{ 
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace; 
      background: #444;
      border:1px solid #666; 
      padding: 4px 10px; 
      border-radius:6px; 
      font-size: 13px;
      font-weight: 700;
    }
    
    /* Hotkeys Bereich */
    .hotkeys {
      padding: 16px;
      border-radius: 12px;
      background: rgba(0,0,0,0.3);
      border: 1px solid var(--border);
    }
    
    .hotkeys-title {
      font-size: 14px;
      color: var(--muted);
      font-weight: 600;
      margin-bottom: 10px;
    }
    
    .hotkeys-row {
      display: flex;
      gap: 12px;
      align-items: center;
      margin-bottom: 8px;
    }
    
    /* Responsive Design */
    @media (max-width: 1024px){ 
      .wrap{ 
        grid-template-columns: 1fr; 
        gap: 16px; 
      } 
      
      header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      
      .hint {
        width: 100%;
      }
      
      .attractInfo {
        width: min(480px, calc(100% - 32px));
      }
    }
    
    @media (max-width: 768px){ 
      .wrap{ 
        padding: 12px; 
      } 
      
      .hud {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        max-width: 180px;
      }
      
      .badge {
        max-width: 200px;
        padding: 8px 12px;
      }
      
      .btnRow {
        flex-direction: column;
      }
      
      button {
        width: 100%;
      }
      
      .grid {
        grid-template-columns: 1fr;
      }
      
      .attractInfo {
        padding: 16px;
        width: calc(100% - 32px);
      }
      
      .attractInfo .title {
        font-size: 16px;
      }
      
      .attractInfo .content {
        font-size: 13px;
      }
    }
    
    @media (max-width: 480px) {
      .hud {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 160px;
        padding: 10px;
        gap: 8px;
      }
      
      .hud div {
        min-width: 60px;
      }
      
      .badge {
        max-width: 160px;
        padding: 6px 10px;
      }
      
      .badge b {
        font-size: 12px;
      }
      
      .badge small {
        font-size: 10px;
      }
    }
    
    /* Animierte Punkte für Ladezustände */
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    
    .pulse {
      animation: pulse 1.5s infinite;
    }
    
    @keyframes slideIn {
      from { transform: translateY(20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    
    .slide-in {
      animation: slideIn 0.4s ease-out;
    }
  .photoDownloadCard {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 3px solid var(--sp-red);
  border-radius: 25px;
  padding: 30px;
  color: white;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  max-width: 600px;
  width: 90%;
  backdrop-filter: blur(10px);
}

.photoPreview {
  margin: 20px auto;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.photoPreview img {
  width: 100%;
  height: auto;
  display: block;
}

.photoOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(228,0,43,0.9), transparent);
  padding: 20px;
  color: white;
}

.scoreBadge {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.qrSection {
  margin: 25px 0;
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
}

.qrSection p {
  margin: 10px 0;
}

#qrcode {
  margin: 15px auto;
  padding: 10px;
  background: white;
  border-radius: 10px;
  display: inline-block;
}

.photoMeta {
  margin: 15px 0;
  font-size: 14px;
  opacity: 0.8;
  display: flex;
  justify-content: space-between;
}

.closeBtn {
  background: var(--sp-red);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s;
}

.closeBtn:hover {
  background: #ff3366;
  transform: translateY(-2px);
}

.photoCountdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  padding: 40px;
  border-radius: 20px;
  border: 3px solid var(--sp-cyan);
  color: white;
  text-align: center;
  z-index: 999;
}

.photoCountdown .count {
  font-size: 72px;
  font-weight: 900;
  margin: 20px;
  color: var(--sp-cyan);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}