/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #F5F0E6;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  padding-bottom: 50px;
}

/* 页脚 */
.site-footer {
  background: #BFA89A;
  padding: 10px 30px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 2px solid #8B4513;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* 导航栏 */
.navbar {
  background: #BFA89A;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #8B4513;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-right {
  display: flex;
  gap: 10px;
}

.navbar-title {
  font-size: 24px;
  font-weight: bold;
  color: #3D2B1F;
}

.navbar-menu {
  display: flex;
  gap: 20px;
}

.nav-btn {
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.6);
  color: #3D2B1F;
  border: 1px solid #8B4513;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.nav-btn.active {
  background: #8B4513;
  color: #F5F0E6;
}

/* 页面内容 */
#page-content {
  padding: 20px;
  min-height: calc(100vh - 70px);
}

/* 卡片样式 */
.passage-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #8B4513;
}

.passage-card.pinned {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-color: #FFD700;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  color: #8B4513;
  flex: 1;
}

.card-date {
  font-size: 14px;
  color: #2D2D2A;
}

.card-preview {
  font-size: 16px;
  color: #2D2D2A;
  line-height: 1.6;
  margin-bottom: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #8B4513;
}

.card-stats {
  font-size: 14px;
  color: #2D2D2A;
}

.card-actions {
  display: flex;
  gap: 12px;
}

.card-action-btn {
  padding: 6px 16px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #8B4513;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.card-action-btn:hover {
  background: rgba(139, 69, 19, 0.2);
}

.delete-btn {
  background: rgba(158, 42, 43, 0.1);
  color: #9E2A2B;
  border-color: #9E2A2B;
}

.pin-btn {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
  border-color: #ffc107;
}

.pin-btn.pinned {
  background: rgba(255, 193, 7, 0.3);
}

/* 创建按钮 */
.create-btn {
  background: linear-gradient(135deg, #9E2A2B 0%, #8B4513 100%);
  color: #F5F0E6;
  padding: 15px 30px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(158, 42, 43, 0.3);
  border: 2px solid #2D2A2A;
  cursor: pointer;
  transition: all 0.3s;
  margin: 30px auto;
  max-width: 200px;
}

.create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(158, 42, 43, 0.4);
}

.create-text {
  font-size: 18px;
  font-weight: bold;
}

/* 收藏本刷新按钮 */
.fav-header-actions {
  padding: 10px 20px;
  display: flex;
  justify-content: flex-end;
}

.fav-refresh-btn {
  background: #8B4513;
  color: #F5F0E6;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.fav-refresh-btn:hover {
  background: #9E2A2B;
}

/* 搜索栏 */
.search-bar {
  padding: 15px 20px;
  background: #BFA89A;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  height: 45px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  padding: 0 20px;
  font-size: 16px;
  border: 1px solid #8B4513;
}

/* 标签栏 */
.tab-bar {
  display: flex;
  background: #BFA89A;
  border-bottom: 2px solid #8B4513;
  margin-bottom: 20px;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 15px 0;
  font-size: 18px;
  font-weight: bold;
  color: #8B7355;
  cursor: pointer;
  position: relative;
}

.tab-item.active {
  color: #3D2B1F;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 4px;
  background: #9E2A2B;
  border-radius: 2px;
}

/* 空状态 */
.empty-tip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 80px 30px;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  align-self: center;
}

.empty-text {
  font-size: 24px;
  color: #666;
  margin-bottom: 10px;
}

.empty-hint {
  font-size: 18px;
  color: #999;
  margin-bottom: 15px;
}

/* 表单样式 */
.form-section {
  margin-bottom: 25px;
}

.form-section .label {
  font-size: 18px;
  font-weight: bold;
  color: #3D2B1F;
  margin-bottom: 10px;
  display: block;
}

.title-input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  font-size: 16px;
  border: 1px solid #8B4513;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.content-input-wrap {
  position: relative;
}

.content-input {
  width: 100%;
  min-height: 300px;
  padding: 15px;
  font-size: 16px;
  border: 1px solid #8B4513;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  resize: vertical;
}

.content-placeholder {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #999;
  font-size: 14px;
}

.line-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: #999;
}

/* 页脚按钮 */
.footer {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.save-btn {
  background: linear-gradient(135deg, #9E2A2B 0%, #8B4513 100%);
  color: #F5F0E6;
  padding: 12px 40px;
  border-radius: 50px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(158, 42, 43, 0.3);
  border: 2px solid #2D2A2A;
}

/* 标题徽章 */
.title-badge {
  font-size: 14px;
  color: #FFD700;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(92, 58, 33, 0.9) 100%);
  padding: 4px 12px;
  border-radius: 15px;
  font-weight: bold;
  border: 1px solid rgba(255, 215, 0, 0.5);
}

/* 按钮组 */
.btn-group {
  display: flex;
  gap: 10px;
}

.auto-bracket-btn, .ai-btn {
  padding: 8px 16px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border: 1px solid #8B4513;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* 模态框 */
.format-modal, .nickname-modal, .privacy-modal, .wechat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content, .nickname-modal-content, .privacy-modal-content, .wechat-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 25px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #3D2B1F;
  margin-bottom: 20px;
  text-align: center;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  text-align: center;
}

.modal-btn {
  padding: 12px 30px;
  background: #9E2A2B;
  color: #F5F0E6;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.modal-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.modal-buttons .modal-btn.cancel {
  background: #ccc;
  color: #333;
}

.modal-buttons .modal-btn.confirm {
  background: #9E2A2B;
}

/* 词库页面 */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-icon {
  font-size: 36px;
}

.card-info {
  flex: 1;
}

.card-name {
  font-size: 18px;
  font-weight: bold;
  color: #3D2B1F;
  display: block;
}

.card-desc {
  font-size: 14px;
  color: #666;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-tag {
  font-size: 14px;
  color: #8B4513;
  background: rgba(139, 69, 19, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

.card-arrow {
  font-size: 20px;
  color: #8B4513;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  margin-bottom: 20px;
}

.crumb-item {
  display: flex;
  align-items: center;
}

.crumb-text {
  font-size: 14px;
  color: #666;
}

.crumb-link {
  color: #8B4513;
  cursor: pointer;
  text-decoration: underline;
}

.crumb-sep {
  margin: 0 5px;
  color: #999;
}

/* 成就卡片 */
.achievement-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-radius: 16px;
  padding: 25px;
  border: 2px solid #FFD700;
  margin-bottom: 20px;
}

.achievement-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.achievement-star {
  color: #FFD700;
  font-size: 20px;
}

.achievement-title {
  font-size: 20px;
  font-weight: bold;
  color: #3D2B1F;
}

.achievement-badge {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(92, 58, 33, 0.9) 100%);
  border-radius: 12px;
  margin-bottom: 20px;
  position: relative;
}

.badge-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
  animation: shine 30s linear infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.badge-text {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
}

.achievement-stats {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.stat-circle {
  text-align: center;
}

.stat-num {
  font-size: 48px;
  font-weight: bold;
  color: #8B4513;
  display: block;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

.progress-section {
  margin-top: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-title {
  font-size: 14px;
  color: #3D2B1F;
}

.progress-detail {
  font-size: 14px;
  color: #8B4513;
}

.progress-track {
  height: 10px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 5px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9E2A2B, #8B4513);
  border-radius: 5px;
  transition: width 0.3s;
}

.progress-glow {
  position: absolute;
  top: -2px;
  width: 14px;
  height: 14px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 10px #FFD700;
}

.titles-history {
  margin-top: 20px;
}

.titles-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.titles-history-title {
  font-size: 16px;
  font-weight: bold;
  color: #3D2B1F;
}

.titles-toggle {
  font-size: 14px;
  color: #8B4513;
}

.titles-list {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.title-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 15px;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 8px;
}

.title-item-count {
  font-size: 12px;
  color: #666;
}

.title-item-name {
  font-size: 14px;
  color: #8B4513;
  font-weight: bold;
}

/* 填词查看页面 */
.header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.header-left {
  flex: 1;
}

.passage-title {
  font-size: 20px;
  font-weight: bold;
  color: #8B4513;
}

.title-reward-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.word-count {
  font-size: 14px;
  color: #666;
}

.title-next {
  font-size: 14px;
  color: #888;
}

.current-title {
  font-size: 14px;
  color: #FFD700;
  background: rgba(139, 69, 19, 0.8);
  padding: 4px 12px;
  border-radius: 15px;
}

.title-progress-row {
  margin-top: 10px;
}

.title-progress-bar {
  height: 8px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 4px;
  margin-bottom: 5px;
}

.title-progress-fill {
  height: 100%;
  background: #9E2A2B;
  border-radius: 4px;
}

.title-progress-text {
  font-size: 14px;
  color: #666;
}

.header-actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.header-action-btn {
  padding: 8px 16px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border: 1px solid #8B4513;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.header-action-btn.save {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.header-action-btn.load {
  background: #17a2b8;
  color: #fff;
  border-color: #17a2b8;
}

/* 单词列表 */
.word-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.word-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
}

.word-card.current {
  background: rgba(255, 215, 0, 0.2);
}

.word-content {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.word-index {
  font-size: 14px;
  color: #999;
  min-width: 28px;
  text-align: center;
}

.sound-icon {
  font-size: 24px;
  color: #2D2D2A;
  cursor: pointer;
}

.mnemonic-btn {
  font-size: 24px;
  cursor: pointer;
}

.word-text {
  font-size: 16px;
  color: #3D2B1F;
}

.word-paren {
  color: #8B4513;
}

.word-blank {
  background: rgba(139, 69, 19, 0.2);
  padding: 4px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.word-english {
  font-size: 16px;
  color: #8B4513;
}

.word-english-query {
  cursor: pointer;
  text-decoration: underline;
}

.blank-correct {
  color: #28a745;
}

.blank-wrong {
  color: #dc3545;
}

.word-phonetic {
  font-size: 14px;
  color: #666;
}

.word-chinese {
  font-size: 16px;
  color: #3D2B1F;
  margin-left: 10px;
}

.check-icon {
  width: 28px;
  height: 28px;
  border: 2px solid #8B4513;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #8B4513;
  cursor: pointer;
  margin-left: auto;
}

.check-icon.checked {
  background: #8B4513;
  color: #fff;
}

/* 助记信息 */
.mnemonic-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #8B4513;
}

.mnemonic-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.mnemonic-label {
  font-size: 14px;
  color: #666;
  font-weight: bold;
  min-width: 40px;
}

.mnemonic-value {
  font-size: 14px;
  color: #3D2B1F;
}

.example-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.example-word {
  color: #8B4513;
  cursor: pointer;
  text-decoration: underline;
}

/* 模式栏 */
.mode-bar {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  background: #BFA89A;
  border-top: 2px solid #8B4513;
  position: fixed;
  bottom: 40px;
  left: 0;
  right: 0;
}

.mode-item {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.6);
  color: #3D2B1F;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #8B4513;
}

.mode-item.active {
  background: #8B4513;
  color: #F5F0E6;
}

/* 弹窗样式 */
.example-word-popup-mask, .title-unlock-mask, .read-modal, .favorite-book-picker-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.example-word-popup-content, .title-unlock-content {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  max-width: 350px;
  width: 90%;
  text-align: center;
}

.example-word-popup-fav {
  font-size: 32px;
  cursor: pointer;
  margin-bottom: 15px;
}

.example-word-popup-fav.favorited {
  color: #FFD700;
}

.example-word-popup-english {
  font-size: 24px;
  font-weight: bold;
  color: #8B4513;
  display: block;
  margin-bottom: 10px;
}

.example-word-popup-phonetic {
  font-size: 16px;
  color: #666;
  display: block;
  margin-bottom: 10px;
}

.example-word-popup-pos {
  font-size: 14px;
  color: #999;
  display: block;
  margin-bottom: 10px;
}

.example-word-popup-chinese {
  font-size: 18px;
  color: #3D2B1F;
  display: block;
  margin-bottom: 15px;
}

.example-word-popup-divider {
  height: 1px;
  background: #eee;
  margin: 15px 0;
}

.example-word-popup-extra {
  font-size: 14px;
  color: #666;
  display: block;
  margin-bottom: 8px;
}

.example-word-popup-hint {
  font-size: 12px;
  color: #999;
  margin-top: 20px;
}

/* 收藏本选择弹窗 */
.favorite-book-picker-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.favorite-book-picker-content {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 350px;
  width: 90%;
}

.favorite-book-picker-title {
  font-size: 18px;
  font-weight: bold;
  color: #3D2B1F;
  text-align: center;
  margin-bottom: 15px;
}

.favorite-book-list {
  max-height: 300px;
  overflow-y: auto;
}

.favorite-book-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.favorite-book-item:last-child {
  border-bottom: none;
}

.favorite-book-item:hover {
  background: #f5f5f5;
}

.favorite-book-name {
  font-size: 16px;
  color: #3D2B1F;
}

.favorite-book-count {
  font-size: 12px;
  color: #999;
}

.favorite-book-remove {
  color: #FF3B30;
  font-size: 18px;
}

.favorite-book-picker-close {
  text-align: center;
  padding: 12px;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  border-top: 1px solid #eee;
}

.favorite-book-picker-close:hover {
  background: #f5f5f5;
}

.title-unlock-label {
  font-size: 20px;
  color: #3D2B1F;
  display: block;
  margin-bottom: 20px;
}

.title-unlock-name {
  font-size: 36px;
  font-weight: bold;
  color: #FFD700;
  display: block;
  margin-bottom: 20px;
}

.title-unlock-hint {
  font-size: 14px;
  color: #999;
}

/* 朗读弹窗 */
.read-modal-body {
  background: #3D2B1F;
  border-radius: 16px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: #F5F0E6;
}

.read-modal-progress {
  font-size: 14px;
  color: #BFA89A;
  margin-bottom: 20px;
}

.read-modal-word-row {
  margin-bottom: 20px;
}

.read-modal-word {
  font-size: 36px;
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.read-modal-phonetic {
  font-size: 18px;
  color: #BFA89A;
}

.read-modal-chinese {
  font-size: 24px;
  color: #FFD700;
}

.read-modal-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.read-modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  min-width: 80px;
}

.read-modal-btn-icon {
  font-size: 24px;
}

.read-modal-btn-label {
  font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
  }
  
  .navbar-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .header-info {
    flex-direction: column;
    gap: 15px;
  }
  
  .header-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .mode-bar {
    gap: 10px;
  }
  
  .mode-item {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* passage-view 页面样式 */
.passage-view-page {
  min-height: calc(100vh - 60px);
  padding: 20px;
  padding-bottom: 120px;
}

.page-top-back {
  margin-bottom: 10px;
}

.top-back-btn {
  padding: 8px 16px;
  background: #8B4513;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.passage-view-page .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.back-btn {
  padding: 10px 20px;
  background: #BFA89A;
  color: #3D2B1F;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.header-title {
  font-size: 20px;
  font-weight: bold;
  color: #3D2B1F;
  flex: 1;
  text-align: center;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.header-btn {
  padding: 8px 16px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border: 1px solid #8B4513;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.header-btn:hover {
  background: rgba(139, 69, 19, 0.2);
}

.header-btn.save {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

.header-btn.edit {
  background: #2196F3;
  color: #fff;
  border-color: #2196F3;
}

.content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}

/* 单词列表 */
.word-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.word-card {
  background: #F5F0E6;
  border-radius: 12px;
  padding: 10px;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.word-card.checked {
  opacity: 0.6;
  background: #E8DED0;
}

.word-card.current {
  border-color: #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.word-content {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.word-index {
  font-size: 14px;
  color: #666;
  min-width: 30px;
}

.sound-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  color: #8B4513;
  transition: transform 0.2s;
}

.sound-btn:hover {
  transform: scale(1.2);
}

.mnemonic-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  color: #8B4513;
  transition: transform 0.2s;
}

.mnemonic-btn:hover {
  transform: scale(1.2);
}

.mnemonic-btn.expanded {
  color: #FFD700;
}

.word-bracket {
  font-size: 18px;
  color: #666;
}

.word-english {
  font-size: 22px;
  font-weight: bold;
  color: #8B4513;
  cursor: pointer;
  transition: color 0.3s;
}

.word-english:hover {
  color: #9E2A2B;
}

.word-english.hidden {
  visibility: hidden;
}

.word-english.visible {
  visibility: visible;
}

.word-blank {
  min-width: 80px;
  height: 28px;
  background: rgba(139, 69, 19, 0.15);
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-size: 20px;
}

.word-blank.visible {
  display: none;
}

.inline-input {
  padding: 4px 10px;
  border: 1px solid #8B4513;
  border-radius: 4px;
  font-size: 20px;
  min-width: 100px;
}

.inline-input-close {
  cursor: pointer;
  color: #999;
  font-size: 24px;
  margin-left: 5px;
  vertical-align: middle;
}

.inline-input-close:hover {
  color: #333;
}

.word-phonetic {
  font-size: 16px;
  color: #666;
}

.word-chinese {
  font-size: 18px;
  color: #3D2B1F;
}

.word-chinese.hidden {
  visibility: hidden;
}

.word-chinese.visible {
  visibility: visible;
}

.check-btn {
  width: 28px;
  height: 28px;
  background: #fff;
  border: 2px solid #8B4513;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.3s;
}

.check-btn.checked {
  background: #8B4513;
  color: #fff;
}

/* 助记信息 */
.mnemonic-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.mnemonic-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.mnemonic-label {
  font-size: 14px;
  color: #666;
  font-weight: bold;
  min-width: 50px;
}

.mnemonic-value {
  font-size: 14px;
  color: #3D2B1F;
}

/* 单词详情弹窗 */
.word-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

.word-detail-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.word-detail-modal .word-detail-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.word-detail-header {
  text-align: center;
  margin-bottom: 20px;
}

.word-detail-header .word-english {
  font-size: 28px;
  font-weight: bold;
  color: #8B4513;
  margin-bottom: 10px;
}

.word-detail-header .word-phonetic {
  font-size: 16px;
  color: #666;
  margin-bottom: 5px;
}

.word-detail-header .word-chinese {
  font-size: 20px;
  color: #3D2B1F;
  margin-bottom: 5px;
}

.word-detail-header .word-pos {
  font-size: 14px;
  color: #999;
}

.word-detail-body {
  margin-bottom: 20px;
}

.word-detail-body > div {
  margin-bottom: 10px;
  font-size: 14px;
  color: #3D2B1F;
}

.word-detail-body > div > span:first-child {
  color: #666;
  font-weight: bold;
}

.word-detail-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.detail-btn {
  padding: 12px 25px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border: 1px solid #8B4513;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.detail-btn:hover {
  background: rgba(139, 69, 19, 0.2);
}

.detail-btn.favorite-btn.active {
  background: #FFD700;
  color: #3D2B1F;
  border-color: #FFD700;
}

.word-detail-footer {
  text-align: center;
}

.close-btn {
  padding: 12px 30px;
  background: #9E2A2B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

/* 词库页面样式 */
.word-library-page {
  min-height: calc(100vh - 60px);
}

.word-library-page .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.word-library-page .header-actions {
  display: flex;
  gap: 10px;
}

.word-library-page .header-btn {
  padding: 8px 16px;
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  border: 1px solid #8B4513;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.word-library-page .header-btn:hover {
  background: rgba(139, 69, 19, 0.2);
}

.word-library-page .header-btn.active {
  background: #8B4513;
  color: #fff;
}

.library-content, .search-content {
  padding: 20px;
}

/* 加载提示 */
.loading-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}

.loading-text {
  font-size: 18px;
  color: #666;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin-bottom: 20px;
}

.crumb-item {
  font-size: 14px;
  color: #666;
}

.crumb-item.crumb-link {
  color: #8B4513;
  cursor: pointer;
  text-decoration: underline;
}

.crumb-sep {
  color: #999;
}

/* 学段卡片 */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card.stage-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 240, 230, 0.95) 100%);
  border-radius: 16px;
  padding: 25px;
  border: 2px solid #8B4513;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 20px;
}

.card.stage-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(139, 69, 19, 0.2);
}

.card.stage-card .card-icon {
  font-size: 48px;
  min-width: 60px;
  text-align: center;
}

.card.stage-card .card-info {
  flex: 1;
}

.card.stage-card .card-name {
  font-size: 22px;
  font-weight: bold;
  color: #3D2B1F;
  margin-bottom: 8px;
}

.card.stage-card .card-desc {
  font-size: 14px;
  color: #666;
}

.card.stage-card .card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.card.stage-card .meta-tag {
  font-size: 16px;
  color: #8B4513;
  background: rgba(139, 69, 19, 0.15);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
}

.card.stage-card .card-arrow {
  font-size: 24px;
  color: #8B4513;
}

/* 年级卡片 */
.card.grade-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.card.grade-card .card-info {
  flex: 1;
  cursor: pointer;
}

.card.grade-card .card-name {
  font-size: 18px;
  font-weight: bold;
  color: #3D2B1F;
  margin-bottom: 5px;
}

.card.grade-card .card-desc {
  font-size: 14px;
  color: #666;
}

.card.grade-card .card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.import-btn {
  padding: 10px 20px;
  background: #9E2A2B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.import-btn:hover {
  background: #8B4513;
}

.card.grade-card .card-arrow {
  font-size: 20px;
  color: #8B4513;
  cursor: pointer;
}

/* 单元卡片 */
.card.unit-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid #8B4513;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card.unit-card:hover {
  background: rgba(139, 69, 19, 0.1);
  transform: translateY(-2px);
}

.card.unit-card .card-name {
  font-size: 16px;
  font-weight: bold;
  color: #3D2B1F;
}

.card.unit-card .card-desc {
  font-size: 14px;
  color: #666;
}

.card.unit-card .import-tag {
  font-size: 14px;
  color: #9E2A2B;
  background: rgba(158, 42, 43, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
}

/* 底部提示 */
.footer-tip {
  text-align: center;
  padding: 30px;
}

.footer-tip-text {
  font-size: 14px;
  color: #999;
}

/* 统计卡片 */
.stats-section {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 150px;
}

.stat-icon {
  font-size: 32px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #8B4513;
}

.stat-label {
  font-size: 14px;
  color: #666;
}

/* 称号卡片 */
.title-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #FFD700;
  margin-bottom: 20px;
  text-align: center;
}

.title-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.title-value {
  font-size: 20px;
  font-weight: bold;
  color: #8B4513;
}

/* 进度条 */
.progress-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
  margin-bottom: 20px;
}

.progress-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.progress-bar {
  height: 10px;
  background: rgba(139, 69, 19, 0.2);
  border-radius: 5px;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9E2A2B, #8B4513);
  border-radius: 5px;
  transition: width 0.3s;
}

.progress-info {
  font-size: 14px;
  color: #3D2B1F;
}

/* 搜索区域 */
.section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #8B4513;
  margin-bottom: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  color: #3D2B1F;
  margin-bottom: 15px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  flex: 1;
  height: 45px;
  padding: 0 15px;
  font-size: 16px;
  border: 1px solid #8B4513;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.search-btn {
  height: 45px;
  padding: 0 20px;
  background: #8B4513;
  color: #F5F0E6;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.search-btn:hover {
  background: #9E2A2B;
}

.search-loading {
  font-size: 14px;
  color: #666;
}

/* 单词列表 */
.word-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(245, 240, 230, 0.5);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.word-item:hover {
  background: rgba(139, 69, 19, 0.1);
}

.word-item .word-text {
  font-size: 18px;
  font-weight: bold;
  color: #8B4513;
}

.word-item .word-chinese {
  font-size: 14px;
  color: #666;
  flex: 1;
}

.word-item .word-action {
  font-size: 18px;
  color: #8B4513;
}

/* 空状态 */
.empty-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.empty-tip .empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.empty-tip .empty-text {
  font-size: 18px;
  color: #666;
  margin-bottom: 10px;
}

.empty-tip .empty-hint {
  font-size: 14px;
  color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
  .card.stage-card {
    flex-direction: column;
    text-align: center;
  }
  
  .card.stage-card .card-meta {
    justify-content: center;
  }
  
  .stats-section {
    flex-direction: column;
  }
  
  .stat-card {
    min-width: 100%;
  }
  
  .word-library-page .header {
    flex-wrap: wrap;
  }
  
  .word-library-page .header-actions {
    margin-top: 10px;
  }
}