:root {
  --primary-color: #ff0000;
  --secondary-color: #cc0000;
  --background-color: #0f0f0f;
  --surface-color: #1f1f1f;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --hover-color: #272727;
  --border-color: #303030;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
}

/* Universe Background */
.universe-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

@keyframes move-twinkle {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-1000px);
  }
}

.stars {
  background: #000 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png) repeat;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
}

.twinkling {
  background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/twinkling.png) repeat;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  animation: move-twinkle 200s linear infinite;
}

.clouds {
  background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/clouds_repeat.png) repeat;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  opacity: 0.4;
  animation: move-twinkle 300s linear infinite;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo i {
  color: var(--primary-color);
}

.nav-button {
  background-color: var(--primary-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.nav-button:hover {
  background-color: var(--secondary-color);
}

/* Landing Page */
.landing-page {
  padding: 6rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 4rem 0;
}

@keyframes glow {
  0% {
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  }

  50% {
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.6);
  }

  100% {
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  }
}

.glowing-text {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: glow 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  color: var(--text-secondary);
  font-size: 1.4rem;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 2rem;
  transition: background-color 0.2s ease;
}

.cta-button:hover {
  background-color: var(--secondary-color);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

.feature-card {
  background-color: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

.feature-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
}

/* Footer */
.footer {
  margin-top: 6rem;
  padding-top: 3rem;
  background-color: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

/* Player Page */
.player-page {
  background-color: var(--background-color);
  min-height: 100vh;
  padding-top: 5rem;
}

.music-player {
  background-color: var(--surface-color);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  margin: 2rem auto;
}

.player-header {
  text-align: center;
  margin-bottom: 2rem;
}

.player-header h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.visualization-container {
  width: 100%;
  height: 60px;
  margin-bottom: 1rem;
}

#visualizer {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.now-playing {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

#album-art {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  margin-right: 1rem;
  object-fit: cover;
}

.track-info {
  flex-grow: 1;
}

.track-info h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.track-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-bar {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-bar:hover .progress {
  background-color: var(--primary-color);
}

.progress {
  width: 0%;
  height: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: width 0.1s linear, background-color 0.2s ease;
}

.controls {
  margin-bottom: 2rem;
}

.control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background-color: var(--hover-color);
}

.control-btn.active {
  color: var(--primary-color);
}

.control-btn-large {
  width: 50px;
  height: 50px;
  background-color: var(--hover-color);
}

.control-btn-large:hover {
  background-color: var(--border-color);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.volume-slider {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

.volume-progress {
  width: 100%;
  height: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
}

.volume-slider:hover .volume-progress {
  background-color: var(--primary-color);
}

.playlist-container {
  margin-top: 2rem;
}

.playlist-container h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.playlist {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 8px;
  padding: 0.5rem;
}

.playlist-item {
  padding: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  border: #fda085 1px solid;

  background-color: var(--surface-color);
  transition: background-color 0.2s ease;
}

.playlist-item:hover {
  background-color: var(--hover-color);
}

.playlist-item.active {
  background-color: var(--hover-color);
}

.playlist-item-title {
  font-weight: 500;
}

.playlist-item-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hover-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .landing-page {
    padding: 5rem 1rem 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .glowing-text {
    font-size: 2.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem;
  }

  .logo span {
    display: none;
  }

  .music-player {
    padding: 1rem;
    border-radius: 0;
    height: calc(100vh - 4rem);
    max-width: none;
    margin: 0;
  }

  .now-playing {
    flex-direction: column;
    text-align: center;
  }

  #album-art {
    width: 200px;
    height: 200px;
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .control-buttons {
    gap: 0.5rem;
  }
}

#file-upload {
  display: none;
}

.upload-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-upload {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-image 0.2s ease;
  text-align: center;
}

.custom-upload:hover {
  background-image: linear-gradient(120deg, #ffce67 0%, #ffb07c 100%);
}

#upload-text {
  display: inline-block;
}

input[type="file"][hidden] {
  display: none;
}