@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&family=Space+Mono:wght@400;700&display=swap');

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

:root {
  --crt-amber: #ffb000;
  --crt-green: #33ff33;
  --beige: #e8dcc4;
  --dark-beige: #c4b59d;
  --charcoal: #2d2d2d;
  --teal: #00b4b4;
  --magenta: #ff00ff;
  --purple: #8b00ff;
}

body {
  font-family: 'Space Mono', monospace;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: var(--beige);
  overflow-x: hidden;
}

.app-container {
  position: relative;
  min-height: 100vh;
}

.app-container.glitch {
  animation: glitch 0.2s ease-in-out;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); filter: none; }
  20% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
  40% { transform: translate(2px, -2px); filter: hue-rotate(-90deg); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); filter: saturate(2); }
}

.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15) 0px,
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    );
  z-index: 1000;
}

.header {
  background: linear-gradient(180deg, var(--charcoal) 0%, #1a1a1a 100%);
  border-bottom: 4px solid var(--crt-amber);
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(255, 176, 0, 0.3);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.main-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.8rem, 3vw, 1.5rem);
  color: var(--crt-amber);
  text-shadow: 0 0 10px var(--crt-amber), 0 0 20px var(--crt-amber);
  letter-spacing: 2px;
}

.subtitle {
  font-family: 'VT323', monospace;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--teal);
  margin-top: 0.5rem;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ff0000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  animation: pulse 1s ease-in-out infinite;
  box-shadow: 0 0 10px #ff0000;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: blink 0.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.main-content {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 1rem;
  padding: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .left-column, .right-column {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.center-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stage {
  background: linear-gradient(180deg, #2a1a3a 0%, #1a0a2a 100%);
  border: 4px solid #4a3a5a;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  box-shadow: 
    inset 0 0 50px rgba(139, 0, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.stage-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-stage-text {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--crt-amber);
  text-align: center;
  animation: flicker 2s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
  52% { opacity: 0.4; }
  54% { opacity: 0.9; }
}

.curtain-left, .curtain-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, #8b0000 0%, #4a0000 100%);
  z-index: 1;
}

.curtain-left { left: 0; }
.curtain-right { 
  right: 0; 
  background: linear-gradient(90deg, #4a0000 0%, #8b0000 100%);
}

.stage-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spotlight {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 300px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 200, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.presenter {
  text-align: center;
}

.presenter-avatar {
  font-size: 4rem;
  animation: bounce 0.5s ease-in-out infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.presenter-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: var(--crt-green);
  margin-top: 0.5rem;
}

.tech-display {
  background: var(--charcoal);
  border: 3px solid var(--crt-amber);
  border-radius: 8px;
  padding: 1rem;
  width: 100%;
  max-width: 350px;
  box-shadow: 
    0 0 20px rgba(255, 176, 0, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.tech-screen {
  background: #0a0a0a;
  border-radius: 50% / 10%;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tech-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.tech-emoji {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.tech-name {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--crt-amber);
  text-shadow: 0 0 5px var(--crt-amber);
}

.tech-brand {
  font-size: 0.9rem;
  color: var(--teal);
  margin-top: 0.25rem;
}

.tech-year {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: var(--magenta);
  margin-top: 0.5rem;
}

.love-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #3a2a1a 0%, #2a1a0a 100%);
  border-radius: 4px;
  border-left: 3px solid var(--magenta);
}

.love-note-label {
  display: block;
  font-size: 0.8rem;
  color: var(--magenta);
  margin-bottom: 0.25rem;
}

.love-note-text {
  font-style: italic;
  color: var(--beige);
  font-size: 0.9rem;
}

.stage-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.timer {
  background: #0a0a0a;
  border: 2px solid var(--crt-green);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  text-align: center;
}

.timer-display {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  color: var(--crt-green);
  text-shadow: 0 0 10px var(--crt-green);
}

.timer-label {
  font-size: 0.6rem;
  color: var(--dark-beige);
}

.applause-meter {
  flex: 1;
  min-width: 120px;
}

.meter-label {
  font-size: 0.7rem;
  color: var(--beige);
  margin-bottom: 0.25rem;
}

.meter-bar {
  background: #0a0a0a;
  border: 2px solid var(--magenta);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--magenta) 50%, #ff69b4 100%);
  transition: width 0.3s ease-out;
  box-shadow: 0 0 10px var(--magenta);
}

.cheer-button {
  background: linear-gradient(180deg, var(--teal) 0%, #008080 100%);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 0 #006060, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.cheer-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #006060, 0 8px 15px rgba(0, 0, 0, 0.3);
}

.cheer-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #006060;
}

.queue-section, .leaderboard {
  background: linear-gradient(180deg, var(--charcoal) 0%, #1a1a1a 100%);
  border: 2px solid var(--dark-beige);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.queue-title, .leaderboard-title, .panel-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--crt-amber);
  margin-bottom: 1rem;
  text-align: center;
}

.queue-list, .leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.queue-item, .leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.queue-item.current {
  background: rgba(255, 176, 0, 0.2);
  border: 1px solid var(--crt-amber);
}

.queue-item.presented {
  opacity: 0.5;
}

.queue-avatar, .leaderboard-rank {
  font-size: 1.2rem;
}

.queue-name, .leaderboard-name {
  flex: 1;
  color: var(--beige);
}

.queue-tech, .leaderboard-tech {
  font-size: 1.2rem;
}

.queue-score, .leaderboard-score {
  color: var(--crt-green);
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.crowd-section {
  position: relative;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
  overflow: hidden;
}

.crowd-silhouettes {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.crowd-person {
  font-size: 2rem;
  opacity: 0.6;
  animation: cheer 0.3s ease-in-out infinite alternate;
}

@keyframes cheer {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-3px) scale(1.05); }
}

.reactions-container {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 100px;
  pointer-events: none;
}

.floating-reaction {
  position: absolute;
  bottom: 0;
  font-size: 1.5rem;
  animation: float-up 2s ease-out forwards;
}

@keyframes float-up {
  from { 
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to { 
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
}

.judge-panel {
  background: linear-gradient(180deg, var(--charcoal) 0%, #1a1a1a 100%);
  border: 2px solid var(--dark-beige);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.judges-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.judge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.judge-avatar {
  font-size: 2rem;
}

.judge-name {
  font-size: 0.8rem;
  color: var(--beige);
  font-weight: bold;
}

.judge-title {
  font-size: 0.6rem;
  color: var(--dark-beige);
}

.score-card {
  margin-left: auto;
  background: var(--beige);
  color: var(--charcoal);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  transition: all 0.5s;
  transform-style: preserve-3d;
}

.score-card.revealed {
  animation: flip-card 0.5s ease-out;
  background: var(--crt-green);
  color: #0a0a0a;
}

@keyframes flip-card {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

.prize-display {
  background: linear-gradient(180deg, #4a3a0a 0%, #2a1a0a 100%);
  border: 3px solid #ffd700;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.prize-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
}

.prize-icon {
  font-size: 4rem;
  position: relative;
  z-index: 1;
  animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { filter: drop-shadow(0 0 10px #ffd700); }
  50% { filter: drop-shadow(0 0 20px #ffd700) brightness(1.2); }
}

.prize-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #ffd700;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.prize-name {
  font-size: 0.8rem;
  color: var(--beige);
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.control-panel {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.control-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.start-btn {
  background: linear-gradient(180deg, var(--crt-green) 0%, #00aa00 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 0 #006600, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.next-btn {
  background: linear-gradient(180deg, var(--crt-amber) 0%, #cc8800 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 0 #996600, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(2px);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--beige);
  font-size: 0.8rem;
}

.speed-control select {
  background: var(--charcoal);
  color: var(--beige);
  border: 2px solid var(--dark-beige);
  border-radius: 4px;
  padding: 0.5rem;
  font-family: 'Space Mono', monospace;
}

.winner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.winner-card {
  background: linear-gradient(135deg, #2a1a3a 0%, #1a0a2a 100%);
  border: 4px solid #ffd700;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: scale-in 0.5s ease-out 0.3s both;
  max-width: 90%;
  width: 400px;
}

@keyframes scale-in {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.winner-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  color: #ffd700;
  text-shadow: 0 0 20px #ffd700;
  margin-bottom: 1rem;
}

.winner-avatar {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.winner-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--crt-green);
  margin-bottom: 0.5rem;
}

.winner-tech {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  color: var(--beige);
  margin-bottom: 0.5rem;
}

.winner-emoji {
  font-size: 2rem;
}

.winner-score {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  color: var(--crt-amber);
  margin-bottom: 1rem;
}

.winner-prize {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #ffd700;
  margin-bottom: 1.5rem;
}

.restart-btn {
  background: linear-gradient(180deg, var(--teal) 0%, #008080 100%);
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 0 #006060;
}

.restart-btn:hover {
  transform: translateY(-2px);
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--dark-beige);
  font-size: 0.8rem;
}

.footer a {
  color: var(--crt-amber);
  text-decoration: none;
  font-weight: bold;
}

.footer a:hover {
  text-shadow: 0 0 10px var(--crt-amber);
}

.footer p {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .left-column, .right-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .queue-section, .leaderboard, .judge-panel, .prize-display {
    flex: 1;
    min-width: 200px;
  }
  
  .stage {
    min-height: 350px;
  }
  
  .tech-display {
    max-width: 100%;
  }
  
  .judges-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .judge {
    flex-direction: column;
    text-align: center;
    min-width: 80px;
  }
  
  .score-card {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}