/* General Styles */
body {
  margin: 0;
  overflow: hidden;
  background-color: #000; /* Black background */
  color: #fff; /* White text */
  font-family: Verdana, sans-serif; /* Changed to Verdana */
}

/* Centered Container */
#startScreen,
#selectionScreen {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Start Screen Styles */
#startScreen {
  top: 40%; /* Moved from 50% to 40% to position higher */
  text-align: center;
  z-index: 10; /* Ensure start screen is on top */
}

#startScreen h1 {
  font-family: Futura, sans-serif; /* Ensures Verdana font */
  font-size: 100px;
  margin-bottom: 20px;
  animation: zoomIn 0.8s ease-out forwards; /* Fast zoom-in animation */
  transform: scale(0.5); /* Initial scale for zoom effect */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Added text shadow */
}

/* Blue Button Styling */
.blueButton {
  padding: 15px 30px;
  font-size: 24px;
  cursor: pointer;
  animation: pulse 2s infinite;
  background-color: #1e90ff;
  border: none;
  border-radius: 8px;
  color: #fff;
  transition: background-color 0.3s;
}

.blueButton:hover {
  background-color: #63b3ed;
}

/* New Button Styling (Blue Dropdown Button) */
.blueDropdownButton {
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  animation: fadeIn 1.5s ease-in-out;
  background-color: #1e90ff;
  color: #fff;
  width: 200px; /* Match the width of blueDropdown */
  transition: background-color 0.3s;
}

.blueDropdownButton:hover {
  background-color: #63b3ed; /* Same hover effect as blueButton */
}

/* Selection Screen Styles */
#selectionScreen {
  top: 50%; /* Remains centered */
  text-align: center;
  z-index: 9; /* Below the start screen */
}

#selectionScreen h2 {
  font-size: 36px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Added text shadow */
}

.selection-group {
  display: flex; /* Enable Flexbox */
  justify-content: center; /* Center the buttons horizontally */
  gap: 20px; /* Add space between buttons */
  margin-bottom: 30px;
}

/* Ensure buttons are uniformly sized */
.vocalRangeButton {
  padding: 15px 25px;
  font-size: 20px;
  cursor: pointer;
  animation: pulse 2s infinite;
  background-color: #1e90ff;
  border: none;
  border-radius: 8px;
  color: #fff;
  transition: background-color 0.3s;
  flex: 1; /* Allow buttons to grow equally */
  max-width: 150px; /* Optional: Limit maximum width */
}

.vocalRangeButton:hover {
  background-color: #63b3ed;
}

.blueDropdown {
  padding: 10px;
  font-size: 18px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  animation: fadeIn 1.5s ease-in-out;
  background-color: #1e90ff;
  color: #fff;
  width: 200px; /* Adjusted width for consistency */
}

.blueDropdown option {
  background-color: #1e90ff;
  color: #fff;
}

/* Top Left Menus Styles */
#topLeftMenus {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 8; /* Below the selection screen */
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Basic menu container */
.menu {
  display: flex;
  align-items: center;
}

/* Style for ALL dropdowns in the top left */
#instrumentSelectTop,
#keySignatureSelect,
#modeSelect,
#noteNameSelect,
#levelSelect {
  width: 40px;
  font-size: 11px;
  padding: 2px;
  border: 1px solid #1e90ff;
  background-color: #1e90ff;
  color: white;
  border-radius: 3px;
  cursor: pointer;
}

/* Style for the reference pitch button */
#referencePitchButton {
  width: 40px;
  font-size: 9px;
  padding: 2px;
  border: 1px solid #1e90ff;
  background-color: #1e90ff;
  color: white;
  border-radius: 3px;
  cursor: pointer;
  white-space: normal;
  line-height: 1;
}

/* Remove all other dropdown and button styles that might conflict */
.blueDropdown,
.blueDropdownButton {
  width: auto;
}

/* Canvas Styles */
#visualizer {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* Background canvas */
}

/* Solfege and Pitch Names Styling */
.noteLabel {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Animations */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5); /* Start smaller */
  }
  to {
    opacity: 1;
    transform: scale(1); /* Scale to normal size */
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(30, 144, 255, 1);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
  }
}

/* Responsive Dropdowns */
@media (max-width: 600px) {
  #topLeftMenus {
    flex-direction: column;
    gap: 5px;
  }

  .menu select {
    font-size: 12px;
    padding: 4px;
    width: 40px;
  }

  .blueDropdown {
    width: 40px;
  }

  .noteLabel {
    font-size: 16px;
  }

  /* Adjust start screen positioning for smaller screens */
  #startScreen {
    top: 35%; /* Further adjust if needed */
  }

  #startScreen h1 {
    font-size: 80px; /* Reduce font size for smaller screens */
  }

  .blueButton {
    padding: 12px 25px;
    font-size: 20px;
  }

  /* Adjust h2 text size for smaller screens */
  #selectionScreen h2 {
    font-size: 28px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Optional: Adjusted text shadow for smaller screens */
  }

  /* Adjust new button's width for smaller screens */
  .blueDropdownButton {
    width: 40px; /* Adjusted width for smaller screens */
  }
}

/* Make the top-left menu styles more specific and forceful */
#topLeftMenus .menu select,
#topLeftMenus #instrumentSelectTop,
#topLeftMenus #keySignatureSelect,
#topLeftMenus #modeSelect,
#topLeftMenus #noteNameSelect,
#topLeftMenus #levelSelect {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  font-size: 11px !important;
  padding: 0 !important;
  margin: 1px !important;
  border: 1px solid #1e90ff !important;
  background-color: #1e90ff !important;
  color: white !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Style for the reference pitch button */
#topLeftMenus #referencePitchButton {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  font-size: 10px !important;
  padding: 0 !important;
  margin: 1px !important;
  border: 1px solid #1e90ff !important;
  background-color: #1e90ff !important;
  color: white !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Remove any conflicting styles */
.blueDropdown,
.blueDropdownButton,
.menu select {
  width: 50px !important;
  padding: 0 !important;
  margin: 1px !important;
  box-sizing: border-box !important;
}
