body {
  margin: 0;
  height: 100vh;
  height: 100dvh; 
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
  overflow: hidden;
}

.floating-container {
  transform-origin: center;
  width: min(300px, 70vmin);
  height: min(300px, 70vmin);
}

.glowing-image {
  width: 100%;
  height: 100%;
  animation: pulse 2s ease-in-out infinite;
  object-fit: cover;
}

.snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}

.snowflake {
  position: absolute;
  background: white;
  border-radius: 50%;
  width: 3px;
  height: 3px;
  animation: fall linear infinite;
}

.corner-button {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  border: none;
  background: none;
  cursor: pointer;
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s ease;
  z-index: 2;
  padding: 0;
  touch-action: manipulation;
}

.corner-button:hover {
  animation: none;
  transform: scale(1.2);
}

.corner-button:active {
  transform: scale(0.95);
}

.corner-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.audio-player {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9em;
  z-index: 2;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);

  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: width 0.3s ease, height 0.3s ease, padding 0.3s ease, background 0.2s ease, max-width 0.3s ease;
  max-width: 40px;
}

.audio-player .audio-symbol {
  font-size: 1.8em;
  line-height: 1;
  display: block; 
}

.audio-player .audio-content {
  display: none; 
  opacity: 0;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

/* Progress Bar Styles */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer; 
  margin-top: 4px; 
  /* margin-bottom: 4px; */
  transition: background-color 0.2s ease;
}

.progress-bar-container:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: #ff0000;
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* Expanded state */
.audio-player.expanded {
  width: auto;
  height: auto;
  padding: 10px 15px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  max-width: 200px;
  cursor: default; 
}

.audio-player.expanded .audio-symbol {
  display: none;
}

.audio-player.expanded .audio-content {
  display: flex; 
  opacity: 1;
}

.time-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.8em;
  /* margin-top: 4px; */
  color: rgba(255, 255, 255, 0.7);
}

.audio-player.expanded .track-info {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}

.audio-player.expanded .controls {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.audio-player.expanded button {
  background: none; 
  color: white;
  border: none; 
  padding: 0; 
  border-radius: 0;
  cursor: pointer;
  font-size: 1.2em;
  transition: color 0.2s ease; 
  white-space: nowrap;
  outline: none; 
}

.audio-player.expanded button:hover {
  background: none;
  color: rgba(255, 255, 255, 0.7);
}

.audio-player.expanded button:active {
  background: none;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    filter: drop-shadow(0 0 5px rgba(255,0,0,0.6));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255,0,0,0.8));
    transform: scale(1.1);
  }
  100% {
    filter: drop-shadow(0 0 5px rgba(255,0,0,0.6));
    transform: scale(1);
  }
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
  }
}

@media (max-width: 768px) {
  .snowflake {
    width: 2px;
    height: 2px;
  }
  
  .floating-container {
    width: min(250px, 65vmin);
    height: min(250px, 65vmin);
  }

  .corner-button {
    width: 40px;
    height: 40px;
  }

  .audio-player {
    width: 35px;
    height: 35px;
    max-width: 35px;
    top: 5px;
    left: 5px;
  }
  .audio-player .audio-symbol {
    font-size: 1.6em;
  }
  
  .audio-player.expanded {
    padding: 8px 12px;
    font-size: 0.8em;
  }

  .audio-player.expanded button {
    font-size: 1em;
  }

  @keyframes pulse {
    0% {
      filter: drop-shadow(0 0 3px rgba(255,0,0,0.6));
      transform: scale(1);
    }
    50% {
      filter: drop-shadow(0 0 15px rgba(255,0,0,0.8));
      transform: scale(1.05);
    }
    100% {
      filter: drop-shadow(0 0 3px rgba(255,0,0,0.6));
      transform: scale(1);
    }
  }
}

@media (max-width: 320px) {
  .floating-container {
    width: min(200px, 60vmin);
    height: min(200px, 60vmin);
  }

  .corner-button {
    width: 35px;
    height: 35px;
    top: 5px;
    right: 5px;
  }

  .audio-player {
    width: 30px;
    height: 30px;
    max-width: 30px;
  }
  .audio-player .audio-symbol {
    font-size: 1.4em;
  }

  .audio-player.expanded {
    max-width: 150px;
  }
}
