/* ═══════════════════════════════════════════════════
   COMMI #3 — Boss Pong Battle  (grafik.php only)
   ═══════════════════════════════════════════════════ */

/* Hide everything on mobile */
@media (max-width: 1023px) {
  .c3-boss-menu,
  .c3-pong-overlay,
  .c3-result-screen { display: none !important; }
}

/* ── Green dot clickability hint ── */
#commi3-dot {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease !important;
}
#commi3-dot:hover {
  transform: scale(1.7) !important;
  box-shadow: 0 0 18px #2ecc71, 0 0 40px rgba(46,204,113,0.6) !important;
  animation: none !important;
}
#commi3-dot.collected-glow {
  box-shadow: 0 0 12px rgba(255,215,0,0.8), 0 0 28px rgba(255,215,0,0.35) !important;
}

/* ══════════════════════════════════════════════════
   SHARED OVERLAY BASE
   ══════════════════════════════════════════════════ */
.c3-boss-menu,
.c3-pong-overlay,
.c3-result-screen {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.c3-boss-menu.open,
.c3-pong-overlay.open,
.c3-result-screen.open {
  opacity: 1;
  pointer-events: all;
}

/* ══════════════════════════════════════════════════
   BOSS FIGHT MENU
   ══════════════════════════════════════════════════ */
.c3-boss-menu {
  background: rgba(0, 0, 0, 0.95);
}

.c3-menu-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(220, 40, 40, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(100, 60, 255, 0.07) 0%, transparent 55%);
  pointer-events: none;
}

/* Floating particles container */
.c3-menu-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.c3-menu-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: c3ParticleFloat linear infinite;
}

@keyframes c3ParticleFloat {
  0%   { transform: translateY(110vh) scale(0);   opacity: 0; }
  8%   { opacity: 0.7; }
  92%  { opacity: 0.3; }
  100% { transform: translateY(-15vh) scale(1.4); opacity: 0; }
}

/* Menu card */
.c3-menu-card {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, #12101f 0%, #1c1840 50%, #0f0d1e 100%);
  border: 1px solid rgba(200, 50, 50, 0.22);
  border-radius: 28px;
  padding: 48px 40px 40px;
  max-width: 560px;
  width: 94%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.85),
    0 0 80px rgba(180, 30, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(44px) scale(0.94);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none;
}
.c3-menu-card::-webkit-scrollbar { display: none; }

.c3-boss-menu.open .c3-menu-card {
  transform: translateY(0) scale(1);
}

/* Close button */
.c3-menu-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.c3-menu-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Boss Header ── */
.c3-boss-header {
  text-align: center;
  margin-bottom: 28px;
}

.c3-boss-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d41919, #ff5520);
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.32em;
  padding: 5px 18px;
  border-radius: 100px;
  margin-bottom: 22px;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(220, 30, 30, 0.55), 0 0 50px rgba(220, 30, 30, 0.2);
  animation: c3BadgePulse 2.2s ease-in-out infinite;
}

@keyframes c3BadgePulse {
  0%, 100% { box-shadow: 0 0 22px rgba(220,30,30,0.55), 0 0 50px rgba(220,30,30,0.2); }
  50%       { box-shadow: 0 0 36px rgba(220,30,30,0.85), 0 0 80px rgba(220,30,30,0.35); }
}

/* Enemy icon */
.c3-boss-icon {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c3-boss-icon > img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0 0 14px rgba(255, 55, 55, 0.9))
    drop-shadow(0 0 40px rgba(220, 30, 30, 0.45))
    hue-rotate(300deg)
    brightness(1.25);
  animation: c3IconPulse 1.9s ease-in-out infinite;
}

@keyframes c3IconPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.09); }
}

.c3-boss-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(220, 50, 50, 0.4);
}
.c3-boss-ring-1 {
  inset: 0;
  animation: c3RingSpin 2.4s linear infinite;
}
.c3-boss-ring-2 {
  inset: 12px;
  border-color: rgba(255, 90, 30, 0.3);
  animation: c3RingSpin 1.6s linear infinite reverse;
}
.c3-boss-ring-3 {
  inset: 24px;
  border-color: rgba(200, 50, 50, 0.2);
  animation: c3RingSpin 3.5s linear infinite;
}
@keyframes c3RingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.c3-boss-title {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(255, 70, 70, 0.5);
}

.c3-boss-sub {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  line-height: 1.55;
}

.c3-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 50, 50, 0.3), transparent);
  margin: 24px 0;
}

/* ── Menu Sections ── */
.c3-menu-section {
  margin-bottom: 22px;
}

.c3-section-label {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 11px;
}

/* ── Sinn (Paddle Theme) Grid ── */
.c3-sinn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.c3-sinn-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 11px 14px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.22s ease;
  text-align: left;
}
.c3-sinn-btn:last-child {
  grid-column: 1 / -1;
}

.c3-sinn-paddle-preview {
  width: 5px;
  height: 30px;
  border-radius: 3px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.22s, box-shadow 0.22s;
}

.c3-sinn-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
}

.c3-sinn-btn.active {
  border-color: var(--sinn-color);
  color: white;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.06), inset 0 0 12px rgba(255,255,255,0.02);
}
.c3-sinn-btn.active .c3-sinn-paddle-preview {
  opacity: 1;
  box-shadow: 0 0 10px var(--sinn-color), 0 0 20px var(--sinn-color);
}

/* ── Difficulty Grid ── */
.c3-diff-grid {
  display: flex;
  gap: 8px;
}

.c3-diff-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.22s ease;
}
.c3-diff-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
}

.c3-diff-btn[data-diff="normal"].active {
  border-color: #2ecc71;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.07);
  box-shadow: 0 0 18px rgba(46, 204, 113, 0.22);
}
.c3-diff-btn[data-diff="hard"].active {
  border-color: #f39c12;
  color: #f39c12;
  background: rgba(243, 156, 18, 0.07);
  box-shadow: 0 0 18px rgba(243, 156, 18, 0.22);
}
.c3-diff-btn[data-diff="brutal"].active {
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.07);
  box-shadow: 0 0 18px rgba(231, 76, 60, 0.22);
}

/* ── Start Button ── */
.c3-start-btn {
  width: 100%;
  padding: 17px 0;
  margin-top: 10px;
  background: linear-gradient(135deg, #195c35 0%, #27ae60 50%, #195c35 100%);
  background-size: 220% 100%;
  background-position: 0% 0%;
  border: 1.5px solid rgba(46, 204, 113, 0.48);
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 0 28px rgba(46, 204, 113, 0.18), 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: c3StartGlow 2.8s ease-in-out infinite;
}

@keyframes c3StartGlow {
  0%, 100% { box-shadow: 0 0 28px rgba(46,204,113,0.18), 0 4px 20px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 50px rgba(46,204,113,0.42), 0 4px 20px rgba(0,0,0,0.4); }
}

.c3-start-btn:hover {
  background-position: 100% 0%;
  border-color: rgba(46, 204, 113, 0.8);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 60px rgba(46, 204, 113, 0.55), 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: none;
}
.c3-start-btn:active {
  transform: translateY(0) scale(0.99);
}

/* ══════════════════════════════════════════════════
   PONG OVERLAY
   ══════════════════════════════════════════════════ */
.c3-pong-overlay {
  background: rgba(0, 0, 0, 0.91);
}

/* Score bar — sits above canvas */
.c3-score-bar {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 36px;
  z-index: 10;
  pointer-events: none;
}

.c3-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 90px;
}

.c3-score-label {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.c3-score-num {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 3.8rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.35);
  transition: transform 0.1s ease;
  display: block;
}
.c3-score-num.bump {
  transform: scale(1.28);
}

/* Pip row (10 progress dots) */
.c3-pip-row {
  display: flex;
  gap: 4px;
}
.c3-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s, box-shadow 0.2s;
}
.c3-pip.filled {
  background: white;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
.c3-score-block.enemy .c3-pip.filled {
  background: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.75);
}

.c3-score-vs {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.2em;
  align-self: center;
  padding-bottom: 10px;
}

/* Pong canvas */
.c3-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Countdown flash */
.c3-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 6rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 0 40px rgba(255,255,255,0.6);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
}
.c3-countdown.show {
  animation: c3CountPop 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes c3CountPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  40%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  70%  { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
}

/* Control hint */
.c3-pong-hint {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.22);
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  animation: c3HintFade 4s ease 3s forwards;
  pointer-events: none;
  z-index: 10;
}
@keyframes c3HintFade {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Quit button */
.c3-pong-quit {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 7px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all 0.22s;
  z-index: 10;
}
.c3-pong-quit:hover {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

/* ══════════════════════════════════════════════════
   WIN / LOSE RESULT SCREENS
   ══════════════════════════════════════════════════ */
.c3-result-screen {
  background: rgba(0, 0, 0, 0.93);
}

.c3-result-card {
  text-align: center;
  background: linear-gradient(145deg, #12101f 0%, #1c1840 55%, #0f0d1e 100%);
  border-radius: 28px;
  padding: 60px 50px 52px;
  max-width: 420px;
  width: 90%;
  transform: scale(0.88);
  transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}
.c3-result-screen.open .c3-result-card {
  transform: scale(1);
}

.c3-win .c3-result-card {
  border: 1px solid rgba(46, 204, 113, 0.28);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 70px rgba(46, 204, 113, 0.12);
}
.c3-lose .c3-result-card {
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.c3-result-emoji {
  font-size: 4.2rem;
  margin-bottom: 20px;
  display: block;
  animation: c3EmojiDrop 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
@keyframes c3EmojiDrop {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0);      opacity: 1; }
}

.c3-result-card h2 {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 2.3rem;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}
.c3-win .c3-result-card h2 {
  text-shadow: 0 0 30px rgba(46, 204, 113, 0.55);
}
.c3-lose .c3-result-card h2 {
  text-shadow: 0 0 25px rgba(231, 76, 60, 0.45);
}

.c3-result-card p {
  font-family: var(--font-family, 'Inter', sans-serif);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  margin-bottom: 34px;
  line-height: 1.65;
}

.c3-claim-btn,
.c3-retry-btn {
  width: 100%;
  padding: 15px 0;
  border-radius: 13px;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.28s ease;
}

.c3-claim-btn {
  background: linear-gradient(135deg, #195c35, #27ae60);
  border: 1.5px solid rgba(46, 204, 113, 0.5);
  color: white;
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.22);
}
.c3-claim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 55px rgba(46, 204, 113, 0.5), 0 6px 24px rgba(0,0,0,0.4);
}

.c3-retry-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.75);
}
.c3-retry-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
  color: white;
}

/* ══════════════════════════════════════════════════
   POWER-UP HUD  (bottom-left of pong overlay)
   ══════════════════════════════════════════════════ */
.c3-powerup-hud {
  position: absolute;
  bottom: 26px;
  left: 28px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.c3-powerup-hud.has-powerup {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.c3-powerup-slot {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid var(--pu-color, rgba(255,255,255,0.15));
  border-radius: 13px;
  padding: 10px 16px 10px 12px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.c3-powerup-hud.has-powerup .c3-powerup-slot {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 24px rgba(255,255,255,0.06);
}

.c3-powerup-hud.has-powerup .c3-powerup-slot:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.55), 0 0 40px rgba(255,255,255,0.12);
  border-color: var(--pu-color);
  transform: scale(1.03);
}

.c3-pu-icon {
  font-size: 1.55rem;
  line-height: 1;
  user-select: none;
}

.c3-pu-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c3-pu-name {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
}

.c3-pu-key {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Active duration bar */
.c3-powerup-active-bar {
  margin-top: 6px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.c3-pu-progress {
  height: 100%;
  background: var(--pu-color, white);
  border-radius: 2px;
  width: 100%;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px var(--pu-color, white);
}

/* ── Score "Erster auf 10 Punkte" goal label ── */
.c3-score-goal {
  display: block;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 5px;
  white-space: nowrap;
}

/* ── Sinn ability text inside menu buttons ── */
.c3-sinn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c3-sinn-ability {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.c3-sinn-btn.active .c3-sinn-ability {
  color: rgba(255,255,255,0.58);
}
