/* --- Retro Style --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* --- Start Screen --- */
#arcadeStartScreen {
    position: fixed;
    top: -40px;
    left: -40px;
    width: 98%;
    height: 96.5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-wrap: break-word;

    background: radial-gradient(circle at center, #15001a, #02010a 70%, #000000 100%);
    font-family: 'Press Start 2P', monospace;
    color: #0f0;

    border-radius: 100px;
    border: 50px solid #000080;
  
    box-shadow:
      0 0 20px #000080,
      0 0 35px #0B0B45,
      inset 0 0 30px rgba(0, 100, 255, 0.6),
      inset 0 0 60px rgba(0, 100, 255, 0.3);

    z-index: 9999;
    pointer-events: auto;

    animation: crtFlicker 0.2s infinite alternate;
}

/* TV Static */
#arcadeStartScreen::after {
    content: "";
    position: fixed;
    width: 200%;
    height: 200%;
    top: 0;
    left: -10px;
    background-image: radial-gradient(white 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    opacity: 0.3;
    animation: starsMove 60s linear infinite;

}

#arcadeTitle {
    font-size: 5vh;
    color: #AD03DE;
    text-shadow:
        0 0 5px #692222,
        0 0 10px #AD03DE,
        0 0 20px #AD03DE;
    margin-bottom: 30px;
}

#arcadeSubtitle {
    font-size: 2.5vh;
    color: cyan;
    text-shadow:
        0 0 5px cyan,
        0 0 10px #0099ff;
    margin-bottom: 60px;
}

#pressStart {
    font-size: 2.5vh;
    animation: blink 0.8s infinite steps(2);
    text-align: center;
}

/* --- Main Screen --- */
body {
  margin: 0;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  color: cyan;
  text-shadow: 0 0 6px cyan;
  line-height: 30px;
}

#arcade-screen {
    position: fixed;
    top: -40px;
    left: -40px;
    width: 98%;
    height: 96.5%;
    pointer-events: none;
    border-radius: 100px;
    border: 50px solid #000080;
    box-shadow:
      0 0 20px #000080,
      0 0 35px #0B0B45,
      inset 0 0 30px rgba(0, 100, 255, 0.6),
      inset 0 0 60px rgba(0, 100, 255, 0.3);
}
  
#arcade-screen::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: 0;
    left: -10px;
    background-image: radial-gradient(white 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    opacity: 0.3;
    animation: starsMove 60s linear infinite;
}

/* --- Game State Text --- */
#state, #group-id {
    position: fixed;
    padding: 8px 22px;
    background: rgba(0,0,0,0.5);
    border: 2px solid cyan;
    box-shadow: 0 0 8px cyan;
    border-radius: 4px;
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 20px;
}

/* Top-left Game State */
#state {
    top: 15px;
    left: 15px;
}

/* Top-right group ID */
#group-id {
    top: 15px;
    right: 15px;
}

/* -- UI -- */
#uiToggle {
    position: fixed;
    top: 185px;
    left: -75px;
    padding: 10px 15px;
    background: black;
    color: #AD03DE;
    border: 3px solid #AD03DE;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    z-index: 9999;
    text-shadow: 0 0 8px #AD03DE;
    border-radius: 6px;
    box-shadow: 0 0 10px #AD03DE;
    transition: transform 0.3s ease-in-out;
    transform: rotateZ(90deg);
}

#uiToggle:hover {
    background: #AD03DE;
    color: black;
    transform: rotateZ(90deg);
}

#uiToggle.open {
    transform: rotateZ(90deg);
}

/* Slide UI panel */
#ui {
    position: fixed;
    top: 108px;
    left: -20px;
    padding: 10px 14px 10px 80px;
    background: rgba(0,0,0,0.6);
    color: #AD03DE;
    text-shadow: 0 0 8px #AD03DE;
    font-size: 12px;
    border: 2.5px solid #AD03DE;
    border-radius: 6px;
    box-shadow: 0 0 12px #AD03DE;
    transform: translateX(-120%);
    transition: transform 0.3s ease-in-out;
    line-height: 17px;
}

#uiText {
    font-size: 15px;
    padding: 15px 10px;
}

#ui.open {
    transform: translateX(0);
}

/* Custom neon checkbox box */
.custom-checkbox .checkmark {
    left: -17px;
    width: 11px;
    height: 11px;
    border: 3px solid #AD03DE;
    border-radius: 4px;
    box-shadow: 0 0 8px #AD03DE;
    transition: 0.15s;
    position: relative;
    background-color: black;
  }
  
/* Checkmark glow effect */
.custom-checkbox input:checked + .checkmark {
    background: #be17ec;
    box-shadow: 0 0 12px #be17ec, inset 0 0 6px #000;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #AD03DE;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 0 8px #AD03DE;
}

#song {
    padding: 15px 10px;
    color: #AD03DE;
    text-shadow: 0 0 8px #AD03DE;
    font-size: 14px;
}

/* --- End Message --- */
#end {
    display: none;
    position: absolute;
    top: 40%;
    width: 100%;
    text-align: center;
    font-size: 3em;
    color: #f00;
    text-shadow: 0 0 12px rgb(155, 4, 4), 0 0 24px red;
}

#highScoreMessage {
    display: none;
    position: absolute;
    top: -65px;
    width: 100%;
    text-align: center;
    font-size: 0.5em;
    color: white;
    text-shadow: 0 0 12px cyan, 0 0 24px white;
}

/* --- Level Message --- */
#difficulty {
    display: none;
    position: absolute;
    top: 80%;
    width: 100%;
    text-align: center;
    font-size: 2.2em;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
}

/* --- Point Meassage --- */
#hitMessage {
    position: absolute;
    top: 57%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    color: red;
    text-shadow: 0 0 10px red, 0 0 20px red;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

#pointLoss {
    position: absolute;
    top: 47%;
    left: 45%;
    transform: translate(-50%, -50%);
    font-size: 0.5em;
    color: red;
    text-shadow: 0 0 10px rgb(182, 2, 2), 0 0 20px red;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

#pointGain {
    position: absolute;
    top: 47%;
    left: 55%;
    transform: translate(-50%, -50%);
    font-size: 0.5em;
    color: #0f0;
    text-shadow: 0 0 10px green, 0 0 20px green;
    font-weight: bold;
    display: none;
    z-index: 1000;
}

/* --- Buttons --- */
button {
  margin-top: 10px;
  padding: 8px 20px;
  background: black;
  color: #0f0;
  border: 3px solid #0f0;
  font-family: 'Press Start 2P', monospace;
  text-shadow: 0 0 8px #0f0;
  cursor: pointer;
  transition: 0.15s;
  border-radius: 4px;
}

button:hover {
  background: #0f0;
  color: black;
  text-shadow: none;
  box-shadow: 0 0 12px #0f0;
  transform: scale(1.1);
}

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

#restartButton {
    animation: blink 1s infinite steps(2);
}

#restartButton:hover {
    animation: none;
}

#modeButton {
    padding: 8px 41px;
    margin-top: 10px;
    margin-bottom: 10px;
    color: cyan;
    border: 3px solid cyan;
    text-shadow: 0 0 6px cyan;
}

#modeButton:hover {
    background: cyan;
    color: black;
    box-shadow: 0 0 12px cyan;
}

/* -- Audio Input -- */
#songPicker {
    display: none;
}
  
#songPickerLabel {
    margin-top: 15px;
    padding: 8px 35px;
    background: black;
    color: #AD03DE;
    border: 3px solid #AD03DE;
    font-family: 'Press Start 2P', monospace;
    font-size: 1em;
    text-shadow: 0 0 6px #AD03DE;
    cursor: pointer;
    transition: 0.15s;
    border-radius: 4px;
    display: inline-block;  
}
  
/* Hover effect */
#songPickerLabel:hover {
    background: #AD03DE;
    color: black;
    text-shadow: none;
    box-shadow: 0 0 12px #AD03DE;
    transform: scale(1.1);
}
  
/* Active click effect */
#songPickerLabel:active {
    transform: scale(0.95);
}


/* --- Key Frames --- */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes crtFlicker {
    0% { opacity: 0.97; }
    100% { opacity: 1; }
}

@keyframes starsMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-600px); }
}
