
/* 全局 body 样式 */
body {
    background: #f0f9ff;
    font-family: 'Times New Roman', '幼圆', cursive;
    padding: 20px 0;
}
/* 极简小型加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(255, 255, 255, 0.98);*/
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-content {
    text-align: center;
    transform: scale(0.9); /* 整体缩小 */
}

.loading-spinner {
    width: 36px; /* 更小尺寸 */
    height: 36px;
    border: 2px solid rgba(52, 152, 219, 0.1);
    border-top: 2px solid #3498db;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    will-change: transform;
}

.loading-text {
    font-size: 13px; /* 更小字体 */
    color: #666;
    font-weight: normal;
    letter-spacing: 0.5px;
}

/* 错误状态样式 */
.error-state {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    padding: 20px;
    text-align: center;
}

.error-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: #e53935;
    animation: pulse 1.5s ease infinite;
}

.error-text {
    font-size: 14px;
    margin-bottom: 16px;
    color: #333;
    max-width: 80%;
}

.retry-btn {
    padding: 8px 16px;
    font-size: 13px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* 动画定义 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* 移动端适配 */
@media (max-width: 480px) {
    .loading-content {
        transform: scale(0.8);
    }
    
    .loading-spinner {
        width: 32px;
        height: 32px;
    }
    
    .loading-text {
        font-size: 12px;
    }
    
    .error-icon {
        font-size: 32px;
    }
    
    .error-text {
        font-size: 13px;
    }
    
    .retry-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
/* 导航触发器样式 */
#nav-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    width: 18px;
    height: 80px;
    background: rgba(0, 120, 255, 0.3);
    transform: translateY(-50%);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: .3s;
    z-index: 1000;
}

#nav-trigger:hover {
    width: 14px;
    background: #2196F3;
}

/* 单词导航样式 */
#word-nav {
    position: fixed;
    left: -200px;
    top: 50%;
    transform: translateY(-50%);
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transition: .35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    padding: 15px 0;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 10px;
    border-bottom: 2px solid #eee;
    margin-bottom: 10px;
}

.nav-header span {
    font-weight: bold;
    color: #2196F3;
}

#close-nav {
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    color: #666;
    padding: 2px 8px;
}

#close-nav:hover {
    color: #f44336;
}

.nav-items {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
}

.nav-items::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 8px 20px;
    cursor: pointer;
    transition: .2s;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: #e3f2fd;
    color: #1976D2;
}

.nav-item.active {
    background: #2196F3 !important;
    color: white !important;
    font-weight: bold;
}

/* 单词卡片样式 */
.word-card {
    width: 92%;
    max-width: 900px;
    margin: 15px auto;
    padding: 20px;
    border-radius: 15px;
    background: white;
    border-bottom: 2px solid #b3e5fc;
    box-shadow: 0 4px 12px rgba(0, 120, 255, 0.1);
    box-sizing: border-box;
    transition: transform.2s, box-shadow.2s;
}

.word-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 120, 255, 0.15);
}

.word-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    cursor: pointer;
    text-align: center;
}

.word-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #80d8ff 0, #ffee58 50%, #ff8a80 100%);
    border-radius: 2px;
}

.word-and-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.word-text {
    font-size: 3em;
    color: #01579b;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    
    word-break: break-word;
    hyphens: auto;
}

.speaker-icon {
    display: flex;
    font-size:15px;
    height:6px;
    align-items:center;
 
    

}



.speaker-icon:hover {
    color: #e91e63;
    
}
.speaker-icon1::before {
    content: "自动拼读";
    padding-right:5px;
     font-size:12px;
     color:#80808075;
   
           
}

.meta-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.phonetic {
    font-family: Arial, sans-serif;
    font-size: 1.2em;
    
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.translation {
    background: #ffe082;
    color: #bf360c;
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
    font-family: Arial, sans-serif;
}

.phoneme-mapping {
     display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mapping-pair {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-width: 50px;
    padding: 10px;
    border: 2px solid #81d4fa;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all.2s;
    flex-shrink: 0;
}

.mapping-pair:hover {
    background: #e1f5fe;
    transform: scale(1.05);
}

.mapping-pair.active {
    background: #b3e5fc;
    border-color: #039be5;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
    animation: bounce.4s;
}

.grapheme {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 2px;
}

.phoneme {
    color: #c62828;
    font-family: Arial, sans-serif;
    font-size: .9em;
}

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

.word-media {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
    overflow: hidden;
    padding-top: 36.25%;
}

.word-image,
.word-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.word-image {
    max-height: 300px;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform.3s;
}

.word-image:hover {
    transform: scale(1.03);
}

.word-video {
    max-height: 400px;
    
    border-radius: 12px;
    background: #000;
}

.word-text.custom-icon {
    color: #ff6b6b;
    margin-right: 0.3em;
    font-size: 0.9em;
    vertical-align: middle;
}

/* 媒体查询：屏幕宽度小于等于 768px 时的样式 */


.speaker-icon1 {
    font-size:15px;
    
   /* display: flex;
    align-items: center;  
    justify-content: center; */
}


.speaker-icon1.playing {
    
    color: #e91e63;;
}


.pairs-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    width: 100%;
}


.vowel { color: #ff4757; } /* 红色系元音 */
.vowel-phoneme {
    color: #ff7b00;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.phrase-space {
    
    border: none !important;
    background: none !important;
}
.button-container {
    text-align: center;
    margin: 10px 0;
}
/* 音素容器 */
.phoneme-video-container {
  position: relative;
  display: inline-block;
 /* margin: 0 5px;*/
}

/* 播放图标样式 */
.play-icon {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  font-size: 16px;
  color: #ff6b6b;
  display: none;
  margin-top: 4px;
}

/* 显示激活状态音素下的播放图标 */
.phoneme-video-container.active .play-icon {
  display: block;
}

/* 模态框样式 */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

.close-modal {
  position: absolute;
  top: -30px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.video-modal video {
  max-width: 100%;
  max-height: 70vh;
}

.video-wrapper {
  position: relative;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
}

.phoneme-name {
  text-align: center;
  font-size: 1.1rem;
  margin-top: 12px;
  
  font-weight: 600;
}

.phoneme-highlight {
  color: #f72585;
}

.control-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    padding: 10px 0;
}

.control-center {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background-color: #3a0ca3;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.control-btn:active {
    transform: translateY(1px);
}

.watermark-container {
    width: 100%;
    text-align: center;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.5); /* 淡灰色半透明 */
     white-space: pre-line;

}




@media (max-width:768px) {
   .word-card {
        width: 95%;
        padding: 15px;
    }
   .word-text {
        font-size: 1.8em;
    }
   .phonetic {
        font-size: 1.1em;
    }
   .mapping-pair {
        padding: 5px;
        min-width: 20px;
    }
    .speaker-icon1 {
    font-size:13px;
    
   /* display: flex;
    align-items: center;  
    justify-content: center; */
}

   .word-media {
        padding-top: 36.25%;
    }
}

/* 媒体查询：屏幕宽度小于等于 480px 时的样式 */
@media (max-width:480px) {
   .word-header {
        flex-direction: column;
        align-items: center;
    }
   .word-text {
        font-size: 1.5em;
    }
   .phonetic {
        font-size: 1em;
    }
   .mapping-pair {
       border: 1px dashed #81d4fa;
        padding: 3px;
        min-width: 5px;
        font-size: 15px;
        
        border-radius: 3px;
    }
    

 
   .word-media {
        padding-top: 55%;
    }
   .phoneme-mapping {
        flex-wrap: nowrap;
        gap: 3px;
    }
    
    .speaker-icon1 {
    font-size:10px;
    
   /* display: flex;
    align-items: center;  
    justify-content: center; */
}

.speaker-icon {
    
    height:8px;
}
.speaker-icon1::before {
    
     font-size:10px;
 
   
           
}
.settings-menu button {
    font-size:12px;
}


.control-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px;
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}




}
@media (max-width:380px) {
   .watermark-container {
  
    font-size: 13px;
}

}


