
/*
925新鲜事style

*/


/*
87新鲜事style [CLONE] CODEX优化

*/


/*
87新鲜事style

*/

.hnc-initializing #hnc-tags-grid {
  pointer-events: none;
  opacity: 0.7;
}
#hnc-explore-section{margin-top:1.5em}
.hnc-explore-info{background:#e3f2fd;color:#1565c0;font-size:14px;padding:6px 12px;border-radius:6px;display:inline-flex;align-items:center;gap:.25em;margin-bottom:1em;font-weight:500;line-height:1.4}
.hnc-explore-info-icon{font-size:16px;line-height:1}
.hnc-explore-info-text{display:inline-block}

/* 修改：随机选择区域样式 */
.hnc-random-section {
  margin: 1.5em 0;
  text-align: center;
}

.hnc-random-btn, .hnc-switch-batch-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  margin: 0 8px; /* 新增：按钮间距 */
}

/* 新增：换一批按钮特殊样式 */
.hnc-switch-batch-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.hnc-switch-batch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.hnc-random-btn:hover, .hnc-switch-batch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.hnc-random-btn:active, .hnc-switch-batch-btn:active {
  transform: translateY(0);
}

.hnc-random-btn:disabled, .hnc-switch-batch-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.random-icon, .switch-icon {
  font-size: 18px;
}

/* 随机结果显示 */
.hnc-random-display {
  margin-top: 1em;
  padding: 1em;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

#hnc-random-result {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* 新增：随机确认按钮样式 */
.hnc-random-confirm-btn, .hnc-random-cancel-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin: 0 4px;
  transition: all 0.2s ease;
}

.hnc-random-confirm-btn {
  background: #4caf50;
  color: white;
}

.hnc-random-confirm-btn:hover {
  background: #45a049;
}

.hnc-random-cancel-btn {
  background: #f44336;
  color: white;
}

.hnc-random-cancel-btn:hover {
  background: #da190b;
}

/* 随机动画效果 - 更快的跳动 */
@keyframes randomHighlight {
  0% { 
    background: transparent; 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  }
  50% { 
    background: rgba(102, 126, 234, 0.3); 
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
  }
  100% { 
    background: transparent; 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  }
}

.hnc-explore-btn.random-highlight {
  animation: randomHighlight 0.2s ease;
  z-index: 10;
  position: relative;
}

/* 更新后的按钮样式 - 简约线条风格，适合移动端 */
#hnc-tags-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); 
  gap: 12px; 
  margin-top: 1.25em; 
  transition: opacity 0.3s; 
}

.hnc-explore-btn { 
  position: relative;
  width: 100%; 
  height: 60px; 
  background: transparent;
  border: 2px solid #1e88e5;
  color: #1e88e5;
  font-size: 14px; 
  font-weight: 600; 
  cursor: pointer; 
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px; /* 确保触控区域足够大 */
}

.hnc-explore-btn:active {
  transform: scale(0.97);
}

.hnc-explore-btn.active { 
  background: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

.hnc-explore-btn.hnc-generated { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.hnc-explore-btn.hnc-generated::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.hnc-explore-btn.hnc-generated:hover::before {
  left: 100%;
}

.hnc-explore-btn.hnc-generated::after { 
  content: "✓";
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  font-size: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.hnc-explore-btn.hnc-disabled { 
  background: transparent;
  border-color: #bdbdbd;
  color: #bdbdbd;
  cursor: not-allowed; 
  pointer-events: none; 
}

/* 移动端优化 */
@media (max-width: 600px) { 
  #hnc-tags-grid { 
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
    gap: 10px; 
  } 
  .hnc-explore-btn { 
    font-size: 13px;
    height: 55px;
  }
  .hnc-explore-btn.hnc-generated::after {
    width: 14px;
    height: 14px;
    font-size: 10px;
    top: 3px;
    right: 3px;
  }
  
  /* 移动端按钮样式调整 */
  .hnc-random-btn, .hnc-switch-batch-btn {
    padding: 10px 20px;
    font-size: 14px;
    margin: 4px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .hnc-explore-btn.hnc-generated::before {
    display: none; /* 在触摸设备上禁用hover效果 */
  }
  .hnc-explore-btn.hnc-generated:active {
    transform: scale(0.95);
  }
}

@media (min-width: 1200px) { 
  #hnc-tags-grid { 
    grid-template-columns: repeat(4, 1fr); /* 修改：4列布局适应8个标签 */
  } 
}

#hnc-explore-display{margin-top:1.5em;max-width:700px}
#hnc-explore-topic{margin:0 0 .5em}

/* 音频播放器容器样式 */
.hnc-audio-container {
  margin: 1em 0;
  padding: 0;
  position: relative;
  z-index: 10;
}

#hnc-explore-audio {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
}

/* 确保音频播放器在任何模式下都保持固定位置 */
#hnc-explore-display > .hnc-audio-container {
  order: 1; /* 在 flexbox 中确保音频排在第二位（标题后） */
}

#hnc-explore-text{margin:0 0 1em;line-height:1.7;position:relative}
.hnc-explore-error{margin-top:.75em;color:#c00;font-weight:600;line-height:1.4}
.hnc-vocab-word{color:#d32f2f;font-weight:600;cursor:pointer;border-bottom:2px dotted #f48fb1;transition:all .2s}
.hnc-vocab-word:hover{background-color:#ffcdd2;border-bottom-style:solid}
.tippy-box[data-theme~=light-border]{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:14px;line-height:1.5;z-index:9999!important}
.hnc-tippy-content .word{font-size:16px;margin-bottom:4px}
.hnc-tippy-content .ipa{font-family:"Lucida Sans Unicode","Arial Unicode MS",sans-serif;color:#555;margin-left:8px}
.hnc-tippy-content .def,.hnc-tippy-content .ex{margin-top:4px;text-align:left}
.hnc-tippy-content .def strong,.hnc-tippy-content .ex strong{color:#1e88e5}

/* 确保所有tippy实例都有足够高的z-index */
[data-tippy-root] {
  z-index: 9999 !important;
}

/* 修改：预览区域样式 - 恢复紫色神秘感 */
.hnc-next-week-preview {
  margin-top: 2em;
  padding: 1.5em;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.hnc-next-week-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hnc-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1em;
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
}

.hnc-preview-icon {
  font-size: 16px;
}

.hnc-preview-text {
  opacity: 0.8;
}

.hnc-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 60px;
  position: relative;
}

.hnc-preview-tag {
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.5;
  cursor: default;
  user-select: none;
  animation: previewFloat 6s ease-in-out infinite;
  position: relative;
  transition: all 0.3s ease;
}

.hnc-preview-tag:hover {
  opacity: 0.7;
  transform: scale(1.05);
  background: rgba(102, 126, 234, 0.15);
}

@keyframes previewFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-3px) rotate(1deg);
  }
  50% {
    transform: translateY(-5px) rotate(0deg);
  }
  75% {
    transform: translateY(-2px) rotate(-1deg);
  }
}

/* 移动端优化 */
@media (max-width: 600px) {
  .hnc-next-week-preview {
    margin-top: 1.5em;
    padding: 1em;
  }
  
  .hnc-preview-tags {
    gap: 6px;
  }
  
  .hnc-preview-tag {
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .hnc-preview-tag:hover {
    opacity: 0.5;
    transform: none;
  }
  
  .hnc-preview-tag:active {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* 新增：模式选择弹窗样式 */
.hnc-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  /* Important: keep overlay out of flow when hidden to avoid global blur on iOS */
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hnc-mode-overlay.hnc-mode-show {
  /* Only apply blur when visible */
  display: flex;
  opacity: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hnc-mode-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.hnc-mode-overlay.hnc-mode-show .hnc-mode-dialog {
  transform: scale(1);
}

.hnc-mode-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.hnc-mode-header h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.hnc-mode-topic-name {
  font-size: 16px;
  color: #1e88e5;
  font-weight: 500;
  background: rgba(30, 136, 229, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

.hnc-mode-options {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hnc-mode-option {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.hnc-mode-option:hover {
  border-color: #1e88e5;
  background: rgba(30, 136, 229, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.15);
}

.hnc-mode-option:active {
  transform: translateY(0);
}

.hnc-mode-icon {
  font-size: 32px;
  margin-right: 16px;
  flex-shrink: 0;
}

.hnc-mode-content {
  flex: 1;
}

.hnc-mode-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.hnc-mode-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 6px;
}

.hnc-mode-shortcut {
  font-size: 12px;
  color: #999;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.hnc-mode-coming-soon {
  font-size: 11px;
  color: #ff9800;
  font-weight: 500;
  background: rgba(255, 152, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* 听力填空模式样式（暂时禁用状态） */
#hnc-mode-listening {
  opacity: 0.7;
  position: relative;
}

#hnc-mode-listening:hover {
  border-color: #ff9800;
  background: rgba(255, 152, 0, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.15);
  opacity: 0.8;
}

.hnc-mode-footer {
  padding: 16px 24px 24px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.hnc-mode-cancel {
  background: #f5f5f5;
  color: #666;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.hnc-mode-cancel:hover {
  background: #e0e0e0;
  color: #333;
}

.hnc-mode-tip {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

/* 移动端优化 */
@media (max-width: 600px) {
  .hnc-mode-dialog {
    width: 95%;
    margin: 20px;
  }
  
  .hnc-mode-header {
    padding: 20px 20px 16px;
  }
  
  .hnc-mode-header h3 {
    font-size: 18px;
  }
  
  .hnc-mode-topic-name {
    font-size: 14px;
  }
  
  .hnc-mode-options {
    padding: 20px;
    gap: 12px;
  }
  
  .hnc-mode-option {
    padding: 16px;
  }
  
  .hnc-mode-icon {
    font-size: 28px;
    margin-right: 12px;
  }
  
  .hnc-mode-title {
    font-size: 16px;
  }
  
  .hnc-mode-desc {
    font-size: 13px;
  }
  
  .hnc-mode-shortcut {
    font-size: 11px;
  }
  
  .hnc-mode-coming-soon {
    font-size: 10px;
  }
  
  .hnc-mode-footer {
    padding: 12px 20px 20px;
  }
  
  .hnc-mode-tip {
    font-size: 11px;
  }
}

/* 新增：听力填空模式样式 */
.hnc-listening-exercise {
  margin-top: 1.5em;
  position: relative; /* 修复：为绝对定位的提示信息提供相对参考点 */
}

/* 确保听力练习模式下音频播放器不被挤压 */
#hnc-listening-exercise + .hnc-content-controls {
  margin-top: 2em;
}

/* 听力练习结果不影响音频播放器位置 */
.hnc-exercise-results {
  margin-top: 2em;
  margin-bottom: 2em;
}

/* 原文显示/隐藏控制区域样式 */
.hnc-original-text-controls {
  margin-bottom: 1.5em;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
  border-radius: 12px;
  border-left: 4px solid #2196f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.hnc-toggle-original-btn {
  background: #2196f3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.hnc-toggle-original-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.hnc-toggle-original-btn:active {
  transform: translateY(0);
}

.hnc-toggle-original-btn.hnc-text-hidden {
  background: #4caf50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.hnc-toggle-original-btn.hnc-text-hidden:hover {
  background: #45a049;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.toggle-icon {
  font-size: 16px;
  line-height: 1;
}

.hnc-toggle-tip {
  font-size: 12px;
  color: #1565c0;
  font-style: italic;
  opacity: 0.8;
}

/* 移动端优化 */
@media (max-width: 600px) {
  .hnc-original-text-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .hnc-toggle-original-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .hnc-toggle-tip {
    font-size: 11px;
    text-align: center;
    width: 100%;
  }
}

.hnc-listening-instructions {
  background: #e3f2fd;
  color: #1565c0;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 1.5em;
  font-size: 14px;
  font-weight: 500;
}

.hnc-exercise-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 2em;
  text-align: justify;
}

.hnc-blank {
  display: inline-block;
  margin: 0 4px;
  position: relative;
}

.hnc-drop-zone {
  display: inline-block;
  min-width: 100px;
  min-height: 32px;
  margin: 0 4px;
  position: relative;
  vertical-align: baseline;
}

.hnc-blank-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 2px dashed #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  padding: 4px 8px;
  transition: all 0.3s ease;
  position: relative;
}

.hnc-blank-number {
  position: absolute;
  top: -8px;
  left: -8px;
  background: #1e88e5;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hnc-blank-word {
  font-size: 16px;
  font-weight: 600;
  color: #1e88e5;
  min-height: 20px;
  text-align: center;
}

.hnc-drop-zone.hnc-filled .hnc-blank-content {
  border-color: #4caf50;
  border-style: solid;
  background: #e8f5e8;
}


.hnc-word-options {
  margin: 2em 0;
}

.hnc-word-options h4 {
  color: #333;
  margin-bottom: 1em;
  font-size: 16px;
}

.hnc-exercise-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 1.5em;
  padding: 12px 16px;
  background: #f0f7ff;
  border-radius: 8px;
  border-left: 4px solid #1e88e5;
}

.hnc-stats-item {
  font-size: 14px;
  color: #1565c0;
  font-weight: 500;
}

.hnc-options-container {
  margin-bottom: 2em;
}

.hnc-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hnc-word-option {
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  color: #333;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 90px;
  min-height: 44px; /* 确保触摸友好的最小高度 */
  text-align: center;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hnc-word-option:hover {
  background: #1e88e5;
  border-color: #1e88e5;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.hnc-word-option:active {
  transform: translateY(0) scale(0.95);
}

.hnc-word-option.hnc-word-used {
  display: none;
}

/* 选中状态样式 */
.hnc-word-option.hnc-word-selected {
  background: #2196f3;
  border-color: #1976d2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
  position: relative;
}

.hnc-word-option.hnc-word-selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #4caf50;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkPulse 1.5s infinite;
}

@keyframes checkPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 操作提示区域样式 - 修复：使用固定定位避免布局跳动 */
.hnc-selection-tip {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  animation: tipFadeIn 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
  
  /* 修复：使用绝对定位，避免影响页面布局 */
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  white-space: nowrap;
  margin: 0;
  min-width: 300px;
}

@keyframes tipFadeIn {
  from { 
    opacity: 0; 
    transform: translateY(-10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* 可用空格高亮样式 */
.hnc-drop-zone.hnc-blank-available .hnc-blank-content {
  border-color: #2196f3;
  background: rgba(33, 150, 243, 0.1);
  animation: blankPulse 2s infinite;
}

@keyframes blankPulse {
  0%, 100% { 
    border-color: #2196f3;
    box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.3);
  }
  50% { 
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
  }
}


.hnc-exercise-controls {
  display: flex;
  gap: 12px;
  margin: 2em 0;
}

.hnc-submit-btn, .hnc-reset-btn, .hnc-try-again-btn, .hnc-show-normal-btn, .hnc-return-to-exercise-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hnc-submit-btn {
  background: #4caf50;
  color: white;
}

.hnc-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.hnc-submit-btn:not(:disabled):hover {
  background: #45a049;
  transform: translateY(-1px);
}

.hnc-reset-btn, .hnc-try-again-btn {
  background: #ff9800;
  color: white;
}

.hnc-reset-btn:hover, .hnc-try-again-btn:hover {
  background: #f57c00;
  transform: translateY(-1px);
}

.hnc-show-normal-btn {
  background: #2196f3;
  color: white;
}

.hnc-show-normal-btn:hover {
  background: #1976d2;
  transform: translateY(-1px);
}

.hnc-return-to-exercise-btn, #hnc-continue-listening {
  background: #4caf50;
  color: white;
  margin-top: .75em;
  margin-right: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.hnc-return-to-exercise-btn:hover, #hnc-continue-listening:hover {
  background: #45a049;
  transform: translateY(-1px);
}

.hnc-exercise-results {
  margin-top: 2em;
  padding: 1.5em;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
}

.hnc-score {
  font-size: 18px;
  font-weight: 600;
  color: #2e7d32;
  margin-bottom: 1.5em;
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 6px;
}

.hnc-result-item {
  margin-bottom: 1em;
  padding: 12px;
  border-radius: 6px;
  background: white;
}

.hnc-result-item.hnc-correct {
  border-left: 4px solid #4caf50;
}

.hnc-result-item.hnc-incorrect {
  border-left: 4px solid #f44336;
}

.hnc-result-header {
  font-weight: 600;
  margin-bottom: 8px;
}

.hnc-result-details {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.hnc-result-explanation {
  font-size: 13px;
  color: #555;
  background: rgba(0, 0, 0, 0.05);
  padding: 8px;
  border-radius: 4px;
}

/* 移动端优化 */
@media (max-width: 600px) {
  /* 移动端音频播放器优化 */
  .hnc-audio-container {
    margin: 0.8em 0;
  }
  
  #hnc-explore-audio {
    height: 48px; /* 确保移动端有足够的触摸区域 */
  }
  
  .hnc-exercise-stats {
    flex-direction: column;
    gap: 8px;
  }
  
  .hnc-stats-item {
    font-size: 13px;
  }
  
  .hnc-options-grid {
    gap: 8px;
  }
  
  .hnc-word-option {
    padding: 14px 18px;
    font-size: 15px;
    min-width: 80px;
    min-height: 48px; /* 移动端增加触摸区域 */
    margin: 4px; /* 增加间距避免误触 */
  }
  
  .hnc-exercise-controls {
    flex-direction: column;
    gap: 8px;
  }
  
  .hnc-drop-zone {
    min-width: 80px;
    min-height: 28px;
  }
  
  .hnc-blank-content {
    min-height: 28px;
    padding: 2px 6px;
  }
  
  .hnc-blank-word {
    font-size: 14px;
  }
  
  .hnc-blank-number {
    width: 18px;
    height: 18px;
    font-size: 11px;
    top: -6px;
    left: -6px;
  }
  
  .hnc-exercise-text {
    font-size: 15px;
    line-height: 1.6;
  }
  
  /* 移动端选择提示优化 */
  .hnc-selection-tip {
    padding: 10px 14px;
    font-size: 13px;
    min-width: 280px;
    top: -55px; /* 移动端稍微调整位置 */
  }
  
  /* 移动端tippy词汇解释框优化 - 确保不被播放器遮挡 */
  .tippy-box[data-theme~=light-border] {
    z-index: 9999 !important;
    max-width: 300px !important;
    font-size: 13px !important;
  }
  
  .hnc-tippy-content .word {
    font-size: 15px !important;
  }
  
  .hnc-tippy-content .def, .hnc-tippy-content .ex {
    font-size: 13px !important;
  }
  
  /* 移动端选中状态优化 */
  .hnc-word-option.hnc-word-selected::after {
    width: 18px;
    height: 18px;
    font-size: 11px;
    top: -6px;
    right: -6px;
  }
  
  /* 移动端空格脉动减弱 */
  .hnc-drop-zone.hnc-blank-available .hnc-blank-content {
    animation: blankPulseMobile 3s infinite;
  }
  
  @keyframes blankPulseMobile {
    0%, 100% { 
      border-color: #2196f3;
      box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.2);
    }
    50% { 
      border-color: #1976d2;
      box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
    }
  }
}

/* 内容控制按钮区域 */
.hnc-content-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 0.75em;
}

/* 生成听力练习按钮样式 */
.hnc-generate-listening-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  border: none;
  padding: 0.7em 1.4em;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 44px;
  margin-top: 0.75em;
}

.hnc-generate-listening-btn:hover {
  background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.hnc-generate-listening-btn:active {
  transform: translateY(0);
}

.hnc-generate-listening-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hnc-generate-listening-btn:disabled:hover {
  background: #ccc;
  transform: none;
  box-shadow: none;
}

/* 按钮图标和文字 */
.hnc-generate-listening-btn .btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* === 轻量状态样式（与JS setLoading/aria属性配合） === */
/* 加载中：按钮右侧显示小旋转，视觉降噪但不破坏布局 */
.hnc-random-btn.is-loading,
.hnc-switch-batch-btn.is-loading,
.hnc-generate-listening-btn.is-loading,
.hnc-random-confirm-btn.is-loading,
.hnc-random-cancel-btn.is-loading,
.hnc-random-btn[aria-busy="true"],
.hnc-switch-batch-btn[aria-busy="true"],
.hnc-generate-listening-btn[aria-busy="true"],
.hnc-random-confirm-btn[aria-busy="true"],
.hnc-random-cancel-btn[aria-busy="true"] {
  position: relative;
  opacity: 0.9;
  cursor: progress;
}

.hnc-random-btn.is-loading::after,
.hnc-switch-batch-btn.is-loading::after,
.hnc-generate-listening-btn.is-loading::after,
.hnc-random-confirm-btn.is-loading::after,
.hnc-random-cancel-btn.is-loading::after,
.hnc-random-btn[aria-busy="true"]::after,
.hnc-switch-batch-btn[aria-busy="true"]::after,
.hnc-generate-listening-btn[aria-busy="true"]::after,
.hnc-random-confirm-btn[aria-busy="true"]::after,
.hnc-random-cancel-btn[aria-busy="true"]::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.65);
  border-top-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  animation: hncSpin 0.9s linear infinite;
}

@keyframes hncSpin { 0%{transform: translateY(-50%) rotate(0)} 100%{transform: translateY(-50%) rotate(360deg)} }

/* 统一 aria-disabled 与 :disabled 的外观 */
.hnc-random-btn[aria-disabled="true"],
.hnc-switch-batch-btn[aria-disabled="true"],
.hnc-generate-listening-btn[aria-disabled="true"],
.hnc-random-confirm-btn[aria-disabled="true"],
.hnc-random-cancel-btn[aria-disabled="true"],
.hnc-random-btn:disabled,
.hnc-switch-batch-btn:disabled,
.hnc-generate-listening-btn:disabled,
.hnc-random-confirm-btn:disabled,
.hnc-random-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 减少动效用户不使用缩放/阴影动画 */
@media (prefers-reduced-motion: reduce) {
  .hnc-random-btn:hover,
  .hnc-switch-batch-btn:hover,
  .hnc-generate-listening-btn:hover {
    transform: none;
    box-shadow: none;
  }
  .hnc-explore-btn.random-highlight { animation: none; }
  .hnc-mode-overlay { transition: none; }
  .hnc-mode-dialog { transition: none; transform: none; }
}

.hnc-generate-listening-btn .btn-text {
  white-space: nowrap;
}

/* 新功能提示效果 */
.hnc-generate-listening-btn::after {
  content: "NEW";
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e91e63;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 3px;
  animation: newBadgePulse 2s infinite;
}

@keyframes newBadgePulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1;
  }
  50% { 
    transform: scale(1.1); 
    opacity: 0.8;
  }
}

/* 移动端优化 */
@media (max-width: 600px) {
  .hnc-content-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .hnc-generate-listening-btn {
    padding: 12px 16px;
    justify-content: center;
  }
  
  .hnc-generate-listening-btn .btn-text {
    font-size: 14px;
  }
}

/* 移动端弹窗定位修复 - 仅在手机上生效 */
@media (max-width: 768px) {
  .hnc-mode-overlay.hnc-mode-show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
  }
  
  .hnc-mode-dialog {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: auto !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
}

/* === 新鲜事标题行 === */
.hnc-explore-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5em;
}

.hnc-explore-header-row .hnc-module-title {
  margin: 0;
}

/* === 复制链接图标按钮 === */
#hnc-explore-copy-link-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

#hnc-explore-copy-link-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

#hnc-explore-copy-link-btn:active {
  background: #f1f5f9;
}

#hnc-explore-copy-link-btn.copied {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

