@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  font-family: 'Press Start 2P', monospace;
  background: #000000;
  color: #ffffff;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  line-height: 1.6;
}

/* Header */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 500;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  pointer-events: none;
}

#header > * {
  pointer-events: auto;
}

.podcast-title {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 8s linear infinite;
}

@keyframes rainbow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.about-button {
  border: none;
  padding: 12px 28px;
  border-radius: 20px;
  font-size: 14px;
  font-family: 'Press Start 2P', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
}

.about-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
  border-radius: 20px;
  z-index: -1;
}

.about-button {
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 8s linear infinite;
}

.about-button:hover::before {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 70%);
}

/* Canvas container */
#canvas-container {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

#canvas-container canvas {
  cursor: grab;
  pointer-events: auto;
}

#canvas-container canvas:active {
  cursor: grabbing;
}

/* WebGL error message */
#webgl-error {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.9);
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  z-index: 10000;
}

.hidden {
  display: none !important;
}

/* Tooltip */
#tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 11px;
  pointer-events: none;
  z-index: 1000;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
  color: transparent;
  background-image: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 8s linear infinite;
}

/* Directional labels */
#directional-labels {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
}

#directional-labels * {
  pointer-events: auto;
}

.directional-label {
  position: fixed;
  font-size: 14px;
  font-weight: 400;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  z-index: 250;
}

.directional-label .arrow {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1;
}

.directional-label .label-text {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.directional-label.visible {
  opacity: 1;
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

/* Modal content */
.modal-content {
  background: radial-gradient(ellipse at center, rgba(26, 26, 26, 0.98), transparent);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  border: none;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Add a backdrop to the modal content for better fade effect */
.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(15, 15, 15, 0.95) 40%, transparent);
  border-radius: 12px;
  z-index: -1;
  pointer-events: none;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modal title */
.modal-title {
  font-size: 16px;
  margin-bottom: 16px;
  padding-right: 40px;
  color: transparent;
  background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.5;
  animation: rainbow 8s linear infinite;
}

/* Modal description */
.modal-description {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 2;
  color: #cccccc;
  margin-bottom: 20px;
}

/* Modal tags */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.15), transparent);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 9px;
  text-transform: capitalize;
  border: none;
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 16px;
  z-index: -1;
}

/* Spotify iframe */
.spotify-embed {
  width: 100%;
  height: 232px;
  border: none;
  border-radius: 8px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #header {
    padding: 15px 20px;
  }

  .podcast-title {
    font-size: 14px;
  }

  .about-button {
    padding: 8px 18px;
    font-size: 9px;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    padding: 15px;
  }

  .modal-title {
    font-size: 14px;
  }

  .modal-description {
    font-size: 9px;
  }

  .directional-label {
    font-size: 11px;
  }

  .directional-label .arrow {
    font-size: 16px;
  }

  #tooltip {
    font-size: 9px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .spotify-embed {
    height: 152px;
  }
}
