@font-face {
  font-family: "SBAggroB";
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SBAggroB.woff")
    format("woff");
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #222831;
  --secondary-color: #393e46;
  --text-color: #eeeeee;
  --accent-color: #e74c3c;
  --hover-color: #e74d3c9a;
  --background-light: #4c5058;
  --scrollbar-thumb: #555;
  --scrollbar-track: #2b3038;
}

* {
  font-family: "SBAggroB", sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--primary-color);
  color: var(--text-color);
  user-select: none;
  overflow: auto;
  padding: 20px;
}

#logo {
  width: 64px;
  height: 64px;
  vertical-align: middle;
  margin-right: -8px;
  margin-top: -8px;
}

h1 {
  font-size: 2.5rem;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

#version {
  font-size: 0.7rem;
  color: var(--text-color);
  text-align: center;
  margin-top: -20px;
  font-style: italic;
}

#inputArea {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
}

#videoUrl {
  padding: 10px;
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
  background-color: var(--background-light);
  color: var(--text-color);
  flex-grow: 1;
  min-width: 200px;
}

#randButton,
#playButton {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#randButton:hover,
#playButton:hover {
  background-color: var(--hover-color);
}

#volumeControls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  width: 100%;
  max-width: 800px;
}

.volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: var(--background-light);
  border-radius: 5px;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.volumeSlider:hover {
  opacity: 1;
}

#gameContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
}

#player {
  margin-bottom: 20px;
  border: 3px solid var(--secondary-color);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  width: 640px;
  height: 360px;
}

#gameArea {
  width: 400px;
  height: 300px;
  border: 3px solid var(--secondary-color);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--secondary-color);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.note {
  position: absolute;
  box-sizing: border-box;
  z-index: 2;
  border-radius: 5px;
}

.note.hit {
  background-color: green;
  opacity: 0;
}

.note.end {
  opacity: 0;
}

#ui {
  display: flex;
  justify-content: space-between;
  width: 400px;
  color: var(--text-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.scoreBoard {
  font-size: 24px;
  font-weight: bold;
}

.hitLine {
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  position: absolute;
  left: 0px;
  z-index: 3;
}

.laneLine {
  width: 3px;
  height: 100%;
  background-color: #666;
  position: absolute;
  top: 0px;
  z-index: 3;
}

.keyArea {
  width: 100%;
  height: 50px;
  position: absolute;
  bottom: 0px;
  left: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}

.laneArea {
  width: 100px;
  height: 100%;
  position: relative;
}

.keyElement {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  font-size: 20px;
  border-top: 3px solid var(--text-color);
  box-sizing: border-box;
  transition: background-color 0.1s linear;
}

#copyright {
  font-size: 0.8rem;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

#copyright a {
  color: inherit;
  text-decoration: none;
}

#songListContainer {
  width: 100%;
  max-width: 800px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid var(--secondary-color);
  margin-top: 20px;
  padding: 10px;
  margin-bottom: 20px;
}

.songItem {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 5px;
  padding: 5px;
  background-color: var(--background-light);
}

.songItem:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.songThumbnail {
  width: 100px;
  height: 60px;
  margin-right: 10px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
}

.songDetails {
  flex-grow: 1;
}

.songTitle {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.songDescription {
  color: #aaa;
  font-size: 0.8em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#songListContainer::-webkit-scrollbar {
  width: 10px;
}

#songListContainer::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 5px;
}

#songListContainer::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track);
  border-radius: 5px;
}

.hitResultEffect {
  font-size: 3em;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 10;
  user-select: none;
  pointer-events: none;
}

.repeatButton {
  padding: 10px 15px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.repeatButton:hover {
  background-color: var(--hover-color);
}

.repeatButton.active {
  background-color: var(--accent-color);
}

.repeatButton.active::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-color);
}

.repeatButton .fa-redo {
  color: #fff;
}

.repeatButton .fa-redo-alt {
  color: #fff;
}

.repeatButton .fa-retweet {
  color: #fff;
}
.repeatButton .fa-random {
  color: #fff;
}

.volumeControlContainer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

.volumeControlLabel {
  font-size: 14px;
}
