/* ========== 语速面板 - 匹配小程序白色弹窗 ========== */
.speed-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 80%;
  max-width: 300px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 15px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.speed-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.speed-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-align: center;
}

.speed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.speed-option {
  padding: 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 7.5px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  outline: none;
}

.speed-option.active {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.speed-value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.speed-option.active .speed-value {
  color: #667eea;
}

.speed-desc {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* ========== 字体面板 - 匹配小程序白色弹窗 ========== */
.font-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 85%;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 15px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.font-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.font-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.font-panel-title-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.font-panel-close {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #000;
}

.font-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
}

.font-row-label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  min-width: 36px;
}

.font-row-actions {
  display: flex;
  align-items: center;
}

.font-toggle-btn {
  width: 40px;
  height: 25px;
  border-radius: 4px;
  background: rgba(102, 126, 234, 0.1);
  border: 0.5px solid rgba(102, 126, 234, 0.3);
  cursor: pointer;
  font-size: 13px;
  color: #667eea;
  margin-right: 8px;
}

.font-btn {
  width: 25px;
  height: 25px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 5px;
  border: none;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-size-label {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.font-reset-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 5px;
}

/* ========== 字符信息弹窗 - 匹配小程序暗色风格 ========== */
.char-info-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(18, 38, 79, 0.95);
  border-radius: 12px;
  padding: 20px 28px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.char-info-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.char-info-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.char-info-close {
  position: absolute;
  top: -8px;
  right: -15px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #FFFFFF;
  cursor: pointer;
  opacity: 0.6;
}

.char-info-close:active {
  opacity: 1;
}

.char-info-char {
  font-size: 5.33vw;
  font-weight: bold;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 5px;
}

.char-info-row {
  font-size: 5.33vw;
  color: #B8B8D1;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.char-info-label {
  font-size: 4.8vw;
  color: #B8B8D1;
  margin-right: 4px;
}

/* 声母/韵母可点击按钮（匹配原生 char-info-tappable） */
.char-info-tappable {
  font-size: 5.33vw;
  color: #B8B8D1;
  line-height: 1.4;
  cursor: default;
}
.char-info-tappable.active {
  color: #4FC3F7;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(79, 195, 247, 0.1);
  cursor: pointer;
}
.char-info-tappable.active:active {
  background: rgba(79, 195, 247, 0.25);
}

.char-info-value {
  font-size: 22px;
  color: #4FC3F7;
  font-weight: bold;
}

.char-info-value.empty {
  color: #B8B8D1;
  font-weight: normal;
}

/* ========== 字符口型视频弹窗（匹配原生） ========== */
.char-mouth-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.char-mouth-video-modal.show {
  opacity: 1;
  visibility: visible;
}

.char-mouth-video-content {
  width: 85%;
  max-width: 320px;
  background: #12264F;
  border-radius: 12px;
  padding: 15px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.char-mouth-video-modal.show .char-mouth-video-content {
  transform: scale(1);
}

.char-mouth-video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 14px;
  opacity: 0.7;
}
.char-mouth-video-close:active { opacity: 1; }

.char-mouth-video-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.char-mouth-video-type-label {
  font-size: 14px;
  color: #4FC3F7;
  font-weight: bold;
}

.char-mouth-video-symbol {
  font-size: 22px;
  color: #FFFFFF;
  font-weight: bold;
}

.char-mouth-video-tip {
  font-size: 12px;
  color: #B8B8D1;
}

.char-mouth-video-section {
  display: flex;
  flex-direction: column;
}

.char-mouth-video-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.char-mouth-video-player {
  width: 100%;
  height: 200px;
  border-radius: 6px;
  background: #000;
}

.char-mouth-video-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  font-size: 14px;
}

.char-mouth-video-desc {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
}

.char-mouth-video-desc-text {
  font-size: 13px;
  color: #FFFFFF;
  line-height: 1.6;
  white-space: pre-line;
}
