:root {
  --font-main: 'Noto Sans KR', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: #000; /* Deep black background */
  color: #fff;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Fireworks Canvas */
#fireworks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Base Neon Animation */
@keyframes neon-cycle {
  0% {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, inset 0 0 5px #ff0000;
    text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
  }
  20% {
    border-color: #ffff00;
    color: #ffff00;
    box-shadow: 0 0 5px #ffff00, 0 0 10px #ffff00, inset 0 0 5px #ffff00;
    text-shadow: 0 0 5px #ffff00, 0 0 10px #ffff00;
  }
  40% {
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, inset 0 0 5px #00ff00;
    text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00;
  }
  60% {
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, inset 0 0 5px #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
  }
  80% {
    border-color: #0000ff;
    color: #0000ff;
    box-shadow: 0 0 5px #0000ff, 0 0 10px #0000ff, inset 0 0 5px #0000ff;
    text-shadow: 0 0 5px #0000ff, 0 0 10px #0000ff;
  }
  100% {
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, inset 0 0 5px #ff00ff;
    text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff;
  }
}

/* Panel - Transparent with Neon Border */
.panel {
  width: min(800px, 100%);
  padding: 40px;
  border-radius: 30px;
  background: transparent; /* No background */
  border: 3px solid #fff; /* Fallback */
  
  /* Apply Neon Animation */
  animation: neon-cycle 4s linear infinite alternate;
  
  text-align: center;
  position: relative;
  z-index: 1;
}

.title {
  margin: 0 0 30px 0;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  /* Inherits neon color/shadow from animation if applied directly, 
     but let's make the title sync with the panel or have its own faster cycle */
  animation: neon-cycle 4s linear infinite alternate;
}

.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  justify-content: center;
}

/* Neon Buttons */
button {
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 50px;
  padding: 14px 32px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.2s;
  
  animation: neon-cycle 3s linear infinite alternate-reverse; 
}

button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

button:active {
  transform: scale(0.95);
}

.sets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Set Row */
.set {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 25px;
  border-radius: 20px;
  background: transparent;
  border: 2px solid currentColor;
  
  animation: neon-cycle 5s linear infinite;
  animation-delay: calc(var(--i, 0) * 0.5s); /* Staggered if we add var */
}

.label {
  font-size: 1.2rem;
  font-weight: 700;
  width: 60px;
  text-align: left;
  /* Glow handled by parent or inherit */
  text-shadow: inherit;
}

.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  flex: 1;
  justify-content: center;
}

/* Neon Balls - Outline Only */
.ball {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  
  background: transparent;
  border: 3px solid currentColor;
  
  /* Each ball can have its own speed or phase */
  animation: neon-cycle 2s linear infinite;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .panel {
    padding: 20px;
    width: 100%;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .set {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }
  
  .label {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  
  .ball {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}