html, body {
  overflow: hidden;
  margin: 0;
  font-family: 'Road Rage';
  height: 100%;
  background: url('../img/background.png') center/cover no-repeat fixed;
  background-color: #000;
}

input {
  color: white;
}

audio {
  position: absolute;
  right: 0;
  display: none;
}

#first-page-container {
  width: 100%;
  height: 100%;
}

#background {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0.25);
  pointer-events: none;
  user-select: none;
  opacity: 0.9;
  -moz-opacity: 0.9;
  -webkit-opacity: 0.9;
}

#logo {
  width: 62.5%;
  height: 62.5%;
  display: block;
  margin: 0 auto;
}

#first-page-container .content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

#first-page-container .content .title {
  font-family: 'Road Rage';
  color: #6a0dad;
  font-size: 3rem;
  font-weight: 700;
  display: flex;
  margin: 2rem auto;
  pointer-events: none;
  user-select: none;
  justify-content: center;
  text-shadow: 0 0 10px #000, 0 0 20px #000, 0 0 30px #6a0dad; /* Added glow/shadow for readability */
}

#first-page-container .content .button-container {
  display: flex;
  justify-content: center;
}

#first-page-container .content button {
  font-family: 'Road Rage';
  background-color: #6a0dad;
  display: inline-block;
  padding: 0.75rem 3rem;
  margin: 1rem auto;
  border-radius: 20px;
  color: #ff00ff;
  text-align: center;
  border: none;
  outline: none;
  transition: .2s all cubic-bezier(0.075, 0.82, 0.165, 1);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 15px rgba(106, 13, 173, 0.5), 0 4px 8px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
  text-shadow: 2px 2px 4px #000, -2px -2px 4px #000, 2px -2px 4px #000, -2px 2px 4px #000;
  /* Mobile touch improvements */
  -webkit-tap-highlight-color: rgba(106, 13, 173, 0.3);
  touch-action: manipulation;
  min-height: 44px; /* Minimum touch target size for mobile */
  position: relative;
  z-index: 10; /* Ensure button is above other elements */
}

#first-page-container .content button:focus {
  outline: none;
}

#first-page-container .content button:hover {
  filter: brightness(0.6);
  box-shadow: 0 0 25px rgba(106, 13, 173, 0.8);
}

.dropdown-container {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
  width: 100%;
}

#categories-input {
  font-family: 'Road Rage', Arial, Helvetica, sans-serif;
  margin: 1rem auto;
  display: block;
  color: #fff;
  background: #6a0dad;
  font-size: 1.5rem; /* Increased font size */
  line-height: 1.25rem;
  border-radius: 0.5rem;
  transition: all cubic-bezier(0.23, 1, 0.320, 1);
  padding: 0.75rem 2rem 0.75rem 1rem; /* Reduced right padding */
  border: none;
  outline: none;
  box-shadow: 0 0 15px rgba(106, 13, 173, 0.5);
  width: auto; /* Let width be determined by content */
  min-width: 200px; /* Minimum width */
  text-align: center; /* Center text */
  cursor: pointer;
}

#categories-input option {
  font-family: 'Road Rage', Arial, Helvetica, sans-serif !important; /* Force font */
  border: none;
  outline: none;
  font-size: 1.25rem; /* Increased option font size */
  line-height: 1.25rem;
  background-color: #6a0dad; /* Ensure background matches */
  color: white;
  padding: 10px;
}

#second-page-container {
  display: none;
}

#bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
  pointer-events: none;
}

/* Force UI to be above overlay */
#current-song-container, #stop-song-button, #go-back-button, #track-counter {
  font-family: 'Road Rage';
  position: absolute;
  margin: 1rem;
  color: #ff00ff !important;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: .2s all cubic-bezier(0.075, 0.82, 0.165, 1);
  z-index: 3000 !important;
  font-size: 2rem;
  text-shadow: 2px 2px 4px #000, -2px -2px 4px #000, 2px -2px 4px #000, -2px 2px 4px #000;
}

#current-song-container *, #stop-song-button *, #go-back-button *, #track-counter * {
  color: #ff00ff !important;
}

#current-song, #current-track, #total-tracks {
  color: #ff00ff !important;
}

#current-song-container {
  bottom: 0;
  left: 0;
}

#stop-song-button {
  bottom: 0;
  right: 0;
}

#go-back-button {
  top: 0;
  left: 0;
}

#track-counter {
  top: 0;
  right: 0;
  text-align: right;
}

#song-timer {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #ff00ff !important;
  text-shadow: 2px 2px 4px #000, -2px -2px 4px #000, 2px -2px 4px #000, -2px 2px 4px #000;
}

#game-timer {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #ff00ff !important;
  text-shadow: 2px 2px 4px #000, -2px -2px 4px #000, 2px -2px 4px #000, -2px 2px 4px #000;
}

#album-art-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1500;
  width: 400px;
  height: 400px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* LP/CD cover effect with depth */
  box-shadow: 
    0 0 0 8px #1a1a1a,
    0 0 0 12px #333,
    0 0 0 16px #1a1a1a,
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid #000;
}

#album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#album-art.loaded {
  opacity: 1;
}

#stop-song-button:hover, #go-back-button:hover {
  opacity: 0.8;
}

#countdown {
  display: none;
  color: #ff00ff;
  font-size: 10.5rem;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  font-family: 'Road Rage';
  text-shadow: 3px 3px 6px #000, -3px -3px 6px #000, 3px -3px 6px #000, -3px 3px 6px #000;
}

#how-to-play {
  display: block;
  margin: 0 auto;
  color: #6e8da5;
  cursor: pointer;
  user-select: none;
  transition: .2s all cubic-bezier(0.075, 0.82, 0.165, 1);
  text-align: center;
  font-family: 'Road Rage';
}

#how-to-play:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  #stop-song-button {
    bottom: unset;
  }
}

@font-face {
  font-family: "Road Rage";
  src: url("/fonts/Road_Rage.otf");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Bootbox / Modal Styles */
.bootbox .modal-content {
    background-color: #000;
    border: 2px solid #6a0dad;
    color: white;
    font-family: 'Road Rage';
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.5);
}

.bootbox .modal-header {
    border-bottom: none; /* Removed border */
}

.bootbox .modal-footer {
    border-top: none; /* Removed border */
}

.bootbox .modal-title {
    color: #6a0dad;
    font-size: 2rem;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.bootbox .modal-body {
    font-size: 1.5rem; /* Increased from default */
    line-height: 1.8rem;
}

.bootbox .close {
    color: white;
    text-shadow: none;
    opacity: 1;
}

.bootbox .btn-primary {
    background-color: #6a0dad;
    border-color: #6a0dad;
    font-family: 'Road Rage';
}

.bootbox .btn-primary:hover {
    background-color: #550a8a;
    border-color: #550a8a;
}

/* Mobile Play Overlay */
#mobile-play-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Road Rage';
}

#mobile-play-overlay > div {
    text-align: center;
    padding: 2rem;
    background: rgba(106, 13, 173, 0.3);
    border-radius: 20px;
    border: 2px solid #6a0dad;
    box-shadow: 0 0 30px rgba(106, 13, 173, 0.8);
}

#mobile-play-overlay h2 {
    color: #ff00ff;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px #000;
}

#mobile-play-overlay p {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

#mobile-play-button {
    font-family: 'Road Rage';
    background-color: #6a0dad;
    padding: 1rem 3rem;
    border-radius: 20px;
    color: #ff00ff;
    text-align: center;
    border: none;
    outline: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.5), 0 4px 8px rgba(0, 0, 0, 0.6);
    text-shadow: 2px 2px 4px #000;
    -webkit-tap-highlight-color: rgba(106, 13, 173, 0.3);
    touch-action: manipulation;
    min-height: 44px;
    transition: all 0.2s ease;
}

#mobile-play-button:active {
    filter: brightness(0.6);
    transform: scale(0.95);
}

