/* ── 专业英语 ── */
@keyframes en-spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.en-spin { animation: en-spin 1.2s linear infinite; }
.tool-hero.is-english {
  --tool-hero: linear-gradient(118deg, #1a3a5c 0%, #2f7cf6 48%, #6750f7 100%);
  --tool-shadow: rgba(47, 124, 246, .22);
}

/* ── 模式切换标签（彩色光晕设计） ── */
.en-mode-tabs {
  display: flex;
  gap: 12px;
  padding: 5px;
  background: rgba(47,124,246,.06);
  border-radius: 14px;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid rgba(47,124,246,.08);
}
.en-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border: none;
  background: transparent;
  font-size: var(--fs-14);
  font-weight: var(--fw-500);
  color: var(--secondary);
  cursor: pointer;
  border-radius: 11px;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  position: relative;
  padding: 0 16px;
  overflow: hidden;
}
.en-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 11px;
  opacity: 0;
  transition: opacity .4s ease;
}
.en-tab:active {
  transform: scale(.96);
}
/* 单词学习 - 激活态：蓝色渐变 + 光晕 */
.en-tab:first-child.active {
  background: linear-gradient(135deg, #1a73e8 0%, #4a90d9 50%, #7bb3ff 100%);
  color: #fff;
  font-weight: var(--fw-600);
  box-shadow: 0 4px 20px rgba(26,115,232,.4), 0 2px 8px rgba(26,115,232,.25);
}
.en-tab:first-child.active .en-tab-icon {
  filter: brightness(0) invert(1);
}
/* 跟读练习 - 激活态：紫色渐变 + 光晕 */
.en-tab:last-child.active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  color: #fff;
  font-weight: var(--fw-600);
  box-shadow: 0 4px 20px rgba(124,58,237,.4), 0 2px 8px rgba(124,58,237,.25);
}
.en-tab:last-child.active .en-tab-icon {
  filter: brightness(0) invert(1);
}
.en-tab:not(.active):hover {
  background: rgba(47,124,246,.08);
  color: #1a5a9a;
}
.en-tab-icon {
  font-size: 18px;
  line-height: 1;
  transition: filter .3s ease;
}
.en-tab-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .3s;
}
.en-tab.active .en-tab-icon {
  transform: scale(1.05);
}
.en-tab-label {
  letter-spacing: .5px;
}

/* ── 占位提示 ── */
.en-placeholder {
  text-align: center;
  padding: 48px 20px 36px;
  position: relative;
}
.en-placeholder-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 18px;
  display: inline-block;
  animation: enFloat 3s ease-in-out infinite;
}
@keyframes enFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.en-placeholder-text {
  color: var(--weak);
  font-size: var(--fs-14);
  line-height: 1.7;
  margin: 0 auto 20px;
  max-width: 260px;
}
.en-placeholder-dot {
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  margin: 0 auto;
  opacity: .3;
  animation: enPulse 2s ease-in-out infinite;
}
@keyframes enPulse {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.5); }
}

/* ── 单词卡片：杂志风格 ── */
.en-word-card {
  background: linear-gradient(145deg, #f8faff 0%, #edf4ff 50%, #f0f2ff 100%);
  border-radius: 20px;
  padding: 1px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(47,124,246,.08);
  position: relative;
  overflow: hidden;
}
.en-word-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(47,124,246,.04) 0%, transparent 70%);
  pointer-events: none;
}
.en-word-card-inner {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 32px 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.en-word-card-inner::after {
  content: 'EHS';
  position: absolute;
  bottom: -10px;
  right: -6px;
  font-size: 80px;
  font-weight: 800;
  color: rgba(47,124,246,.045);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 6px;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

/* 单词发音按钮（顶部右上角） */
.en-word-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}
.en-word-play-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f7cf6, #4a6cf7);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 14px rgba(47,124,246,.25);
  position: relative;
}
.en-word-play-btn:hover {
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 6px 20px rgba(47,124,246,.35);
}
.en-word-play-btn:active {
  transform: scale(.95);
}
.en-word-play-btn::after {
  content: '听发音';
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.en-word-play-btn:hover::after {
  opacity: 1;
}

.en-word-en {
  font-size: 36px;
  font-weight: 700;
  color: #1a3a5c;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.en-word-phonetic {
  font-size: var(--fs-16);
  color: var(--secondary);
  margin-top: 6px;
  font-family: 'Outfit', 'Times New Roman', serif;
  font-style: italic;
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
}
.en-word-divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  border-radius: 2px;
  margin: 20px auto;
  position: relative;
  z-index: 1;
}
.en-word-cn {
  font-size: 12px;
  font-weight: 500;
  color: #2f7cf6;
  line-height: 1.6;
  padding: 0 8px;
  letter-spacing: 3px;
  position: relative;
  z-index: 1;
}

/* ── 短文卡片：杂志风格 ── */
.en-passage-card {
  background: linear-gradient(145deg, #fafcff 0%, #f3f7ff 100%);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(47,124,246,.06);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(47,124,246,.06);
}
.en-passage-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse 70% 50% at 80% 0%, rgba(47,124,246,.03) 0%, transparent 60%);
  pointer-events: none;
}

.en-passage-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(47,124,246,.1);
  position: relative;
  letter-spacing: .5px;
  line-height: 1.4;
}
.en-passage-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 64px;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

.en-passage-text {
  font-size: 15px;
  line-height: 2;
  color: #2a3040;
  margin-bottom: 20px;
  word-break: break-word;
  font-family: 'Georgia', 'Times New Roman', 'PingFang SC', serif;
  letter-spacing: .3px;
  position: relative;
  z-index: 1;
  padding: 0 4px;
}
.en-passage-text::first-letter {
  font-size: 30px;
  font-weight: 700;
  color: #2f7cf6;
  float: left;
  line-height: 1;
  margin-right: 8px;
  margin-top: 3px;
}

.en-passage-trans {
  font-size: var(--fs-13);
  line-height: 1.9;
  color: #5a6a7a;
  padding: 18px 20px;
  background: rgba(47,124,246,.04);
  border-radius: 14px;
  margin-bottom: 0;
  border-left: 3px solid rgba(47,124,246,.18);
  position: relative;
  z-index: 1;
  letter-spacing: .3px;
}

/* 重点单词区 */
.en-vocab {
  margin-top: 20px;
  padding: 18px 20px;
  background: #fafbfc;
  border-radius: 14px;
  border: 1px solid #edf0f5;
  position: relative;
  z-index: 1;
}
.en-vocab-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1f2e;
  margin-bottom: 12px;
}
.en-vocab-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px dashed #e6eaf0;
}
.en-vocab-item:last-child {
  border-bottom: none;
}
.en-vocab-word {
  font-weight: 600;
  color: #2f7cf6;
  font-family: 'Georgia', 'Times New Roman', serif;
  min-width: 80px;
}
.en-vocab-phonetic {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #8b95a5;
  font-style: italic;
  font-size: 13px;
}
.en-vocab-meaning {
  color: #4a5568;
}

/* 操作按钮区 */
.en-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}


/* ========== 简单音频播放器 ========== */
.en-simple-player {
  margin-top: 16px;
}
.en-simple-player audio {
  width: 100%;
  height: 44px;
  border-radius: 8px;
}
.en-simple-player-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
.en-simple-player-actions .btn-ghost {
  font-size: 12px;
  padding: 4px 12px;
  height: auto;
}
.pp-loading {
  text-align: center;
  padding: 24px 0;
  font-size: 14px;
  color: #8b95a5;
}
.pp-error {
  text-align: center;
  padding: 24px 16px;
  background: #fff5f5;
  border-radius: 12px;
  margin: 8px 0;
}
.pp-error-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.pp-error-text {
  font-size: 14px;
  color: #e5484d;
  line-height: 1.5;
}
/* ========== 英语短文 A4 打印卡片 ========== */
.en-a4 {
  --a4-bg: #ffffff;
  --a4-primary: #2f7cf6;
  --a4-accent: #1a73e8;
  --a4-text: #1a1f2e;
  --a4-muted: #5f6b7a;
  --a4-border: #e6eaf0;
  --a4-warm: #f8f9fc;
  font-family: 'Outfit', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--a4-text);
  line-height: 1.7;
  background: var(--a4-bg);
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  box-sizing: border-box;
}
.en-a4 *,.en-a4 *::before,.en-a4 *::after { box-sizing: border-box; }
.en-a4-inner {
  display: flex;
  flex-direction: column;
  min-height: 297mm;
  padding: 0;
}
.en-a4-header {
  position: relative;
  background: linear-gradient(135deg, #1a3a7a 0%, #2f7cf6 50%, #4a90d9 100%);
  padding: 32px 36px 28px;
  color: #fff;
  overflow: hidden;
}
.en-a4-header-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 120% 20%, rgba(255,255,255,.12) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at -20% 80%, rgba(255,255,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.en-a4-header-content { position: relative; z-index: 1; }
.en-a4-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  background: rgba(255,255,255,.2);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.en-a4-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  letter-spacing: .5px;
}
.en-a4-date {
  font-size: 12px;
  opacity: .7;
}
.en-a4-body {
  flex: 1;
  padding: 32px 36px;
}
.en-a4-passage {
  font-size: 16px;
  line-height: 2;
  white-space: pre-wrap;
  color: var(--a4-text);
}
.en-a4-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--a4-border) 0%, var(--a4-primary) 50%, var(--a4-border) 100%);
  margin: 24px 0;
}
.en-a4-trans-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--a4-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.en-a4-trans {
  font-size: 14px;
  line-height: 2;
  color: var(--a4-muted);
  white-space: pre-wrap;
}
.en-a4 .en-vocab {
  background: var(--a4-bg);
  border: 1px solid var(--a4-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 20px;
}
.en-a4 .en-vocab-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--a4-heading);
  margin-bottom: 10px;
}
.en-a4 .en-vocab-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px dashed var(--a4-border);
}
.en-a4 .en-vocab-item:last-child {
  border-bottom: none;
}
.en-a4 .en-vocab-word {
  font-weight: 600;
  color: var(--a4-primary);
  font-family: 'Georgia', 'Times New Roman', serif;
  min-width: 80px;
}
.en-a4 .en-vocab-phonetic {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--a4-muted);
  font-style: italic;
  font-size: 13px;
}
.en-a4 .en-vocab-meaning {
  color: var(--a4-text);
}
.en-a4-footer {
  padding: 20px 36px 24px;
  text-align: center;
}
.en-a4-footer-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--a4-primary), transparent);
  margin-bottom: 12px;
  opacity: .3;
}
.en-a4-footer-text {
  font-size: 11px;
  color: var(--a4-muted);
  letter-spacing: 1px;
}

@media print {
  .en-a4 {
    width: 100%;
    min-height: auto;
    box-shadow: none;
    margin: 0;
    border: none;
  }
  .en-a4-inner { min-height: auto; }
  .en-a4-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .en-a4-header-bg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .en-a4-divider { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .en-a4-footer-line { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 短文历史记录 */
.en-history { margin-top: 20px; }
.en-history .en-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line, #e6eaf0);
}
.en-history-main { min-width: 0; }
.en-history-main strong {
  display: block;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink, #1a1f2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.en-history-main p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #8b95a5);
}
.en-history-ops { display: flex; gap: 8px; flex-shrink: 0; }
.en-history-empty {
  padding: 22px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #8b95a5);
  background: #fff;
  border: 1px dashed var(--line, #e6eaf0);
  border-radius: 12px;
}
