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

body {
  font-family: 'Courier New', monospace;
  background: #000000;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior: none;
}

html {
  overscroll-behavior: none;
}

@media (max-width: 600px) {
  html, body {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
  }
}

#visualizer-container {
  position: relative;
  width: 100%;
  height: 320px;
  margin-top: -70px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
}

#visualizer-container canvas {
  pointer-events: none;
}

@media (max-width: 600px) {
  #visualizer-container {
    height: 260px;
  }
}

#content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
}

main {
  width: 100%;
  margin-top: 15px;
}

#artist-name {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 30px rgba(100, 200, 255, 0.5);
  line-height: 1.2;
  min-height: 1.2em;
}

/* Track list scroll wheel */
#track-list-container {
  position: relative;
  height: 140px;
  margin-bottom: 20px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 30%,
    black 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 30%,
    black 70%,
    transparent 100%
  );
}

#track-list {
  list-style: none;
  height: 100%;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 45px 0;
}

#track-list::-webkit-scrollbar {
  display: none;
}

#track-list li {
  padding: 8px 10px;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transform: scale(0.9);
  opacity: 0.5;
}

#track-list li:hover {
  opacity: 0.8;
}

#track-list li.active {
  transform: scale(1);
  opacity: 1;
}

#track-list li.near-active {
  transform: scale(0.95);
  opacity: 0.7;
}

.track-name {
  font-size: 1rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  min-height: 1.2em;
}

.track-duration {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* Terminal chat */
#terminal-section {
  width: 100%;
  padding: 15px;
  margin-top: -70px;
}

@media (max-width: 600px) {
  #terminal-section {
    margin-bottom: 80px;
  }
}

#terminal {
  background: transparent;
  border: none;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  #terminal-output {
    max-height: 100px;
  }
}

#terminal-output {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin-bottom: 8px;
  font-size: 0.75rem;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  max-height: 100px;
  min-height: 50px;
}

#terminal-output::-webkit-scrollbar {
  width: 4px;
}

#terminal-output::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

.terminal-line {
  margin: 4px 0;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.terminal-line.user {
  color: rgba(255, 255, 255, 1);
}

.terminal-line.user::before {
  content: '> ';
  opacity: 0.7;
}

.terminal-line.bot {
  color: rgba(255, 80, 80, 0.9);
}

.terminal-line.system {
  color: rgba(100, 255, 150, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

#terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

#terminal-input-line .prompt {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  outline: none;
  letter-spacing: 0.05em;
  padding: 6px 0;
  -webkit-appearance: none;
  border-radius: 0;
}

@media (max-width: 600px) {
  #terminal-input {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

#terminal-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#terminal-send {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#terminal-send:hover {
  color: rgba(255, 80, 80, 0.9);
}

@media (max-width: 600px) {
  #terminal-send {
    padding: 10px 16px;
    font-size: 1rem;
  }
}

#dsp-links {
  text-align: center;
  padding: 40px 20px;
  width: 100%;
}

#dsp-links h2 {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  margin-bottom: 25px;
  opacity: 0.7;
}

#dsp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.dsp-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 15px 30px;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.dsp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(100, 200, 255, 0.5);
  transform: translateY(-2px);
}

#soundcloud-container {
  margin-top: 30px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

#audio-controls {
  margin: 0;
}

@media (max-width: 600px) {
  #audio-controls {
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    background: transparent;
    z-index: 20;
    display: flex;
    justify-content: center;
  }
}

#play-btn {
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid rgba(100, 200, 255, 0.4);
  color: #fff;
  padding: 10px 25px;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(100, 200, 255, 0.2);
}

#play-btn:hover {
  background: rgba(100, 200, 255, 0.2);
  box-shadow: 0 0 50px rgba(100, 200, 255, 0.4);
}

#play-btn.playing {
  border-color: rgba(255, 100, 100, 0.4);
  box-shadow: 0 0 30px rgba(255, 100, 100, 0.2);
}

.hidden {
  display: none !important;
}

.scrambled,
.unscrambling {
  font-family: 'Courier New', monospace;
  display: inline-block;
  vertical-align: top;
  line-height: 1.2;
}

.unscrambling {
  animation: glitch 0.1s infinite;
}

@keyframes glitch {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.revealed {
  color: #64c8ff;
  text-shadow: 0 0 20px rgba(100, 200, 255, 0.8);
}

@media (max-width: 600px) {
  #artist-name {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
  }

  #content {
    padding: 40px 15px;
  }

  #unlock-prompt {
    flex-direction: column;
    align-items: center;
  }

  #password-input {
    width: 100%;
    max-width: 250px;
  }
}
