:root {
  /* default orb colors*/
  --color-1: #3d3f69;
  --color-2: #565866;
  --color-3: #8da5c4;
  --color-4: #b8a6d9;

  --lyrics-color-inactive: rgba(255, 255, 255, 0.4);
  --lyrics-color-active: #ffffff;
  --background-color: #000000;
  --favorite-color: #ffd700;
  --lyrics-offset: 0px;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #424242;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app-container {
  /* this makes the entire app look the same on smaller screens*/
  width: calc(100vw - 60px);
  max-width: calc((100vh - 60px) * 1.5);
  max-height: calc(100vh - 60px);
  aspect-ratio: 3 / 2;
  font-size: clamp(10px, 1.3vw, 18px);
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(201, 201, 201, 0.3);
  background-color: var(--background-color);
}

.hidden {
  display: none !important;
}

#main-screen {
  position: relative;
  width: 100%;
  height: 100%;
}

#background-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: blur(120px) brightness(0.7);
  opacity: 0.5;
  transition: opacity 0.8s ease, filter 0.8s ease;
}

.listening-dots {
  animation: blink 1.4s infinite both;
}
.listening-dots:nth-child(2) {
  animation-delay: 0.2s;
}
.listening-dots:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}

.orb {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
}

#orb1 {
  background-color: var(--color-1);
  top: -60%;
  left: -60%;
  animation: move 10s infinite alternate;
}
#orb2 {
  background-color: var(--color-2);
  top: -60%;
  right: -60%;
  animation: move 15s infinite alternate-reverse;
}
#orb3 {
  background-color: var(--color-3);
  bottom: -60%;
  left: -60%;
  animation: move 20s infinite alternate;
}
#orb4 {
  background-color: var(--color-4);
  bottom: -60%;
  right: -60%;
  animation: move 5s infinite alternate-reverse;
}
@keyframes move {
  from {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  to {
    transform: translate(10%, 15%) rotate(180deg) scale(1.2);
  }
}

#left-panel {
  position: absolute;
  left: 40px;
  top: 0;
  width: calc(45% - 70px);
  height: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
  box-sizing: border-box;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#player-info-top,
#player-controls-bottom {
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#player-info-top {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#player-controls-bottom {
  flex: 0 0 auto;
}

#main-screen.recognition-active #scrub-wrapper,
#main-screen.recognition-active #controls-container,
#main-screen.recognition-active #volume-controls,
#main-screen.recognized-mode #scrub-wrapper,
#main-screen.recognized-mode #controls-container,
#main-screen.recognized-mode #volume-controls {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin-bottom: 0 !important;
  overflow: hidden;
}

#scrub-wrapper,
#controls-container,
#volume-controls {
  transition: opacity 0.3s ease, max-height 0.5s ease, margin-bottom 0.5s ease;
  max-height: 100px;
  will-change: opacity, max-height, margin-bottom;
}

#cover-art-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

#cover-art-display {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#cover-art-display[src="#"] {
  visibility: hidden;
}

#song-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  box-sizing: border-box;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

#controls-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

#song-info-overlay .song-title {
  font-size: 1.2em;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}
#song-info-overlay .artist-name {
  font-size: 1.2em;
  font-weight: 400;
  color: #b9b9b9;
  margin-bottom: 0;
}

#song-info-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
  margin-bottom: 15px;
}
#song-info-controls .text-wrapper {
  min-width: 0;
  flex-shrink: 1;
  transition: opacity 0.5s ease;
}
#main-screen.initial-state #song-info-controls .text-wrapper {
  opacity: 0.6;
}
#song-info-controls .song-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.3em;
  margin-bottom: 4px;
}
#song-info-controls .artist-name {
  font-weight: 400;
  color: #a0a0a0;
  font-size: 1.3em;
}

#song-info-controls .actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.song-title,
.artist-name {
  white-space: nowrap;
  overflow: hidden;
}
/* this looks ass */
.marquee-wrapper {
  display: inline-block;
  white-space: nowrap;
  animation: marquee var(--duration) linear infinite;
  animation-play-state: paused;
}
.marquee-content {
  padding-right: 4em;
}
.is-overflowing {
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
}
.is-scrolling {
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

#favorite-button,
#search-open-button,
#recommendations-open-button,
#recognize-button {
  font-size: 1.3em;
  padding: 10px;
}
#favorite-button.favorited {
  color: var(--favorite-color);
}
#favorite-button:disabled,
#search-open-button:disabled,
#recommendations-open-button:disabled,
#recognize-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#recommendations-open-button.radio-active {
  color: #c561ff;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(197, 97, 255, 0.5);
  }
  50% {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(197, 97, 255, 1);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 5px rgba(197, 97, 255, 0.5);
  }
}

#recognize-button.active {
  color: #1ed760;
  transform: scale(1.1);
}

#scrub-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  margin-bottom: 15px;
}
#current-time,
#duration-time {
  font-size: 0.85em;
  color: #a0a0a0;
  flex-shrink: 0;
  font-family: monospace;
}

.slider-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: relative;
}
.slider-bar-container.disabled {
  background-color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}
#scrub-bar-container {
  flex-grow: 1;
}
.slider-bar-fill {
  height: 100%;
  width: 0%;
  background-color: #ffffff;
  border-radius: 3px;
  position: relative;
  transition: width 0.1s linear;
}
.slider-bar-container:not(.disabled) {
  cursor: pointer;
}
.slider-handle {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
  transition: transform 0.2s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.slider-bar-container:not(.disabled):hover .slider-handle {
  transform: translateY(-50%) scale(1);
}

#volume-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
#volume-controls i {
  color: #a0a0a0;
}

#controls-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.control-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.5em;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s, color 0.2s, text-shadow 0.2s;
}
.control-button:hover {
  opacity: 1;
  transform: scale(1.1);
}
.control-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(1);
}
.control-button.active {
  opacity: 1;
  transform: scale(1.1);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
#play-pause-button-container {
  width: 3em;
  height: 3em;
  display: flex;
  justify-content: center;
  align-items: center;
}
#play-pause-button {
  font-size: 3em;
}

#lyrics-container {
  position: absolute;
  left: 45%;
  width: calc(60% - 40px);
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    filter 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.no-lyrics-message {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lyrics-viewport {
  height: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
}
#lyrics-viewport:active {
  cursor: grabbing;
}

#lyrics-content-wrapper {
  text-align: left;
  transform: translateY(var(--lyrics-offset));
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

#lyrics-content-wrapper.is-loading {
  height: 100%;
}

#lyrics-content-wrapper.manual-scroll {
  transition: none;
}

#lyrics-content-wrapper.manual-scroll .line {
  filter: blur(0.5px) !important;
  opacity: 0.8 !important;
  color: var(--lyrics-color-inactive) !important;
}

#search-panel,
#playlist-panel,
#recommendations-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: row;
  padding: 20px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}
.panel-column {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.primary-column {
  flex: 0 0 50%;
  padding-right: 25px;
  box-sizing: border-box;
  min-width: 0;
}
.details-column {
  flex: 0 0 50%;
  padding-left: 25px;
  box-sizing: border-box;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 0;
}
.details-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.details-header img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.details-header-text h2 {
  margin: 0 0 5px 0;
  font-size: 1.8em;
  font-weight: 700;
}
.details-header-text p {
  margin: 0;
  color: #b0b0b0;
  font-size: 1.1em;
}
.details-section-title,
.result-section-header {
  font-weight: 700;
  font-size: 1.2em;
  color: #ffffff;
  margin-top: 20px;
  margin-bottom: 15px;
  padding: 0;
  border: none;
}
.panel-results > .details-section-title:first-child,
.panel-results > .result-section-header:first-child {
  margin-top: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.panel-title {
  font-size: 1.8em;
  font-weight: 700;
}
.panel-close-button {
  font-size: 1.5em;
}
.panel-input {
  width: 100%;
  margin: 0 0 15px 0;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 1em;
  box-sizing: border-box;
  outline: none;
  flex-shrink: 0;
  padding: 14px 16px;
}
.panel-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.panel-results {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
}
.panel-results::-webkit-scrollbar {
  width: 6px;
}
.panel-results::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
.result-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: none;
  position: relative;
}
.result-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
.result-item img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}
.result-text {
  flex: 1;
  min-width: 0;
}
.result-text h3,
.result-text p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-text h3 {
  margin: 0 0 4px 0;
  font-size: 1em;
  font-weight: 400;
  color: #fff;
}
.result-text p {
  margin: 0;
  font-size: 0.9em;
  color: #a0a0a0;
}
.remove-favorite-btn {
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 1.1em;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.remove-favorite-btn:hover {
  color: #f8afaf;
  transform: scale(1.1);
}

.loading-text,
.curating-text {
  font-style: italic;
  color: #a0a0a0;
  text-align: center;
  padding: 20px;
  font-size: 1em;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.sortable-ghost {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.1);
}

#main-screen.panel-active #player-info-top,
#main-screen.panel-active #player-controls-bottom {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}
#main-screen.panel-active #lyrics-container {
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.97);
  pointer-events: none;
}
#main-screen.search-active #search-panel,
#main-screen.playlist-active #playlist-panel,
#main-screen.recommendations-active #recommendations-panel {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.line {
  display: block;
  padding: 0 80px 0 20px;
  margin-bottom: 30px;
  font-size: 2.6em;
  font-weight: 700;
  line-height: 1.2;
  transition: opacity 0.4s, filter 0.4s, color 0.4s, transform 0.4s;
  will-change: filter, opacity, transform;
}

.line.past {
  filter: blur(2.2px);
  opacity: 0.3;
  color: var(--lyrics-color-inactive);
}

.line.future {
  filter: blur(2.2px);
  opacity: 0.6;
  color: var(--lyrics-color-inactive);
}

.line.active {
  filter: blur(0);
  opacity: 1;
  color: var(--lyrics-color-active);
}

.word {
  background: linear-gradient(
    to right,
    var(--lyrics-color-active) 0%,
    var(--lyrics-color-active) 45%,
    var(--lyrics-color-inactive) 55%,
    var(--lyrics-color-inactive) 100%
  );
  background-size: 210% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 0.2s ease-out, transform 0.2s ease-out;
  display: inline-block;
}

.line.line--simple .word {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}

#player-container,
#album-art {
  position: fixed;
  top: -100px;
  left: -100px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#view-toggle-button {
  display: none;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  background-color: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
}

/*coming soon, just need to polish it ;)*/
#recognize-button {
  display: none;
}

.recommendations-menu-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.recommendations-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
.recommendations-menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.recommendations-menu-item .icon {
  font-size: 1.5em;
  width: 1.5em;
  text-align: center;
  color: #a0a0a0;
}
.recommendations-menu-item .text-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.1em;
  font-weight: 700;
}
.recommendations-menu-item .text-content p {
  margin: 0;
  font-size: 0.9em;
  color: #888;
}
.recommendations-context-header {
  font-size: 0.9em;
  font-weight: 700;
  color: #a0a0a0;
  text-transform: uppercase;
  margin-top: 25px;
  margin-bottom: 10px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-active-view,
.daily-discover-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}
.daily-discover-header {
  padding: 0 0 15px 0;
  justify-content: space-between;
  flex-direction: row;
  width: 100%;
}
.daily-discover-header h4 {
  margin: 0;
}
.radio-active-view h2 {
  font-size: 1.8em;
  margin-bottom: 5px;
}
.radio-active-view p {
  color: #a0a0a0;
  margin-bottom: 25px;
}
.stop-radio-button,
.refresh-discover-button {
  background-color: #c561ff;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}
.refresh-discover-button {
  font-size: 0.8em;
  padding: 8px 15px;
  background-color: rgba(255, 255, 255, 0.1);
}
.stop-radio-button:hover,
.refresh-discover-button:hover {
  transform: scale(1.05);
  background-color: #d17cff;
}
.refresh-discover-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
