/* ═══════════════════════════════════════════════════
   COMMI #5 — Bow & Arrow  (events.php only)
   Premium black / white / gold design language
   ═══════════════════════════════════════════════════ */

/* ── Desktop only ── */
@media (max-width: 1023px) {
  .ev5-overlay,
  .ev5-score-bar,
  .ev5-canvas {
    display: none !important;
  }
  #ev5Trigger {
    cursor: default !important;
    text-decoration: none !important;
  }
}

/* Hintergrund-Scroll sperren, solange Intro/Win-Modal offen ist
   (html + body — body allein stoppt das Scrollen nicht überall) */
html.ev5-scroll-lock,
body.ev5-scroll-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* ══════════════════════════════════════════════════
   TRIGGER WORD  (#ev5Trigger in h1)
   ══════════════════════════════════════════════════ */
#ev5Trigger.ev5-clickable {
  cursor: crosshair;
  position: relative;
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              text-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#ev5Trigger.ev5-clickable::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #fff6b3, #ffd700, #ccaa00);
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#ev5Trigger.ev5-clickable:hover::after {
  transform: scaleX(1);
  opacity: 0.85;
}

#ev5Trigger.ev5-clickable:hover {
  color: #fff;
  text-shadow: 0 0 26px rgba(255, 215, 0, 0.45), 0 0 60px rgba(255, 215, 0, 0.15);
}

#ev5Trigger.ev5-collected {
  cursor: default;
  color: #ffd700 !important;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.55), 0 0 50px rgba(255, 215, 0, 0.2) !important;
}

/* ══════════════════════════════════════════════════
   CANVAS (arrow flight layer)
   ══════════════════════════════════════════════════ */
.ev5-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8800;
  pointer-events: none;
  display: none;
  cursor: crosshair;
}

.ev5-canvas.ev5-active {
  display: block;
  pointer-events: all;
}

/* ══════════════════════════════════════════════════
   SCORE BAR
   ══════════════════════════════════════════════════ */
.ev5-score-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8900;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 28px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.ev5-score-bar.ev5-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.ev5-score-icon {
  display: inline-flex;
  align-items: center;
  color: #ffd700;
  line-height: 1;
}

.ev5-score-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ev5-score-num {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: transform 0.12s ease, color 0.12s ease;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.ev5-score-num.ev5-bump {
  transform: scale(1.3);
  color: #ffd700;
}

.ev5-score-total {
  color: rgba(255, 255, 255, 0.4);
}

.ev5-score-sep {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.22);
}

.ev5-score-label {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.66rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 10px;
}

.ev5-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.ev5-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff6b3, #ffd700, #ccaa00);
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

.ev5-quit-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 6px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
}

.ev5-quit-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

/* ══════════════════════════════════════════════════
   OVERLAY BASE  (Intro + Win share this)
   ══════════════════════════════════════════════════ */
.ev5-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.ev5-overlay.ev5-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Shared badge: black pill, gold border, gold type ── */
.ev5-badge {
  display: inline-block;
  background: #0b0b0d;
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.45);
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 6px 18px 6px 20px;
  border-radius: 100px;
  margin-bottom: 22px;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.12);
}

/* ══════════════════════════════════════════════════
   CARDS  (shared premium base)
   ══════════════════════════════════════════════════ */
.ev5-intro-card,
.ev5-win-card {
  position: relative;
  background: linear-gradient(160deg, #161616 0%, #101010 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: scale(0.96);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}

.ev5-overlay.ev5-open .ev5-intro-card,
.ev5-overlay.ev5-open .ev5-win-card {
  opacity: 1;
  transform: scale(1);
}

/* ══════════════════════════════════════════════════
   INTRO CARD
   ══════════════════════════════════════════════════ */
.ev5-intro-card {
  padding: 48px 44px 40px;
  max-width: 460px;
  width: 92%;
}

.ev5-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ev5-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Drawn bow icon (inline SVG, white/gold) */
.ev5-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ev5-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}

.ev5-intro-card h2 {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.ev5-intro-card > p {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  margin-bottom: 24px;
}

.ev5-intro-card > p strong {
  color: #ffd700;
  font-weight: 600;
}

.ev5-instructions {
  list-style: none;
  padding: 16px 20px;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.ev5-instructions li {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  padding-left: 20px;
  position: relative;
  letter-spacing: 0.01em;
}

.ev5-instructions li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #ffd700;
  font-weight: 700;
}

.ev5-instructions li kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  letter-spacing: 0.06em;
}

/* ── Primary button: white pill, black uppercase type ── */
.ev5-start-btn,
.ev5-claim-btn {
  width: 100%;
  padding: 15px 0;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 100px;
  color: #0b0b0d;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}

.ev5-start-btn:hover,
.ev5-claim-btn:hover {
  transform: translateY(-2px);
  background: #fff6b3;
  border-color: #fff6b3;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.5), 0 0 36px rgba(255, 215, 0, 0.25);
}

.ev5-start-btn:active,
.ev5-claim-btn:active {
  transform: translateY(0) scale(0.99);
}

/* ══════════════════════════════════════════════════
   WIN CARD  (gold glow)
   ══════════════════════════════════════════════════ */
.ev5-win-card {
  padding: 56px 48px 48px;
  max-width: 420px;
  width: 90%;
  overflow: hidden;
  border-color: rgba(255, 215, 0, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(255, 215, 0, 0.1);
}

.ev5-win-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ev5-win-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: ev5WinPartFloat linear infinite;
}

@keyframes ev5WinPartFloat {
  0%   { transform: translateY(110%) scale(0);   opacity: 0; }
  8%   { opacity: 0.75; }
  92%  { opacity: 0.35; }
  100% { transform: translateY(-20%) scale(1.2); opacity: 0; }
}

/* Gold target-hit emblem (inline SVG) */
.ev5-win-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.18);
  animation: ev5EmblemIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.ev5-win-emblem svg {
  width: 40px;
  height: 40px;
  display: block;
}

@keyframes ev5EmblemIn {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.ev5-win-card h2 {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  text-shadow: 0 0 34px rgba(255, 215, 0, 0.3);
}

.ev5-win-card > p {
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  margin-bottom: 32px;
}

.ev5-claim-btn:hover {
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 215, 0, 0.35);
}

/* ══════════════════════════════════════════════════
   TARGETS  (ev5-target spans injected by JS)
   ══════════════════════════════════════════════════ */
.ev5-target {
  display: inline;
  position: relative;
}

/* subtle gold marker so the hunt stays fair */
.ev5-target.ev5-target-active {
  background-image: linear-gradient(90deg,
    rgba(255, 215, 0, 0.4) 0 2px, transparent 2px 5px);
  background-repeat: repeat-x;
  background-size: 5px 1px;
  background-position: 0 100%;
  padding-bottom: 1px;
}

/* persistent gold state for already-hit targets */
.ev5-target.ev5-target-hit {
  color: #ffd700 !important;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.4);
  opacity: 0.85;
  animation: ev5HitFlash 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

@keyframes ev5HitFlash {
  0%   { text-shadow: 0 0 30px rgba(255, 246, 179, 0.95), 0 0 60px rgba(255, 215, 0, 0.5); }
  100% { text-shadow: 0 0 18px rgba(255, 215, 0, 0.4); }
}
