/* Audiogram Player Styles */

.audiogram-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.audiogram-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* Square canvas */
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Play/Pause Button */
.audiogram-play-button {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audiogram-play-button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

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

.audiogram-play-icon,
.audiogram-pause-icon {
  width: 24px;
  height: 24px;
  color: white;
}

/* Show/hide play/pause icons based on state */
.audiogram-canvas[data-playing="true"] .audiogram-play-icon {
  display: none;
}

.audiogram-canvas[data-playing="true"] .audiogram-pause-icon {
  display: block;
}

.audiogram-canvas[data-playing="false"] .audiogram-play-icon {
  display: block;
}

.audiogram-canvas[data-playing="false"] .audiogram-pause-icon {
  display: none;
}

/* Text Container */
.audiogram-text-container {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  scroll-behavior: smooth;
}

.audiogram-text-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.audiogram-text-content {
  width: 100%;
  text-align: center;
}

/* Spacers to center text vertically */
.audiogram-spacer {
  height: 0;
}

/* Words Container */
.audiogram-words {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  word-spacing: 0.15em;
}

/* Individual Word Styles */
.audiogram-word {
  display: inline;
  /* Only transition transform, not color or text-shadow to prevent flicker */
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Upcoming words (not yet spoken) */
.audiogram-word-upcoming {
  color: rgba(255, 255, 255, 0.35) !important;
  text-shadow: none !important;
}

/* Active word (currently being spoken) */
.audiogram-word-active {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.05);
}

/* Past words (already spoken) */
.audiogram-word-past {
  color: rgba(255, 255, 255, 0.2) !important;
  text-shadow: none !important;
}

/* Footer/Branding */
.audiogram-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 5;
  padding: 60px 0 24px 0;
  background: linear-gradient(to top, rgba(26, 26, 26, 1) 0%, rgba(26, 26, 26, 0.95) 30%, rgba(26, 26, 26, 0) 100%);
}

.audiogram-brand {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .audiogram-words {
    font-size: 1.875rem;
  }

  .audiogram-canvas {
    border-radius: 12px;
  }

  .audiogram-text-container {
    padding: 24px;
  }

  .audiogram-play-button {
    width: 48px;
    height: 48px;
    top: 16px;
    right: 16px;
  }

  .audiogram-play-icon,
  .audiogram-pause-icon {
    width: 20px;
    height: 20px;
  }
}

/* Animation for word transitions - removed to prevent flicker */
