/* === Beamer Fullscreen Display === */
:root {
  --beamer-bg: #0a0a1a;
  --beamer-text: #ffffff;
  --beamer-gold: #ffd700;
  --beamer-green: #00e676;
  --beamer-blue: #42a5f5;
  --beamer-red: #ff5252;
}

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

body {
  background: var(--beamer-bg);
  color: var(--beamer-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* === Idle State === */
.beamer-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  padding: 40px;
}
.beamer-idle-logo { margin-bottom: 24px; }
.beamer-idle-logo img { height: 120px; width: auto; }
.beamer-idle-title {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--beamer-gold), #ffb800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.beamer-idle-subtitle {
  font-size: 24px;
  opacity: .6;
  margin-bottom: 48px;
}

/* === Active State === */
.beamer-active {
  display: none;
  height: 100vh;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.beamer-active.show {
  display: grid;
}

/* Left: Jersey image */
.beamer-image-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.beamer-image-side img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(0,0,0,.5);
  transition: opacity .5s ease, transform .5s ease;
}
.beamer-image-side .jersey-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .2;
}
.beamer-image-side .jersey-placeholder img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

/* Right: Price info */
.beamer-info-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
  position: relative;
}
.beamer-jersey-name {
  font-size: 36px;
  font-weight: 700;
  color: var(--beamer-blue);
  margin-bottom: 8px;
}
.beamer-jersey-number {
  font-size: 22px;
  opacity: .5;
  margin-bottom: 40px;
}
.beamer-price {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
  transition: transform .3s ease;
}
.beamer-price.pop {
  animation: beamer-price-pop .5s ease;
}
@keyframes beamer-price-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); color: var(--beamer-green); }
  100% { transform: scale(1); }
}
.beamer-price-label {
  font-size: 18px;
  opacity: .5;
  text-transform: uppercase;
  letter-spacing: 3px;
}
.beamer-bidder-label {
  font-size: 18px;
  opacity: .5;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 32px;
}
.beamer-bidder {
  font-size: 42px;
  color: var(--beamer-gold);
  font-weight: 600;
  min-height: 50px;
  margin-top: 8px;
}
.beamer-online-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 22px;
  font-weight: 700;
  color: var(--beamer-green);
}
.beamer-online-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--beamer-green);
  box-shadow: 0 0 8px var(--beamer-green);
  animation: online-pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes online-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* === Donation bar (bottom corner) === */
.beamer-donation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  z-index: 50;
}
.beamer-donation-label {
  font-size: 14px;
  opacity: .5;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.beamer-donation-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
}
.beamer-donation-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--beamer-green), var(--beamer-gold));
  border-radius: 4px;
  transition: width 1s ease;
  min-width: 2px;
}
.beamer-donation-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--beamer-green);
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
}
.beamer-donation-amount.pop {
  animation: beamer-price-pop .5s ease;
}

/* === Idle large donation display === */
.beamer-idle-donation {
  margin-top: 32px;
}
.beamer-idle-donation-amount {
  font-size: 72px;
  font-weight: 900;
  color: var(--beamer-green);
}
.beamer-idle-donation-label {
  font-size: 18px;
  opacity: .6;
  margin-top: 4px;
}
.beamer-idle-bar-wrap {
  width: 400px;
  max-width: 80vw;
  height: 12px;
  background: rgba(255,255,255,.1);
  border-radius: 6px;
  overflow: hidden;
  margin: 16px auto 0;
}
.beamer-idle-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--beamer-green), var(--beamer-gold));
  border-radius: 6px;
  transition: width 1s ease;
}

/* === Countdown Overlay === */
.beamer-countdown-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
}
.beamer-countdown-overlay.show {
  display: flex;
}
.beamer-countdown-text {
  font-size: 100px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 6px;
  text-align: center;
  text-shadow: 0 0 40px rgba(255,215,0,.5);
  animation: countdown-appear .5s ease;
}
.beamer-countdown-phase1 { color: var(--beamer-gold); }
.beamer-countdown-phase2 { color: #ff9800; }
.beamer-countdown-phase3 { color: var(--beamer-red); font-size: 120px; }

@keyframes countdown-appear {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* === Zuschlag Overlay === */
.beamer-zuschlag-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 300;
  background: rgba(0,0,0,.85);
}
.beamer-zuschlag-overlay.show {
  display: flex;
  animation: zuschlag-flash .6s ease;
}
@keyframes zuschlag-flash {
  0% { background: rgba(0,230,118,.3); }
  100% { background: rgba(0,0,0,.85); }
}
.beamer-zuschlag-hammer { font-size: 80px; margin-bottom: 16px; }
.beamer-zuschlag-label {
  font-size: 56px;
  font-weight: 900;
  color: var(--beamer-green);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 4px;
}
.beamer-zuschlag-jersey {
  font-size: 32px;
  color: var(--beamer-blue);
  margin-bottom: 12px;
}
.beamer-zuschlag-amount {
  font-size: 80px;
  font-weight: 900;
  margin-bottom: 16px;
}
.beamer-zuschlag-winner {
  font-size: 28px;
  color: var(--beamer-gold);
}

/* CSS Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 350;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 20px;
  top: -20px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* === Sold banner on beamer === */
.beamer-sold-banner {
  position: absolute;
  top: 60px;
  left: -60px;
  width: 340px;
  text-align: center;
  padding: 14px 0;
  background: var(--beamer-red);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 5px;
  transform: rotate(-35deg);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  z-index: 10;
  pointer-events: none;
}

/* === Live Bid Panel (mobile users in live mode) === */
.live-bid-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 28px;
  background: linear-gradient(transparent, rgba(0, 10, 20, 0.97) 25%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.live-bid-btn {
  width: 100%;
  max-width: 400px;
  padding: 16px 28px;
  background: var(--beamer-green);
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.15s, transform 0.1s;
}
.live-bid-btn:active { transform: scale(0.97); }
.live-bid-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.live-bid-feedback {
  font-size: 0.95rem;
  min-height: 1.3em;
  text-align: center;
  font-weight: 600;
}
.live-bid-login {
  font-size: 0.95rem;
  padding: 12px 0;
  color: rgba(255,255,255,0.6);
}
.live-bid-login a {
  color: var(--beamer-blue);
  text-decoration: none;
  font-weight: 600;
}

/* === Slide transition for jersey change === */
.slide-out {
  animation: slide-out .4s ease forwards;
}
.slide-in {
  animation: slide-in .4s ease forwards;
}
@keyframes slide-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-60px); }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === Day/Night Toggle === */
.beamer-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 500;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  cursor: pointer;
  color: #fff;
  opacity: .4;
  transition: opacity .2s, background .2s;
}
.beamer-theme-toggle:hover { opacity: 1; background: rgba(255,255,255,.2); }

/* === Light Mode === */
body.beamer-light {
  --beamer-bg: #f5f5f5;
  --beamer-text: #1a1a2e;
  background: var(--beamer-bg);
  color: var(--beamer-text);
}
body.beamer-light .beamer-theme-toggle { background: rgba(0,0,0,.08); color: #333; }
body.beamer-light .beamer-theme-toggle:hover { background: rgba(0,0,0,.15); }
body.beamer-light .beamer-idle-title {
  background: linear-gradient(135deg, #004578, #0066b3);
  -webkit-background-clip: text;
  background-clip: text;
}
body.beamer-light .beamer-idle-subtitle { color: #666; }
body.beamer-light .beamer-idle-donation-amount { color: #28a745; }
body.beamer-light .beamer-idle-donation-label { color: #888; }
body.beamer-light .beamer-idle-bar-wrap { background: rgba(0,0,0,.08); }
body.beamer-light .beamer-price { color: #1a1a2e; }
body.beamer-light .beamer-price-label { color: #888; }
body.beamer-light .beamer-jersey-name { color: #004578; }
body.beamer-light .beamer-jersey-number { color: #666; }
body.beamer-light .beamer-bidder-label { color: #888; }
body.beamer-light .beamer-bidder { color: #b8860b; }
body.beamer-light .beamer-online-indicator { color: #28a745; }
body.beamer-light .beamer-online-dot { background: #28a745; box-shadow: 0 0 6px #28a745; }
body.beamer-light .beamer-image-side img { box-shadow: 0 0 40px rgba(0,0,0,.12); }
body.beamer-light .beamer-donation { background: linear-gradient(transparent, rgba(245,245,245,.9)); }
body.beamer-light .beamer-donation-label { color: #888; }
body.beamer-light .beamer-donation-bar-wrap { background: rgba(0,0,0,.08); }
body.beamer-light .beamer-donation-amount { color: #28a745; }
body.beamer-light .beamer-sold-banner { background: #dc3545; }
body.beamer-light .beamer-countdown-text { text-shadow: 0 0 30px rgba(0,0,0,.15); }
body.beamer-light .beamer-zuschlag-overlay { background: rgba(255,255,255,.9); }
body.beamer-light .beamer-zuschlag-label { color: #28a745; }
body.beamer-light .beamer-zuschlag-jersey { color: #004578; }
body.beamer-light .beamer-zuschlag-amount { color: #1a1a2e; }
body.beamer-light .beamer-zuschlag-winner { color: #b8860b; }
