/* ============================================================
   BASE LAYOUT
   ============================================================ */

:root {
  --pc-bg-dark: #000000;
  --pc-bg-card: #0a0e17;
  --pc-bg-soft: #111827;
  --pc-border-soft: #1f2937;
  --pc-text-main: #f9fafb;
  --pc-text-muted: #9ca3af;
  --pc-accent: #d4af37;
  --pc-accent-soft: #f5e6b8;
  --pc-accent-deep: #8b6914;
  --pc-danger: #dc2626;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Hintergrund aus dem ursprünglichen style.css */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 100%, rgba(212, 175, 55, 0.03) 0%, transparent 40%),
    linear-gradient(180deg, #000000 0%, #0a0a0a 50%, #000000 100%);
  color: var(--pc-text-main);
  background-attachment: fixed;
}

/* ============================================================
   SHELL / HUD 
   ============================================================ */

.pc-game-shell {
  min-height: 100vh;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pc-game-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.pc-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .pc-hud {
    grid-template-columns: 1fr;
  }
}

/* HUD-Karten – Glass-Black */
.pc-hud-card {
  background: rgba(0, 0, 0, 0.32);
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(6px);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(212,175,55,0.12);
}

.pc-hud-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.5),
    transparent
  );
}

.pc-hud-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(212, 175, 55, 0.6);
}

.pc-hud-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pc-text-main);
}

#time {
  font-variant-numeric: tabular-nums;
}

.pc-hud-value--accent {
  color: var(--pc-accent);
  text-shadow: 0 0 20px rgba(212,175,55,0.5);
}

/* ============================================================
   GAME AREA
   ============================================================ */

.pc-game-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 480px;
  max-height: 720px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(212, 175, 55, 0.15),
    inset 0 0 100px rgba(212, 175, 55, 0.02);
}

/* ============================================================
   START SCREEN
   ============================================================ */

.pc-start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 20;
  backdrop-filter: blur(4px);
}

.pc-start-card {
  background: rgba(0, 0, 0, 0.5);
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  text-align: center;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(212, 175, 55, 0.2);
  max-width: 380px;
  position: relative;
  backdrop-filter: blur(8px);
}

.pc-start-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.6),
    transparent
  );
}

.pc-start-title {
  font-size: 1.75rem;
  margin-bottom: 12px;
  color: var(--pc-accent-soft);
}

.pc-start-text {
  font-size: 0.95rem;
  margin-bottom: 24px;
  color: #a0a0a0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.pc-btn {
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s,
    border-color 0.2s;
  background: transparent;
  color: var(--pc-text-main);
}

.pc-btn-primary {
  background: linear-gradient(135deg, #e5c56a, #d4af37 50%, #b8941f);
  color: #000;
  border-color: rgba(212, 175, 55, 0.8);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
}

.pc-btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f0d17a, #e0bb47, #c9a32f);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.5);
}

.pc-btn-primary:active {
  transform: scale(0.98);
}

/* ============================================================
   BALLOONS — PNG MODE
   ============================================================ */

.balloon {
  position: absolute;
  cursor: pointer;
  touch-action: manipulation;
  transform-origin: 50% 100%;
  animation: glow-pulse 6s ease-in-out infinite;
  transition: transform 0.2s, opacity 0.2s;
  z-index: 10;
}

.balloon::before,
.balloon::after {
  content: none !important;
  display: none !important;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.92; }
}

/* ============================================================
   BALLOON GOLD-DISSOLVE / AUTO-REMOVE
   ============================================================ */

.balloon-remove {
  animation: goldDissolve 0.55s ease-out forwards;
  pointer-events: none;
}

.balloon-remove-timeout {
  animation: goldDissolveTimeout 0.75s ease-out forwards;
  pointer-events: none;
}

/* Kompatibilität: falls dein JS 'balloon-fade-out' setzt */
.balloon-fade-out {
  animation: goldDissolve 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes goldDissolve {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.3));
  }
  40% {
    opacity: 0.8;
    transform: scale(1.22);
    filter: drop-shadow(0 0 22px rgba(255, 215, 0, 0.85));
  }
  100% {
    opacity: 0;
    transform: scale(0.55);
    filter: none;
  }
}

@keyframes goldDissolveTimeout {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.7);
  }
}

/* String-Fade bei Remove */
.balloon-string {
  position: absolute;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(212, 175, 55, 0.5),
    rgba(212, 175, 55, 0.3),
    rgba(139, 105, 20, 0.4)
  );
  z-index: 5;
  box-shadow: 0 0 2px rgba(212, 175, 55, 0.3);
}

.balloon-string.balloon-remove,
.balloon-string.balloon-remove-timeout,
.balloon-string.balloon-fade-out {
  animation: string-fade 0.4s ease-out forwards;
}

@keyframes string-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   BALLOON POP FX
   ============================================================ */

.balloon-pop-advanced {
  animation: pop-scale 0.28s ease-out forwards,
             pop-fade 0.35s ease-out forwards;
}

@keyframes pop-scale {
  0%   { transform: scale(1) rotate(0); }
  40%  { transform: scale(1.25) rotate(3deg); }
  70%  { transform: scale(0.9) rotate(-2deg); }
  100% { transform: scale(0.4) rotate(8deg); }
}

@keyframes pop-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.balloon-super {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
}

/* ============================================================
   CONFETTI – GOLD ONLY
   ============================================================ */

.confetti {
  position: absolute;
  opacity: 0;
}

@keyframes confetti-burst {
  0% {
    transform: translate3d(0,0,0) scale(1) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--cf-x), var(--cf-y), 0)
               scale(0.7) rotate(360deg);
    opacity: 0;
  }
}

/* ============================================================
   TEXT FX
   ============================================================ */

.pc-miss-text {
  position: absolute;
  color: #f87171;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow:
    0 0 8px rgba(248, 113, 113, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 15;
}

.floating-hit {
  position: absolute;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f5e6b8;
  text-shadow: 0 0 12px rgba(255,215,0,0.8);
  animation: floatHit 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 20;
}

@keyframes floatHit {
  0%   { transform: translateY(0) scale(0.8); opacity: 1; }
  40%  { transform: translateY(-15px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-35px) scale(1); opacity: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */

/* CENTER GAME OVER / HIGH SCORE OVERLAY */
.centered-overlay {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
}

.pc-overlay-card {
  margin: 0 auto !important;
}

/* ============================================
   CENTER GAME OVER (Ploner CI)
   ============================================ */

.pc-overlay.pc-overlay-centered {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
}

.pc-overlay-card-lose {
  margin: 0 auto;
  animation: fadeInUp 0.45s ease-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* HUD-Werte alle in Gold wie Highscore */
#score,
#time,
#high-score {
  color: var(--pc-accent);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}
