/* ========== 歌词区域 - 匹配小程序样式 ========== */
.lyrics-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #12264F;
}

.lyrics-content {
  position: relative;
  padding: 10px 20px 250px; /* 底部250px确保最后歌词不被悬浮按钮遮挡，匹配原生500rpx */
  background: #12264f;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.lyrics-content.no-transition {
  transition: none !important;
}

.lyrics-placeholder {
  height: 70px;
  width: 100%;
}

/* ========== 歌词行 ========== */
.lyrics-line {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2px;
  flex-wrap: wrap;
  padding: 8px 0;
  margin: 4px 0;
  border-radius: 7.5px;
  transition: background-color 0.1s ease;
  position: relative;
  cursor: pointer;
  min-height: 60px;
  line-height: 1.5;
  outline: none;
  -webkit-touch-callout: none;
}

.lyrics-line.current {
  background: rgba(70, 130, 180, 0.3);
}

.lyrics-line:active {
  background: rgba(135, 206, 250, 0.2);
}

/* ========== 字符行横向排列 ========== */
.lyrics-content-vertical {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1px;
  flex-wrap: wrap;
  width: 100%;
}

/* ========== 字符容器（三行垂直布局：拼音/粤语/谐音） ========== */
.character-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  cursor: pointer;
  transition: background-color 0.1s ease;
  padding: 1px;
  border-radius: 4px;
  position: relative;
  outline: none;
  -webkit-touch-callout: none;
}

.character-container:active {
  background: rgba(255, 255, 255, 0.25);
}

/* 字符发音播放高亮 - 匹配原生 data-playing */
.character-container[data-playing="true"] {
  background: rgba(74, 144, 226, 0.5) !important;
  transition: background-color 0.2s ease;
}

.character-container[data-playing="false"] {
  background: transparent !important;
  transition: background-color 0.1s ease !important;
}

.character-space {
  display: inline-block;
  width: 4px;
}

/* 底层文字 */
.char-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.char-pinyin {
  font-size: var(--font-pinyin);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  display: block;
}

.tone-text {
  font-size: var(--font-pinyin);
  font-weight: 400;
  color: #FFFFFF;
  margin-left: 1px;
  line-height: 1.2;
  display: inline;
  vertical-align: baseline;
}

.char-cantonese {
  font-size: var(--font-lyric);
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  display: block;
  letter-spacing: 0.13vw;
}

.char-homophone {
  font-size: var(--font-homophone);
  font-weight: 600;
  color: #F47068;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  display: block;
}

/* ========== 填充层（逐字渐变 - 后续开发） ========== */
.char-fill-overlay {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
  will-change: clip-path;
  pointer-events: none;
}

.char-fill-overlay .char-pinyin { color: #E94560; }
.char-fill-overlay .char-cantonese { color: #E94560; }
.char-fill-overlay .char-homophone { color: #E94560; }

/* 已唱过的字（非当前行） */
.word-sung .char-cantonese { color: #E94560; }
.word-sung .char-pinyin { color: rgba(233, 69, 96, 0.6); }
.word-sung .char-homophone { color: rgba(233, 69, 96, 0.6); }
