/* game.css — PILS GEWITTER tap duel — game-specific styles */
/* Shared styles (root, screens, intro, charselect, popups, result) → shared/game-ui.css */

/* ─── SCREEN: GAME ────────────────────────────────────────── */
#screen-game {
  flex-direction: column;
  background: #060400;
}

/* Top HUD */
#hud {
  width: 100%;
  display: flex;
  align-items: stretch;
  height: max(52px, calc(44px + env(safe-area-inset-top, 0px)));
  padding-top: env(safe-area-inset-top, 0px);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.hud-side {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  gap: 0.5rem;
}
.hud-side.p1 { background: rgba(245,166,35,0.08); }
.hud-side.p2 {
  background: rgba(79,195,247,0.06);
  flex-direction: row-reverse;
}

.hud-name {
  font-size: 1rem;
  letter-spacing: 0.05em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-side.p2 .hud-name { text-align: right; }

.hud-score {
  font-size: 1.8rem;
  line-height: 1;
}
.hud-side.p1 .hud-score { color: var(--left); }
.hud-side.p2 .hud-score { color: var(--right); }

/* Center HUD: timer */
#hud-center {
  width: 64px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  border-left: 1px solid rgba(255,255,255,0.05);
  border-right: 1px solid rgba(255,255,255,0.05);
}
#timer-display {
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  transition: color 0.2s ease-out;
}
#timer-display.warn { color: #ff5252; }

/* ─── CENTER TIMER ────────────────────────────────────────── */
#center-timer {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 20;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 4px 14px 6px;
  pointer-events: none;
}
#center-timer #timer-display {
  font-size: 1.8rem;
  line-height: 1;
  color: #fff;
  transition: color 0.2s ease-out;
}
#center-timer #timer-display.warn {
  color: #ff5252;
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}
@keyframes timerPulse {
  from { transform: scale(1);    opacity: 1; }
  to   { transform: scale(1.18); opacity: 0.75; }
}
#center-timer small {
  font-size: 0.45rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.25);
  font-family: 'DM Mono', monospace;
  display: block;
}

#hud-center small {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

/* Progress bar strip */
#progress-strip {
  height: 5px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
#progress-bar-l, #progress-bar-r {
  position: absolute;
  top: 0; height: 100%;
  transition: width 0.2s ease;
}
#progress-bar-l {
  left: 0;
  background: var(--left);
}
#progress-bar-r {
  right: 0;
  background: var(--right);
}

/* Tap zones */
#tap-area {
  flex: 1;
  width: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

.tap-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding-top: max(52px, calc(44px + env(safe-area-inset-top, 0px)));
  padding-bottom: 16px;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.tap-zone.p1 { border-right: 1px solid rgba(255,255,255,0.04); }

/* Tap zone photo bg */
.zone-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.12;
  filter: saturate(0.5);
}

/* Glow on tap */
.tap-zone::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.tap-zone.p1::after {
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.22) 0%, transparent 70%);
}
.tap-zone.p2::after {
  background: radial-gradient(ellipse at center, rgba(79,195,247,0.18) 0%, transparent 70%);
}
.tap-zone.flashing::after { opacity: 1; }

.tap-zone-content {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.tap-beer {
  font-size: clamp(4rem, 15vw, 7rem);
  line-height: 1;
  display: block;
  transition: transform 0.08s;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}
.tap-zone.popped .tap-beer { transform: scale(1.18); }

.tap-label {
  font-size: clamp(0.9rem, 3vw, 1.3rem);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  opacity: 0.5;
  font-family: 'DM Mono', monospace;
}
.tap-zone.p1 .tap-label { color: var(--left); }
.tap-zone.p2 .tap-label { color: var(--right); }

/* ─── EVENT STATES ────────────────────────────────────────── */
.tap-zone.frozen {
  filter: grayscale(70%) brightness(0.6);
  pointer-events: none;
  transition: filter 0.2s ease-out;
}
.tap-zone.frozen::before {
  content: '❄️';
  position: absolute;
  font-size: 3rem;
  z-index: 30;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: freezePulse 0.8s ease-in-out infinite alternate;
}
@keyframes freezePulse {
  from { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.2); }
}

.tap-zone.speedboost::after {
  opacity: 0.6;
  animation: speedGlow 0.4s ease-in-out infinite alternate;
}
.tap-zone.p1.speedboost::after {
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.5) 0%, transparent 70%);
}
.tap-zone.p2.speedboost::after {
  background: radial-gradient(ellipse at center, rgba(79,195,247,0.5) 0%, transparent 70%);
}
@keyframes speedGlow {
  from { opacity: 0.4; }
  to   { opacity: 0.9; }
}

/* ─── TUG-OF-WAR LEAD BAR ─────────────────────────────────── */
#tug-bar {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  position: relative;
  z-index: 22;
}
#tug-p1-bar {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--left), rgba(245,166,35,0.6));
  transition: width 0.15s ease;
  position: absolute;
  left: 0; top: 0;
}
/* center notch */
#tug-bar::after {
  content: '';
  position: absolute;
  left: 50%; top: -2px;
  width: 2px; height: 9px;
  background: rgba(255,255,255,0.35);
  transform: translateX(-50%);
}

/* ─── SCREEN SHAKE ─────────────────────────────────────────── */
@keyframes screenShake {
  0%, 100% { transform: translate(0,0); }
  20%       { transform: translate(-5px, 2px); }
  40%       { transform: translate(5px, -2px); }
  60%       { transform: translate(-4px, 1px); }
  80%       { transform: translate(4px, -1px); }
}
#screen-game.shaking { animation: screenShake 0.35s ease-in-out; }

/* ─── EVENT OVERLAY COLOR THEMES ──────────────────────────── */
#event-overlay.ev-gewitter  { background: rgba(60,35,0,0.92);  }
#event-overlay.ev-schontag  { background: rgba(0,30,70,0.93);  }
#event-overlay.ev-friday    { background: rgba(80,10,0,0.92);  }
#event-overlay.ev-zapfhahn  { background: rgba(0,50,65,0.92);  }
#event-overlay.ev-brand     { background: rgba(90,15,0,0.92);  }
#event-overlay.ev-ordentlich{ background: rgba(15,50,0,0.92);  }
#event-overlay.ev-legende   { background: rgba(35,0,65,0.92);  }

#event-overlay.ev-gewitter .event-name  { color: #f5b030; text-shadow: 0 0 40px rgba(245,176,48,1), 0 0 80px rgba(245,166,35,0.5); }
#event-overlay.ev-schontag .event-name  { color: #4fc3f7; text-shadow: 0 0 40px rgba(79,195,247,0.9); }
#event-overlay.ev-friday .event-name    { color: #ff7043; text-shadow: 0 0 40px rgba(255,112,67,0.9); }
#event-overlay.ev-brand .event-name     { color: #ff5722; text-shadow: 0 0 40px rgba(255,87,34,0.9);  }
#event-overlay.ev-legende .event-name   { color: #ce93d8; text-shadow: 0 0 40px rgba(206,147,216,0.9); }
#event-overlay.ev-ordentlich .event-name{ color: #69f0ae; text-shadow: 0 0 40px rgba(105,240,174,0.8); }

/* icon glow per theme */
#event-overlay.ev-schontag .event-icon  { filter: drop-shadow(0 0 24px rgba(79,195,247,0.8)); }
#event-overlay.ev-friday .event-icon    { filter: drop-shadow(0 0 24px rgba(255,112,67,0.8)); }
#event-overlay.ev-brand .event-icon     { filter: drop-shadow(0 0 24px rgba(255,87,34,0.8));  }
#event-overlay.ev-legende .event-icon   { filter: drop-shadow(0 0 24px rgba(206,147,216,0.8)); }

/* Floating +1 texts */
.pop-text {
  position: absolute;
  font-size: 2rem;
  font-weight: 900;
  pointer-events: none;
  animation: floatUp 0.85s ease-out forwards;
  z-index: 20;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.pop-text.p1 { color: var(--left); }
.pop-text.p2 { color: var(--right); }
@keyframes floatUp {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-60px); opacity: 0; }
}

/* ─── PLAYER NAME IN ZONE ─────────────────────────────────── */
.player-name {
  position: relative;
  z-index: 2;
  font-size: clamp(0.85rem, 3.2vw, 1.2rem);
  letter-spacing: 0.06em;
  opacity: 0.85;
}
.tap-zone.p1 .player-name { color: var(--left); }
.tap-zone.p2 .player-name { color: var(--right); }

/* ─── LEVELS 1-3: PLAYER VISIBILITY BOOST ────────────────── */
/* In levels 1-3 the whole zone is the tap target, so player  */
/* info must be clearly visible through all the tapping.      */
#screen-game.level-1 .zone-bg,
#screen-game.level-2 .zone-bg,
#screen-game.level-3 .zone-bg {
  opacity: 0.55; /* more visible than default 0.12 */
}

#screen-game.level-1 .player-name,
#screen-game.level-2 .player-name,
#screen-game.level-3 .player-name {
  font-size: 1.4rem;
  text-shadow: 0 0 12px rgba(0,0,0,0.9), 0 2px 4px rgba(0,0,0,1);
  background: rgba(0,0,0,0.5);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── BEER GLASS ──────────────────────────────────────────── */
.beer-glass-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.beer-glass {
  width: 72px;
  height: 110px;
  border: 2px solid rgba(245,166,35,0.5);
  border-radius: 4px 4px 8px 8px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.04);
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
}

.beer-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, #c47a00, #f5a623, #f5c030);
  transition: height 0.12s ease-out;
}

.beer-foam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: rgba(255,248,225,0.9);
  border-radius: 3px 3px 0 0;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.beer-ml {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.58rem, 2vw, 0.72rem);
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.45);
}

/* ─── ZAPFHAHN BUTTON ─────────────────────────────────────── */
.zapf-btn {
  position: relative;
  z-index: 5;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  font-size: 2.8rem;
  cursor: pointer;
  transition: transform 0.08s ease-out, background 0.1s ease-out, box-shadow 0.1s ease-out;
  -webkit-tap-highlight-color: transparent;
  background: rgba(245,166,35,0.1);
  border: 2px solid rgba(245,166,35,0.45);
  box-shadow: 0 0 18px rgba(245,166,35,0.2);
}
.zapf-btn.p2 {
  border-color: rgba(79,195,247,0.45);
  box-shadow: 0 0 18px rgba(79,195,247,0.2);
  background: rgba(79,195,247,0.08);
}
.zapf-btn:active {
  transform: scale(0.91);
  background: rgba(245,166,35,0.25);
  box-shadow: 0 0 28px rgba(245,166,35,0.45);
}
.zapf-btn.p2:active {
  background: rgba(79,195,247,0.22);
  box-shadow: 0 0 28px rgba(79,195,247,0.4);
}

/* ─── LEVEL BADGE ─────────────────────────────────────────────────────────── */
#level-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 20px;
  padding: 2px 10px;
  z-index: 10;
  pointer-events: none;
}

/* ─── LEVEL-UP OVERLAY ────────────────────────────────────────────────────── */
#screen-level-up {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#screen-level-up.visible {
  opacity: 1;
  pointer-events: auto;
}
.level-up-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2rem;
  animation: levelUpPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes levelUpPop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.level-up-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: rgba(245,166,35,0.6);
}
.level-up-num {
  font-family: 'Anton', sans-serif;
  font-size: clamp(3rem, 12vw, 5rem);
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 40px rgba(245,166,35,0.5);
}
.level-up-name {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  color: #fff;
  letter-spacing: 0.05em;
}
.level-up-desc {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em;
  max-width: 280px;
  line-height: 1.6;
}

/* Level-5 Sondereffekt: goldener Glow */
#screen-level-up.level-5-up .level-up-num {
  color: #ffd700;
  text-shadow: 0 0 60px rgba(255,215,0,0.7), 0 0 20px #ffd700;
  animation: levelUpPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both, goldPulse 1.2s ease-in-out infinite 0.4s;
}
@keyframes goldPulse {
  0%, 100% { text-shadow: 0 0 60px rgba(255,215,0,0.7), 0 0 20px #ffd700; }
  50%       { text-shadow: 0 0 80px rgba(255,215,0,1),   0 0 40px #ffd700; }
}

/* ─── PER-LEVEL TAP-ZONE COLORS ───────────────────────────────────────────── */
/* L1: Amber/Warm (default) — keine Änderung */
#screen-game.level-2 .tap-zone.p1 { background: linear-gradient(to top, #1a0e00, #0d0600); }
#screen-game.level-2 .tap-zone.p2 { background: linear-gradient(to top, #001520, #000d18); }
#screen-game.level-3 .tap-zone.p1 { background: linear-gradient(to top, #2a1400, #150900); }
#screen-game.level-3 .tap-zone.p2 { background: linear-gradient(to top, #001a28, #000f1a); }
#screen-game.level-4 .tap-zone.p1 { background: linear-gradient(to top, #3d1a00, #1f0d00); }
#screen-game.level-4 .tap-zone.p2 { background: linear-gradient(to top, #001f30, #001020); }
#screen-game.level-5 .tap-zone.p1 { background: linear-gradient(to top, #5c2800, #2a1200); }
#screen-game.level-5 .tap-zone.p2 { background: linear-gradient(to top, #00263a, #001525); }

/* L5: Gold-Akzent auf der Trennlinie */
#screen-game.level-5 #tug-bar {
  background: rgba(255, 215, 0, 0.15);
  border-top: 1px solid rgba(255,215,0,0.4);
  border-bottom: 1px solid rgba(255,215,0,0.4);
}
#screen-game.level-5 #tug-p1-bar {
  background: linear-gradient(to right, #c87800, #f5a623);
}
#screen-game.level-5 #center-timer {
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

/* ─── GLASS SHAPE VARIANTS PER LEVEL ──────────────────────────────────────── */
/*
  L1-2:  Pilsglas    slim 42×122px  classic amber taper
  L3-4:  Weizenglas  62×150px  notably taller + wider  pale golden
  L5-6:  Masskrug    84×104px  chunky + handle  bright gold
  L7-8:  Bierkrug    96×94px   wide dark stein + thick handle  dunkel/dark amber
  L9:    Pokal       100×118px  chalice clip-path  champagne gold
  L10:   Fass        118×86px   barrel oval + ring shadows  wood brown
*/

/* ── L1-2: PILSGLAS (slim, classic amber) ── */
#screen-game.level-1 .beer-glass,
#screen-game.level-2 .beer-glass {
  width: 42px;
  height: 122px;
  border-radius: 2px 2px 6px 6px;
  clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}
#screen-game.level-1 .beer-glass-wrap,
#screen-game.level-2 .beer-glass-wrap { gap: 6px; }

/* ── L3-4: WEIZENGLAS (tall, clearly wider, pale golden liquid) ── */
#screen-game.level-3 .beer-glass,
#screen-game.level-4 .beer-glass {
  width: 62px;
  height: 150px;
  border-radius: 10px 10px 3px 3px;
  clip-path: polygon(4% 0%, 96% 0%, 100% 100%, 0% 100%);
  border-color: rgba(255,220,100,0.55);
}
#screen-game.level-3 .beer-glass-wrap,
#screen-game.level-4 .beer-glass-wrap { gap: 6px; }
#screen-game.level-3 .beer-liquid,
#screen-game.level-4 .beer-liquid {
  background: linear-gradient(to top, #c08800, #f0c040, #ffe880);
}

/* ── L5-6: MASSKRUG (squat, wide, handle, bright gold) ── */
#screen-game.level-5 .beer-glass,
#screen-game.level-6 .beer-glass {
  width: 84px;
  height: 104px;
  border-radius: 4px;
  clip-path: none;
}
#screen-game.level-5 .beer-glass-wrap,
#screen-game.level-6 .beer-glass-wrap {
  position: relative;
  gap: 6px;
  padding-right: 22px;
}
#screen-game.level-5 .beer-glass-wrap::after,
#screen-game.level-6 .beer-glass-wrap::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 20%;
  height: 42%;
  width: 14px;
  border: 3px solid rgba(245,166,35,0.55);
  border-left: none;
  border-radius: 0 7px 7px 0;
  pointer-events: none;
}
/* L5: gold tint upgrade */
#screen-game.level-5 .beer-glass {
  border: 2px solid rgba(255,215,0,0.65);
  box-shadow: 0 0 18px rgba(255,215,0,0.25);
}
#screen-game.level-5 .beer-glass-wrap::after { border-color: rgba(255,215,0,0.55); }
#screen-game.level-5 .beer-liquid,
#screen-game.level-6 .beer-liquid {
  background: linear-gradient(to top, #c07800, #f5a020, #ffd040);
}
#screen-game.level-5 .beer-foam,
#screen-game.level-6 .beer-foam { background: rgba(255,248,220,0.95); }

/* ── L7-8: BIERKRUG (very wide, dark dunkel liquid, thick handle) ── */
#screen-game.level-7 .beer-glass,
#screen-game.level-8 .beer-glass {
  width: 96px;
  height: 94px;
  border-radius: 5px;
  clip-path: none;
  border-color: rgba(180,100,20,0.6);
}
#screen-game.level-7 .beer-glass-wrap,
#screen-game.level-8 .beer-glass-wrap {
  position: relative;
  gap: 6px;
  padding-right: 26px;
}
#screen-game.level-7 .beer-glass-wrap::after,
#screen-game.level-8 .beer-glass-wrap::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 14%;
  height: 48%;
  width: 18px;
  border: 5px solid rgba(180,100,20,0.55);
  border-left: none;
  border-radius: 0 10px 10px 0;
  pointer-events: none;
}
/* Dunkel / dark beer */
#screen-game.level-7 .beer-liquid,
#screen-game.level-8 .beer-liquid {
  background: linear-gradient(to top, #3a1800, #7c3800, #b86000);
}
#screen-game.level-7 .beer-foam,
#screen-game.level-8 .beer-foam { background: rgba(230,210,180,0.85); }

/* ── L9: POKAL/CHALICE (wide top tapering to narrow stem, champagne) ── */
#screen-game.level-9 .beer-glass {
  width: 100px;
  height: 118px;
  clip-path: polygon(0% 0%, 100% 0%, 85% 58%, 65% 100%, 35% 100%, 15% 58%);
  border-radius: 0;
  border-color: rgba(255,215,0,0.65);
  box-shadow: 0 0 20px rgba(255,215,0,0.2);
}
#screen-game.level-9 .beer-glass-wrap { gap: 6px; }
#screen-game.level-9 .beer-liquid {
  background: linear-gradient(to top, #b88000, #e8c030, #f8e870);
}
#screen-game.level-9 .beer-foam { background: rgba(255,255,240,0.9); }

/* ── L10: FASS/BARREL (widest, oval, wood brown, barrel rings) ── */
#screen-game.level-10 .beer-glass {
  width: 118px;
  height: 86px;
  border-radius: 50% / 22%;
  border: 4px solid #9a6830;
  clip-path: none;
  box-shadow:
    inset 0 0 0 3px rgba(80,40,0,0.5),
    inset 0 26px 0 rgba(120,70,20,0.35),
    inset 0 52px 0 rgba(120,70,20,0.35),
    0 0 20px rgba(154,104,48,0.3);
}
#screen-game.level-10 .beer-glass-wrap { gap: 6px; }
#screen-game.level-10 .beer-liquid {
  background: linear-gradient(to top, #6a2e00, #c06010, #e88020);
}
#screen-game.level-10 .beer-foam { background: rgba(240,220,190,0.88); }

/* ─── ZAPF-ONLY MODE (Level 4-5) ──────────────────────────────────────────── */
/* Ganzer Screen abgedunkelt, Zapf-Button prominent */
#screen-game.zapf-only .tap-zone {
  cursor: default;
}
#screen-game.zapf-only .zone-bg {
  opacity: 0.35;
}
/* Zapf-Button — Level 4-5: groß, pulsend, zentraler */
#screen-game.zapf-only .zapf-btn {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(72px, 18vw, 100px);
  height: clamp(72px, 18vw, 100px);
  border-radius: 50%;
  font-size: clamp(2rem, 6vw, 3rem);
  background: rgba(245,166,35,0.15);
  border: 2px solid rgba(245,166,35,0.6);
  box-shadow: 0 0 24px rgba(245,166,35,0.3);
  animation: zapfPulse 1.1s ease-in-out infinite;
  z-index: 5;
}
#screen-game.zapf-only .zapf-btn.p2 {
  border-color: rgba(79,195,247,0.6);
  background: rgba(79,195,247,0.12);
  box-shadow: 0 0 24px rgba(79,195,247,0.25);
  animation: zapfPulseBlue 1.1s ease-in-out infinite;
}
@keyframes zapfPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(245,166,35,0.3); transform: translateX(-50%) scale(1); }
  50%       { box-shadow: 0 0 40px rgba(245,166,35,0.6); transform: translateX(-50%) scale(1.06); }
}
@keyframes zapfPulseBlue {
  0%, 100% { box-shadow: 0 0 24px rgba(79,195,247,0.25); transform: translateX(-50%) scale(1); }
  50%       { box-shadow: 0 0 40px rgba(79,195,247,0.5);  transform: translateX(-50%) scale(1.06); }
}

/* Tap-on-Tap-Areal deaktivieren in zapf-only — nur optisch */
#screen-game.zapf-only .beer-glass-wrap {
  pointer-events: none;
}

/* Level 4+: Radiale Abdunkelung der Zone — Button klar im Fokus */
#screen-game.zapf-only .tap-zone {
  background: radial-gradient(circle at center, transparent 48%, rgba(0,0,0,0.40) 100%);
}

/* Hint-Text unter Zapf-Button */
#screen-game.zapf-only .tap-zone .zapf-hint {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  font-size: 0.5rem;
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.18em;
  color: rgba(255,243,208,0.38);
  text-align: center;
  pointer-events: none;
}

/* ─── GOLDEN ZAPFHAHN ────────────────────────────────────────────────────── */
.golden-zapf {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,0.95) 0%, rgba(245,150,20,0.5) 65%, transparent 100%);
  border: 2.5px solid rgba(255,215,0,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  gap: 2px;
  z-index: 18;
  pointer-events: none; /* zone tap handler detects it via tapState.goldenActive */
  box-shadow: 0 0 28px rgba(255,215,0,0.85), 0 0 60px rgba(255,215,0,0.35);
  transform: translate(-50%, -50%);
  animation: gzAppear 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             gzPulse  0.55s ease-in-out infinite alternate 0.32s;
}
.gz-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.36rem;
  letter-spacing: 0.08em;
  color: rgba(20,10,0,0.9);
  background: rgba(255,215,0,0.85);
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
}
@keyframes gzAppear {
  from { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  to   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
@keyframes gzPulse {
  from { box-shadow: 0 0 22px rgba(255,215,0,0.7); transform: translate(-50%,-50%) scale(1); }
  to   { box-shadow: 0 0 50px rgba(255,215,0,1), 0 0 90px rgba(255,215,0,0.5); transform: translate(-50%,-50%) scale(1.13); }
}
.golden-zapf.gz-missed {
  animation: gzFade 0.38s ease-out forwards;
}
@keyframes gzFade {
  to { opacity: 0; transform: translate(-50%,-50%) scale(0.4); }
}
.golden-zapf.gz-hit {
  animation: gzBurst 0.35s ease-out forwards;
}
@keyframes gzBurst {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  50%  { transform: translate(-50%,-50%) scale(2.6); opacity: 0.5; }
  100% { transform: translate(-50%,-50%) scale(3.2); opacity: 0; }
}

/* ─── SABOTAGE BUTTON ────────────────────────────────────────────────────── */
.sabotage-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,60,0,0.95) 0%, rgba(160,20,0,0.7) 65%, transparent 100%);
  border: 2.5px solid rgba(255,80,20,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  gap: 2px;
  z-index: 22;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 30px rgba(255,60,0,0.8), 0 0 65px rgba(255,60,0,0.35);
  animation: sbAppear 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             sbPulse  0.5s ease-in-out infinite alternate 0.32s;
}
.sb-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.34rem;
  letter-spacing: 0.06em;
  color: rgba(255,220,200,0.95);
  white-space: nowrap;
}
@keyframes sbAppear {
  from { transform: translate(-50%,-50%) scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: translate(-50%,-50%) scale(1) rotate(0deg);   opacity: 1; }
}
@keyframes sbPulse {
  from { box-shadow: 0 0 24px rgba(255,60,0,0.65); transform: translate(-50%,-50%) scale(1); }
  to   { box-shadow: 0 0 55px rgba(255,60,0,1), 0 0 90px rgba(255,60,0,0.5); transform: translate(-50%,-50%) scale(1.1); }
}
.sabotage-btn.sb-missed {
  animation: sbFade 0.35s ease-out forwards;
}
@keyframes sbFade {
  to { opacity: 0; transform: translate(-50%,-50%) scale(0.5); }
}
.sabotage-btn.sb-hit {
  animation: sbBurst 0.4s ease-out forwards;
}
@keyframes sbBurst {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  50%  { transform: translate(-50%,-50%) scale(2.8); opacity: 0.55; }
  100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0; }
}

/* ─── KURZE FICKEN MINI-GAME ──────────────────────────────────────────────── */
#screen-kurze-ficken {
  background: #0a0500;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Amber flicker bg — drunk energy */
#screen-kurze-ficken::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212,146,10,0.08) 0%, transparent 70%);
  animation: kfFlicker 0.6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes kfFlicker {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

.kf-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.6rem 0 0;
  gap: 0;
}

.kf-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: rgba(245,166,35,0.6);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.kf-schnaps-icon {
  display: none; /* replaced by .kf-bottle-img; element kept for JS compat */
}

.kf-bottle-img {
  height: 84px;
  width: auto;
  max-width: 135px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.65));
  margin: 0.2rem 0 0.1rem;
  flex-shrink: 0;
}

.kf-schnaps-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,243,208,0.45);
  text-align: center;
  margin-top: -0.1rem;
  margin-bottom: 0.1rem;
  max-width: 280px;
}

.kf-schnaps-name {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px currentColor;
  margin-bottom: 0.3rem;
}

.kf-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  color: var(--amber, #D4920A);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 40px rgba(245,166,35,0.6),
    0 0 80px rgba(245,166,35,0.25);
  animation: kfTitlePulse 0.9s ease-in-out infinite alternate;
}
@keyframes kfTitlePulse {
  from { text-shadow: 0 0 30px rgba(245,166,35,0.5), 0 0 60px rgba(245,166,35,0.2); }
  to   { text-shadow: 0 0 55px rgba(245,166,35,0.9), 0 0 100px rgba(245,166,35,0.4); }
}

.kf-sub {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.55rem, 2vw, 0.72rem);
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.kf-players {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.kf-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem 1rem;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.kf-p1 {
  background: rgba(245,166,35,0.07);
  border-right: 1px solid rgba(245,166,35,0.18);
}
.kf-p2 {
  background: rgba(79,195,247,0.05);
  border-left: 1px solid rgba(79,195,247,0.14);
}

/* Tap flash glow */
.kf-p1::after,
.kf-p2::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.kf-p1::after {
  background: radial-gradient(ellipse at center, rgba(245,166,35,0.2) 0%, transparent 70%);
}
.kf-p2::after {
  background: radial-gradient(ellipse at center, rgba(79,195,247,0.16) 0%, transparent 70%);
}
.kf-p1.kf-flash::after,
.kf-p2.kf-flash::after { opacity: 1; }

.kf-pname {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.6rem, 2.5vw, 0.8rem);
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}

.kf-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 160px;
}

/* Individual shot glass */
.kf-shot {
  width: 28px;
  height: 36px;
  border: 2px solid rgba(245,166,35,0.55);
  border-radius: 3px 3px 6px 6px;
  position: relative;
  background: rgba(255,255,255,0.03);
  transition: opacity 0.15s, background 0.15s;
  /* Slight taper to look like a shot glass */
  clip-path: polygon(6% 0%, 94% 0%, 100% 100%, 0% 100%);
}
/* Shine line */
.kf-shot::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 3px;
  height: 60%;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
}
.kf-shot.drunk {
  opacity: 0.16;
  background: rgba(245,166,35,0.3);
  animation: kfShotDrink 0.22s ease-out both;
}
@keyframes kfShotDrink {
  0%   { opacity: 1; transform: scale(1.2) rotate(0deg); }
  50%  { transform: scale(0.88) rotate(14deg); }
  100% { opacity: 0.16; transform: scale(0.95) rotate(-4deg); }
}

.kf-count {
  font-family: 'Anton', sans-serif;
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: var(--amber, #D4920A);
  line-height: 1;
  transition: color 0.15s ease-out;
  min-height: 2rem;
}

.kf-tap-hint {
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.65rem, 2.5vw, 0.85rem);
  letter-spacing: 0.25em;
  color: rgba(245,166,35,0.7);
  text-transform: uppercase;
  animation: kfHintPulse 1s ease-in-out infinite alternate;
}
@keyframes kfHintPulse {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

/* ── Shot glass accent colors per schnaps (level = data-schnaps) ── */
#screen-kurze-ficken[data-schnaps="2"]  .kf-shot { background: rgba(170,170,170,0.13); border-color: rgba(170,170,170,0.48); } /* Kumpel-Korn */
#screen-kurze-ficken[data-schnaps="3"]  .kf-shot { background: rgba(80,192,80,0.14);   border-color: rgba(80,192,80,0.50);   } /* Fickmilch-Express */
#screen-kurze-ficken[data-schnaps="4"]  .kf-shot { background: rgba(88,152,232,0.14);  border-color: rgba(88,152,232,0.50);  } /* Dota-Wacholder */
#screen-kurze-ficken[data-schnaps="5"]  .kf-shot { background: rgba(232,176,32,0.17);  border-color: rgba(232,176,32,0.52);  } /* Hans' Goldpisse */
#screen-kurze-ficken[data-schnaps="6"]  .kf-shot { background: rgba(232,112,32,0.16);  border-color: rgba(232,112,32,0.52);  } /* Metland Schlamm */
#screen-kurze-ficken[data-schnaps="8"]  .kf-shot { background: rgba(224,64,64,0.16);   border-color: rgba(224,64,64,0.52);   } /* Sieger-Tropfen */
#screen-kurze-ficken[data-schnaps="10"] .kf-shot { background: rgba(255,48,48,0.18);   border-color: rgba(255,48,48,0.55);   } /* Sieger-Tropfen Final */

/* ── Counter done state ── */
.kf-count.kf-done {
  color: #69f0ae;
  animation: kfDonePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes kfDonePop {
  from { transform: scale(1.6); }
  to   { transform: scale(1); }
}

/* ── Floating shout on tap ── */
.kf-pop-text {
  position: absolute;
  font-family: 'Anton', sans-serif;
  font-size: clamp(0.9rem, 3.5vw, 1.3rem);
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  animation: kfPopFloat 0.75s ease-out forwards;
}
.kf-pop-text.kf-pop-p1 { color: var(--left,  #f5a623); }
.kf-pop-text.kf-pop-p2 { color: var(--right, #4fc3f7); }
@keyframes kfPopFloat {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(-55px); opacity: 0; }
}

/* ── Opponent taunts banner ── */
.kf-wait-text {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Anton', sans-serif;
  font-size: clamp(0.7rem, 2.8vw, 0.95rem);
  color: #ff6b35;
  background: rgba(0,0,0,0.75);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,107,53,0.4);
  text-align: center;
  white-space: nowrap;
  z-index: 30;
  pointer-events: none;
  animation: kfWaitPulse 0.7s ease-in-out infinite alternate;
}
@keyframes kfWaitPulse {
  from { opacity: 0.7; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.03); }
}

/* ── 3-2-1 Countdown overlay ── */
.kf-countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4,2,0,0.9);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Anton', sans-serif;
  font-size: clamp(6rem, 26vw, 10rem);
  color: var(--kf-accent, var(--amber, #D4920A));
  text-shadow: 0 0 60px currentColor, 0 0 120px currentColor;
  text-align: center;
  white-space: pre;
  line-height: 1.1;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.kf-countdown-overlay.kf-cd-gone { opacity: 0; }
.kf-countdown-overlay.kf-cd-pop {
  animation: kfCdPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes kfCdPop {
  from { transform: scale(2.2); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
