* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  color: #333;
  text-align: center;
  background-color: #f4f4f9;
}

.player-shell {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
  position: relative;
  overflow: visible;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.player-header { padding: 0; }
.eyebrow { margin: 0 0 6px; color: #6483aa; font-size: 12px; font-weight: bold; }
h1 { margin: 0 0 12px; color: #4a90e2; }

.select-group { display: flex; gap: 10px; margin: 18px 0 15px; }
.select-field { min-width: 0; flex: 1; text-align: left; }
.song-field { flex: 1.35; }
.select-label { display: block; color: #6483aa; font-size: 13px; font-weight: bold; }
.custom-select { position: relative; margin-top: 8px; }

.select-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ccd7e5;
  border-radius: 6px;
  color: #334e70;
  font: inherit;
  text-align: left;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger i { width: 8px; height: 8px; flex: 0 0 auto; border-right: 2px solid #6483aa; border-bottom: 2px solid #6483aa; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease; }
.select-trigger:hover:not(:disabled) { border-color: #7aaee9; background: #f8fbff; }
.select-trigger:focus-visible { border-color: #4a90e2; outline: 3px solid rgba(74, 144, 226, 0.16); }
.select-trigger:disabled { color: #98a5b3; background: #f3f5f7; cursor: not-allowed; }
.custom-select.is-open .select-trigger { border-color: #4a90e2; box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.16); }
.custom-select.is-open .select-trigger i { transform: rotate(225deg) translate(-2px, -2px); }

.select-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 230px;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 59, 83, 0.16);
}

.select-option { width: 100%; padding: 10px; border: 0; border-radius: 4px; color: #334e70; font: inherit; text-align: left; background: transparent; cursor: pointer; }
.select-option:hover,
.select-option:focus-visible { color: #246fbe; background: #edf6ff; outline: none; }
.select-option[aria-selected="true"] { color: #246fbe; font-weight: bold; background: #e5f2ff; }

.now-playing { padding: 0; }
#now-playing-title { margin: 10px 0 0; overflow-wrap: anywhere; color: #6483aa; font-size: 14px; font-weight: bold; }

audio { width: 100%; height: 50px; margin-top: 15px; padding: 2px; border: 0; border-radius: 50px; background-color: rgba(22, 150, 255, 0.33); }

#song-lyrics { height: 200px; margin-top: 25px; padding: 15px; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; color: #6483aa; font-weight: 550; line-height: 25px; background: #fafafa; scroll-behavior: smooth; }
.lyric-line { margin: 0; padding: 10px 0; color: #6483aa; font-size: 16px; transition: color 0.3s ease, font-size 0.3s ease, transform 0.3s ease; }
.lyric-line.active { color: #4a90e2; font-size: 18px; font-weight: bold; transform: scale(1.05); }
.empty-state { margin: 65px 0 0; color: #4a90e2; }

@media (max-width: 520px) {
  body { padding: 12px; }
  .player-shell { padding: 22px 16px; }
  .select-group { flex-direction: column; }
  .custom-select { margin-top: 7px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.song-search { position: absolute; z-index: 20; top: 16px; left: 16px; text-align: left; }
.icon-button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #6483aa; background: transparent; cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.icon-button:hover { color: #246fbe; border-color: #d7e5f3; background: #f2f7fc; }
.icon-button:focus-visible { outline: 3px solid rgba(74, 144, 226, 0.2); }
.search-icon { position: relative; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { position: absolute; width: 7px; height: 2px; right: -6px; bottom: -3px; background: currentColor; content: ''; transform: rotate(45deg); transform-origin: left center; }
.search-panel { position: absolute; top: 0; left: 44px; width: min(320px, calc(100vw - 100px)); padding: 8px; border: 1px solid #d7e0ea; border-radius: 6px; background: #fff; box-shadow: 0 12px 28px rgba(36, 59, 83, 0.18); }
.search-panel input { width: 100%; height: 40px; margin: 0; padding: 8px 34px 8px 10px; border: 1px solid #ccd7e5; border-radius: 5px; color: #334e70; font: inherit; }
.search-panel input:focus { border-color: #4a90e2; outline: 3px solid rgba(74, 144, 226, 0.16); }
.search-results { max-height: 260px; margin-top: 5px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-result { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; color: #334e70; font: inherit; text-align: left; background: transparent; cursor: pointer; }
.search-result:hover,
.search-result:focus-visible { color: #246fbe; background: #edf6ff; outline: none; }
.search-result-title { display: block; overflow: hidden; font-weight: bold; text-overflow: ellipsis; white-space: nowrap; }
.search-result-category { display: block; margin-top: 3px; color: #7b8fa6; font-size: 12px; }
.search-empty { margin: 8px 10px; color: #7b8fa6; font-size: 13px; }
