/* 全局变量和重置 */
:root {
    --primary-red: #E63946;
    --dark-red: #C1121F;
    --light-red: #FFE5E8;
    --gold: #FFD700;
    --text-dark: #2B2D42;
    --text-light: #8D99AE;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --shadow: rgba(230, 57, 70, 0.15);
    --border: #EDF2F4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #FFE5E8 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    padding: 30px;
    border-radius: 20px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 30px;
    animation: slideDown 0.6s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.mascots {
    display: flex;
    gap: 15px;
}

.mascot {
    font-size: 2rem;
    animation: wave 1.5s ease-in-out infinite;
    display: inline-block;
}

.mascot:nth-child(1) { animation-delay: 0s; }
.mascot:nth-child(2) { animation-delay: 0.2s; }
.mascot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* 搜索区域 */
.search-section {
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-box {
    display: flex;
    gap: 15px;
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 5px 20px var(--shadow);
}

#searchInput {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    border-radius: 50px;
    outline: none;
    background: var(--bg-light);
}

#searchInput:focus {
    background: var(--white);
    box-shadow: inset 0 0 0 2px var(--primary-red);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* 标签导航 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
}

.tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.tab:hover {
    background: var(--light-red);
    color: var(--primary-red);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    box-shadow: 0 5px 15px var(--shadow);
}

/* 内容区域 */
.content {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    min-height: 500px;
    box-shadow: 0 5px 20px var(--shadow);
    animation: fadeIn 0.8s ease;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 欢迎消息 */
.welcome-message {
    text-align: center;
    padding: 60px 20px;
}

.welcome-message h2 {
    color: var(--primary-red);
    font-size: 2rem;
    margin-bottom: 15px;
}

.welcome-message .subtitle {
    color: var(--dark-red);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border-radius: 20px;
    display: inline-block;
}

.welcome-message p {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.welcome-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.large-icon {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

.large-icon:nth-child(1) { animation-delay: 0s; }
.large-icon:nth-child(2) { animation-delay: 0.5s; }
.large-icon:nth-child(3) { animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 查询结果卡片 */
.word-card {
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    background: var(--bg-light);
    animation: slideUp 0.5s ease;
}

/* 内容包裹器 - 左右分栏 */
.word-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧主要内容 */
.word-main-content {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 右侧图片栏 */
.word-image-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

/* 单词配图区域 */
.word-image-section {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px var(--shadow);
}

.word-emoji {
    font-size: 8rem;
    margin: 20px 0;
    animation: float 3s ease-in-out infinite;
}

.word-custom-image {
    max-width: 100%;
    max-height: 350px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    object-fit: cover;
    margin: 10px 0;
}

.btn-upload {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: block;
}

.btn-upload:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

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

.word-title h2 {
    color: var(--primary-red);
    font-size: 2.2rem;
    margin: 0;
}

.phonetic {
    color: var(--text-light);
    font-size: 1.2rem;
    font-style: italic;
}

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

.btn-icon {
    background: var(--white);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: scale(1.1);
}

.btn-icon.saved {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

/* 汉译英结果列表 */
.english-results {
    margin: 20px 0;
}

.english-result-item {
    padding: 20px;
    margin: 15px 0;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
    cursor: pointer;
    transition: all 0.3s ease;
}

.english-result-item:hover {
    background: var(--light-red);
    transform: translateX(5px);
    box-shadow: 0 5px 15px var(--shadow);
}

.result-word {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.result-word strong {
    color: var(--primary-red);
    font-size: 1.5rem;
}

.phonetic-small {
    color: var(--text-light);
    font-size: 1rem;
    font-style: italic;
}

.result-meaning {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 10px;
}

.result-example {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.result-example .xz-tag {
    margin-right: 8px;
}

/* 释义部分 */
.chinese-meaning {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 500;
}

.chinese-meaning strong {
    color: var(--primary-red);
    margin-right: 10px;
}

.meanings {
    margin: 20px 0;
}

.meaning-item {
    margin: 15px 0;
    padding: 15px;
    background: var(--white);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
}

.part-of-speech {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.definition {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 例句部分 */
.examples {
    margin: 20px 0;
}

.examples h3 {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-item {
    margin: 15px 0;
    padding: 20px;
    background: var(--light-red);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
}

.example-en {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.example-text {
    flex: 1;
    min-width: 0;
}

.btn-speak-example {
    background: var(--white);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-speak-example:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: scale(1.1);
}

.btn-speak-example:active {
    transform: scale(0.95);
}

.example-zh {
    color: var(--text-light);
    font-size: 1rem;
}

.xz-tag {
    display: inline-block;
    background: var(--primary-red);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

/* 图片区域 */
.word-image {
    margin: 20px 0;
    text-align: center;
}

.word-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
}

.image-caption {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 热词列表 */
.hotwords-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hotword-card {
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hotword-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

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

.hotword-title {
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: 700;
}

.hotword-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.hotword-topic {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 10px;
}

.hotword-preview {
    color: var(--text-light);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 生词本列表 */
.vocabulary-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-red);
    border-radius: 10px;
}

.vocabulary-list {
    display: grid;
    gap: 15px;
}

.vocab-item {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.vocab-item:hover {
    border-color: var(--primary-red);
    box-shadow: 0 5px 15px var(--shadow);
}

.vocab-info h3 {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.vocab-meaning {
    color: var(--text-light);
    font-size: 1rem;
}

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

/* 自定义表单 */
.custom-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--light-red);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .search-box {
        flex-direction: column;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        font-size: 0.9rem;
        padding: 12px 15px;
    }

    .content {
        padding: 20px;
    }

    .word-title h2 {
        font-size: 1.8rem;
    }

    .hotwords-list {
        grid-template-columns: 1fr;
    }
    
    /* 移动端：图片在上，内容在下 */
    .word-content-wrapper {
        flex-direction: column-reverse;
    }
    
    .word-image-sidebar {
        width: 100%;
        position: static;
    }
    
    .word-emoji {
        font-size: 6rem;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .emoji {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2rem;
}

/* 图片相册样式 */
.word-images-gallery {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.gallery-item.active {
    opacity: 1;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.btn-delete-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.btn-delete-image:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.btn-gallery-nav {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-gallery-nav:hover {
    background: var(--dark-red);
    transform: scale(1.1);
}

.btn-gallery-nav:active {
    transform: scale(0.95);
}

.gallery-counter {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.btn-clear-images {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background: var(--text-light);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-images:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
}

/* 图片上传按钮样式优化 */
.btn-upload {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* 移动端图片相册优化 */
@media (max-width: 768px) {
    .word-images-gallery {
        height: 250px;
    }
    
    .btn-delete-image {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .btn-gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* 备考词书样式 */
.wordbook-section {
    animation: fadeIn 0.8s ease;
}

.wordbook-list-section {
    margin-bottom: 30px;
}

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

.wordbook-header h3 {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin: 0;
}

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

.wordbook-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.wordbook-card {
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease;
}

.wordbook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

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

.wordbook-card-header h3 {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
}

.wordbook-card-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.wordbook-card-progress {
    margin-top: 10px;
}

.progress-bar {
    height: 8px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 词书详情 */
.wordbook-detail {
    animation: fadeIn 0.5s ease;
}

.wordbook-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.wordbook-detail-header h3 {
    color: var(--primary-red);
    font-size: 1.8rem;
    margin: 0 20px;
    flex: 1;
}

.wordbook-progress {
    color: var(--text-light);
    font-size: 1rem;
}

.wordbook-words {
    display: grid;
    gap: 15px;
}

.wordbook-word-item {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wordbook-word-item:hover {
    border-color: var(--primary-red);
    box-shadow: 0 5px 15px var(--shadow);
    transform: translateX(5px);
}

.wordbook-word-item.learned {
    background: linear-gradient(135deg, var(--light-red) 0%, var(--white) 100%);
    border-color: var(--gold);
}

.wordbook-word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.word-text {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-right: 10px;
}

.pos-tag {
    display: inline-block;
    background: var(--primary-red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.learned-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.wordbook-word-meaning {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
}

.wordbook-word-note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.wordbook-source-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--white);
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 15px;
}

.word-note {
    margin: 20px 0;
    padding: 15px;
    background: var(--light-red);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
    color: var(--text-dark);
    line-height: 1.6;
}

.word-note strong {
    color: var(--primary-red);
    margin-right: 8px;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .loading {
    background: var(--white);
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    color: var(--primary-red);
}

/* 响应式 - 词书 */
@media (max-width: 768px) {
    .wordbook-list {
        grid-template-columns: 1fr;
    }
    
    .wordbook-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .wordbook-header h3 {
        text-align: center;
    }
    
    .wordbook-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .wordbook-header-actions button {
        width: 100%;
    }
    
    .wordbook-detail-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .wordbook-detail-header h3 {
        margin: 0;
    }
    
    .wordbook-card-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .word-text {
        font-size: 1.2rem;
    }
    
    .wordbook-source-badge {
        display: block;
        margin: 10px 0 0 0;
    }
    
    /* 空状态提示的表格横向滚动 */
    .empty-state table {
        font-size: 0.85rem;
    }
    
    .empty-state code {
        font-size: 0.8rem;
    }
}


/* ============================================
   ģ̬�Ի�����ʽ
============================================ */

.modal-overlay {
    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: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cover-option:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ��Ӧʽ - ģ̬�� */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    #coverSelector {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
    }
    
    .cover-option {
        font-size: 1.5rem !important;
        padding: 6px !important;
    }
}

/* ====== 热词 Banner (十日终焉海报) ====== */
.hotword-banner {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hotword-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--shadow);
}

.hotword-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.hotword-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.78) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px 30px;
}

.hotword-banner-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

.hotword-banner-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-top: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

/* 海报 Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .hotword-banner {
        height: 150px;
    }
    .hotword-banner-title {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }
    .hotword-banner-subtitle {
        font-size: 0.85rem;
    }
    .hotword-banner-overlay {
        padding: 18px 20px;
    }
}
