html,
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: url("/images/background.jpg") no-repeat center center;
  background-size: cover;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    
}

em {
  font-size: 0.8rem;
  color: #cbd5f5;
}

.app {
  position: relative;
  z-index: 2;
  height: 100dvh;
  width: 100dvw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Glass card */
.card {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 20px;
  width: 420px;
  text-align: center;
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}


.card h1 {
  font-family: "Honk", system-ui;
  font-size: 4rem;
}

/* Subtitle */
.card p {
  color: #cbd5f5;
  margin-bottom: 25px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 10px 15px;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Dropdown container */
.dropdown {
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
    width: 80px;
}

/* Selected value */
.selected {
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 10px;
    color: white;

}

.arrow {
    margin-left: 5px;
    font-size: 12px;
}

/* Options dropdown */
.options {
    position: absolute;
    top: 120%;
    left: 0;
    width: 100%;
    background: rgba(20,20,20,0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.2s;
}

/* Each option */
.options div {
    padding: 10px;
    color: white;
    transition: 0.2s;
}

.options div:hover {
    background: rgba(255,255,255,0.1);
}

/* Show dropdown */
.dropdown.open .options {
    display: flex;
     opacity: 1;
    transform: translateY(0);
}


/* Input */
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-size: 16px;
}

/* Button */
.search-bar button {
    border: none;
    background: #ff00c3;
    color: black;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.search-bar button:hover {
    transform: scale(1.05);
    background: #ea4fff;
}

/* Focus glow */
.search-bar:focus-within {
    box-shadow: 0 0 20px rgba(255, 161, 255, 0.6);
}

/* Button */
button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
}

.result {
  margin-top: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.result.show {
  opacity: 1;
}

/* Three.js canvas */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

.song-result {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center; 
}

.song-result img {
  width: 64px;
  height: 64px;
  border-radius: 6px;
}

.song-text {
  font-size: 16px;
  font-weight: 500;
}

@media (max-width: 600px) {

  /* Fix viewport issues on mobile */
  html, body {
    height: 100%;
  }

  .app {
    padding: 20px;
  }

  /* Card becomes full width */
  .card {
    width: 100%;
    max-width: 250px;
    padding: 20px 15px;
  }

  /* Title smaller */
  .card h1 {
    font-size: 2.5rem;
  }

  /* Stack search bar vertically */
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-radius: 20px;
  }

  /* Make dropdown + input + button full width */
  .dropdown,
  .search-bar button {
    width: 100%;
  }

  /* Slightly bigger tap targets */
  .selected,
  .search-bar input,
  .search-bar button {
    padding: 12px;
    font-size: 16px;
  }

  /* Input text slightly smaller to fit better */
  .search-bar input {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    transition: 0.3s;
    font-size: 14px;
  }

  .search-bar input:focus {
    border: 1px solid #ff00c3;
    box-shadow: 0 0 12px rgba(255, 0, 195, 0.7);
}

  /* Result spacing */
  .result {
    margin-top: 15px;
    font-size: 16px;
  }
}

