/* 日记页面样式系统 - 神秘活泼风格重新设计 */

/* 全局动画关键帧 */
@keyframes mysticalGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(138, 43, 226, 0.3), 
                    0 0 40px rgba(138, 43, 226, 0.1),
                    inset 0 1px 1px rgba(255, 255, 255, 0.8);
    }
    50% { 
        box-shadow: 0 0 30px rgba(138, 43, 226, 0.5), 
                    0 0 60px rgba(138, 43, 226, 0.2),
                    inset 0 1px 1px rgba(255, 255, 255, 0.8);
    }
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.6; }
    25% { transform: translateY(-8px) rotate(90deg); opacity: 1; }
    50% { transform: translateY(-5px) rotate(180deg); opacity: 0.8; }
    75% { transform: translateY(-12px) rotate(270deg); opacity: 1; }
}

@keyframes magicalPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.1); }
}

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

@keyframes shimmerEffect {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* 日记封面样式 - 神秘风格 */
.diary-cover {
    text-align: center;
    padding: 60px 30px;
    background: 
        radial-gradient(circle at 30% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(75, 0, 130, 0.08) 0%, transparent 50%),
        linear-gradient(145deg, #f7f1e8, #ede0d3);
    border-radius: 20px;
    box-shadow: 
        0 12px 40px rgba(138, 43, 226, 0.15),
        0 0 0 1px rgba(138, 43, 226, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    position: relative;
    border: 3px solid transparent;
    background-clip: padding-box;
    max-width: 800px;
    margin: 0 auto;
    animation: mysticalGlow 4s ease-in-out infinite;
    overflow: hidden;
}

/* 神秘装饰元素 */
.diary-cover::before {
    content: '✨';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 1.5rem;
    animation: sparkleFloat 3s ease-in-out infinite;
    z-index: 1;
}

.diary-cover::after {
    content: '🔮';
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 1.5rem;
    animation: sparkleFloat 3s ease-in-out infinite 1.5s;
    z-index: 1;
}

.cover-decoration {
    font-size: 4rem;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #8a2be2, #4b0082, #9932cc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: magicalPulse 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    filter: drop-shadow(2px 2px 4px rgba(138, 43, 226, 0.3));
}

.diary-title {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #2c1810, #8a2be2, #2c1810);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(138, 43, 226, 0.2);
    position: relative;
}

.diary-subtitle {
    font-size: 1.2rem;
    color: #6a1b9a;
    margin-bottom: 35px;
    font-style: italic;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(106, 27, 154, 0.3);
}

/* 【日记页】样式 - 温馨复古风格 */
.diary-page {
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 152, 0, 0.12) 0%, transparent 40%),
        linear-gradient(145deg, #fefcf8, #f8f5f0, #fff8e1);
    border-radius: 15px;
    padding: 40px 40px;
    margin: 20px auto;
    max-width: 900px;
    min-height: 400px;
    box-shadow: 
        0 12px 40px rgba(255, 152, 0, 0.2),
        0 0 0 2px rgba(255, 152, 0, 0.15),
        inset 0 2px 8px rgba(255, 248, 225, 0.9);
    border: 3px solid rgba(255, 152, 0, 0.2);
    position: relative;
    overflow: hidden;
    /* animation: warmGlow 4s ease-in-out infinite alternate; */ /* 移除影响阅读的动画效果 */
}

/* 日记页装饰元素 */
.diary-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 80px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(255, 105, 97, 0.6) 0%,
        rgba(255, 152, 0, 0.8) 30%,
        rgba(255, 193, 7, 0.7) 70%,
        rgba(255, 105, 97, 0.6) 100%);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.4);
    /* animation: warmPulse 3s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
}

.diary-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 152, 0, 0.08) 0px,
            rgba(255, 152, 0, 0.08) 1px,
            transparent 1px,
            transparent 32px
        ),
        /* 增加纸张纹理 */
        radial-gradient(circle at 25% 25%, rgba(255, 193, 7, 0.03) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 152, 0, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 60px 60px;
    pointer-events: none;
}

/* 【科学笔记】样式 - 科技神秘风格 */
.diary-page.science-note {
    background: 
        radial-gradient(circle at 25% 25%, rgba(0, 188, 212, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(63, 81, 181, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #e8f4fd, #f0f8ff, #e3f2fd, #bbdefb);
    border: 3px solid rgba(63, 81, 181, 0.3);
    box-shadow: 
        0 15px 50px rgba(63, 81, 181, 0.25),
        0 0 0 2px rgba(63, 81, 181, 0.2),
        inset 0 2px 8px rgba(227, 242, 253, 0.9),
        0 0 30px rgba(0, 188, 212, 0.1);
    /* animation: scientificPulse 5s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
}

/* 科学笔记装饰 */
.diary-page.science-note::before {
    background: linear-gradient(to bottom, 
        rgba(0, 188, 212, 0.7) 0%,
        rgba(63, 81, 181, 0.9) 30%,
        rgba(25, 118, 210, 0.8) 70%,
        rgba(0, 188, 212, 0.7) 100%);
    box-shadow: 0 0 20px rgba(63, 81, 181, 0.5);
    /* animation: scientificShimmer 4s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
    width: 5px;
}

.diary-page.science-note::after {
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(63, 81, 181, 0.12) 0px,
            rgba(63, 81, 181, 0.12) 1px,
            transparent 1px,
            transparent 28px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 188, 212, 0.06) 0px,
            rgba(0, 188, 212, 0.06) 1px,
            transparent 1px,
            transparent 40px
        ),
        /* 添加科技网格纹理 */
        radial-gradient(circle at 20% 80%, rgba(63, 81, 181, 0.03) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(0, 188, 212, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 70px 70px;
}

/* 日记页标题样式 */
.diary-header {
    text-align: center;
    margin-bottom: 5px;
    position: relative;
}

.diary-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-family: 'Georgia', serif;
    font-weight: bold;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

/* 【日记页】标题样式 */
.diary-header h2:contains("【日记页】") {
    background: linear-gradient(45deg, #ff9800, #ffc107, #ffb300, #ff9800);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% auto;
    /* animation: warmShimmer 4s linear infinite; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 6px rgba(255, 152, 0, 0.4);
    box-shadow: 
        0 8px 25px rgba(255, 152, 0, 0.2),
        inset 0 2px 4px rgba(255, 248, 225, 0.8);
    background-color: rgba(255, 248, 225, 0.3);
    border: 2px solid rgba(255, 152, 0, 0.2);
}

.diary-header h2:contains("【日记页】")::before {
    content: '📖';
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    /* animation: warmFloat 3s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 4px rgba(255, 152, 0, 0.3);
}

.diary-header h2:contains("【日记页】")::after {
    content: '✒️';
    position: absolute;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    /* animation: warmFloat 3s ease-in-out infinite 1.5s; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 4px rgba(255, 152, 0, 0.3);
}

/* 【科学笔记】标题样式 */
.diary-header h2:contains("【科学笔记】") {
    background: linear-gradient(45deg, #3f51b5, #00bcd4, #1976d2, #3f51b5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% auto;
    /* animation: scientificShimmer 4s linear infinite; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 6px rgba(63, 81, 181, 0.4);
    box-shadow: 
        0 10px 30px rgba(63, 81, 181, 0.3),
        inset 0 2px 4px rgba(227, 242, 253, 0.8),
        0 0 20px rgba(0, 188, 212, 0.2);
    background-color: rgba(227, 242, 253, 0.4);
    border: 2px solid rgba(63, 81, 181, 0.3);
}

.diary-header h2:contains("【科学笔记】")::before {
    content: '🧪';
    position: absolute;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    /* animation: scientificPulse 2.5s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 4px rgba(63, 81, 181, 0.3);
}

.diary-header h2:contains("【科学笔记】")::after {
    content: '⚛️';
    position: absolute;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    /* animation: atomicSpin 4s linear infinite; */ /* 移除影响阅读的动画效果 */
    text-shadow: 2px 2px 4px rgba(0, 188, 212, 0.3);
}

/* 日记内容区域 */
.diary-content {
    position: relative;
    z-index: 2;
    line-height: 1.9;
    font-size: 1.1rem;
    text-align: justify;
    padding-left: 60px;
}

/* 【日记页】内容样式 */
.diary-page.diary-personal .diary-content {
    color: #3e2723;
    font-family: 'Georgia', serif;
    background: rgba(255, 248, 225, 0.3);
    padding: 15px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 152, 0, 0.1);
    box-shadow: inset 0 2px 8px rgba(255, 248, 225, 0.5);
}

.diary-page.diary-personal .diary-text p {
    margin-bottom: 8px !important;
    padding: 10px 20px !important;
    text-indent: 2em;
    position: relative;
    line-height: 1.8;
    background: rgba(255, 248, 225, 0.2);
    border-radius: 8px;
    border-left: 4px solid rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
}

.diary-page.diary-personal .diary-text p:hover {
    background: rgba(255, 248, 225, 0.4);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.1);
}

/* 【科学笔记】内容样式 */
.diary-page.science-note .diary-content {
    color: #1a237e;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: rgba(227, 242, 253, 0.4);
    padding: 15px 30px;
    border-radius: 15px;
    border: 1px solid rgba(63, 81, 181, 0.2);
    box-shadow: inset 0 2px 8px rgba(227, 242, 253, 0.6);
}

.diary-page.science-note .diary-text p {
    margin-bottom: 8px !important;
    padding: 12px 25px !important;
    text-indent: 2em;
    background: rgba(227, 242, 253, 0.3);
    border-radius: 12px;
    border-left: 5px solid rgba(63, 81, 181, 0.4);
    position: relative;
    transition: all 0.3s ease;
    line-height: 1.8;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.05);
}

.diary-page.science-note .diary-text p:hover {
    background: rgba(227, 242, 253, 0.5);
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 6px 20px rgba(63, 81, 181, 0.15);
    border-left-color: rgba(0, 188, 212, 0.6);
}

/* 通用段落样式调整 */
.diary-content p {
    color: #2c1810 !important;
    margin-bottom: 8px !important;
    text-indent: 2em;
    line-height: 1.8;
}

/* 动画效果 */
@keyframes warmGlow {
    0% { box-shadow: 0 12px 40px rgba(255, 152, 0, 0.2), 0 0 0 2px rgba(255, 152, 0, 0.15), inset 0 2px 8px rgba(255, 248, 225, 0.9); }
    100% { box-shadow: 0 15px 45px rgba(255, 152, 0, 0.3), 0 0 0 2px rgba(255, 152, 0, 0.2), inset 0 2px 8px rgba(255, 248, 225, 0.9); }
}

@keyframes warmPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 152, 0, 0.4); transform: scaleY(1); }
    50% { box-shadow: 0 0 20px rgba(255, 152, 0, 0.6); transform: scaleY(1.02); }
}

@keyframes warmFloat {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(2px); }
}

@keyframes warmShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes scientificPulse {
    0% { 
        box-shadow: 0 15px 50px rgba(63, 81, 181, 0.25), 0 0 0 2px rgba(63, 81, 181, 0.2), inset 0 2px 8px rgba(227, 242, 253, 0.9), 0 0 30px rgba(0, 188, 212, 0.1);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 20px 60px rgba(63, 81, 181, 0.35), 0 0 0 2px rgba(63, 81, 181, 0.3), inset 0 2px 8px rgba(227, 242, 253, 0.9), 0 0 40px rgba(0, 188, 212, 0.2);
        transform: scale(1.005);
    }
    100% { 
        box-shadow: 0 15px 50px rgba(63, 81, 181, 0.25), 0 0 0 2px rgba(63, 81, 181, 0.2), inset 0 2px 8px rgba(227, 242, 253, 0.9), 0 0 30px rgba(0, 188, 212, 0.1);
        transform: scale(1);
    }
}

@keyframes scientificShimmer {
    0% { 
        background-position: 0% 50%; 
        box-shadow: 0 0 20px rgba(63, 81, 181, 0.5);
    }
    50% { 
        background-position: 100% 50%; 
        box-shadow: 0 0 30px rgba(0, 188, 212, 0.7);
    }
    100% { 
        background-position: 0% 50%; 
        box-shadow: 0 0 20px rgba(63, 81, 181, 0.5);
    }
}

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

/* 列表项样式调整 */
.diary-content ul {
    margin-bottom: 25px;
    padding-left: 40px;
}

.diary-content li {
    margin-bottom: 12px;
    line-height: 1.8;
    text-indent: 0;
}

/* 特殊装饰元素 */
.sparkle-decoration {
    position: absolute;
    pointer-events: none;
    font-size: 1rem;
    opacity: 0.6;
    /* animation: sparkleFloat 4s ease-in-out infinite; */ /* 移除影响阅读的动画效果 */
}

.sparkle-decoration:nth-child(1) { top: 10%; left: 85%; animation-delay: 0s; }
.sparkle-decoration:nth-child(2) { top: 25%; right: 10%; animation-delay: 1s; }
.sparkle-decoration:nth-child(3) { bottom: 30%; left: 5%; animation-delay: 2s; }
.sparkle-decoration:nth-child(4) { bottom: 15%; right: 15%; animation-delay: 3s; }

/* 名词解释通用样式 - 具体颜色由分级样式控制 */
.concept-word {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    /* 颜色和样式由concept-critical、concept-important、concept-helpful单独控制 */
}

/* 通用悬停效果的备用样式（当分级样式未生效时） */
.concept-word:hover {
    transform: translateY(-1px);
}

/* 增强的导航样式 */
.chapter-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: 
        radial-gradient(circle at center, rgba(138, 43, 226, 0.08) 0%, transparent 70%),
        linear-gradient(135deg, rgba(44, 24, 16, 0.05), rgba(138, 43, 226, 0.03));
    border-radius: 20px;
    margin: 30px auto 20px;
    max-width: 900px;
    box-shadow: 
        0 6px 20px rgba(138, 43, 226, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(138, 43, 226, 0.1);
}

.nav-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.nav-btn::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 ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.prev-btn, .next-btn {
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.prev-btn:hover:not(:disabled), .next-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.contents-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.contents-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #ffa726, #ff8f00);
}

.page-indicator {
    background: linear-gradient(135deg, #f8f5f0, #ede0d3);
    color: #2c1810;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.1),
        inset 0 1px 1px rgba(255,255,255,0.9);
    border: 2px solid rgba(138, 43, 226, 0.1);
}

/* 可点击的目录页码指示器 */
.page-indicator.clickable-toc {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.page-indicator.clickable-toc:hover {
    background: linear-gradient(135deg, #e8d9f3, #d1c2e8);
    color: #6a1b9a;
    border-color: rgba(138, 43, 226, 0.3);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 18px rgba(138, 43, 226, 0.2),
        inset 0 1px 1px rgba(255,255,255,0.9);
}

.page-indicator.clickable-toc:active {
    transform: translateY(0px);
    box-shadow: 
        0 3px 10px rgba(138, 43, 226, 0.3),
        inset 0 1px 1px rgba(255,255,255,0.9);
}

/* 特殊交互元素样式 */
.alpha-decay-demo, .beta-decay-demo, .half-life-demo {
    background: 
        radial-gradient(circle at 30% 30%, rgba(76, 175, 80, 0.1) 0%, transparent 60%),
        linear-gradient(135deg, #f1f8e9, #e8f5e8);
    border: 3px solid rgba(76, 175, 80, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 
        0 8px 25px rgba(76, 175, 80, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.alpha-decay-demo::before, .beta-decay-demo::before, .half-life-demo::before {
    content: '⚗️';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    animation: magicalPulse 2s ease-in-out infinite;
}

.demo-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

/* 元素展示卡片 */
.element-discovery, .nobel-showcase {
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #fffde7, #fff8e1);
    border: 3px solid rgba(255, 193, 7, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 
        0 8px 25px rgba(255, 193, 7, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    text-align: center;
}

.elements-showcase, .awards-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.element-card, .award {
    background: linear-gradient(135deg, #fff, #f5f5f5);
    border: 2px solid rgba(255, 193, 7, 0.4);
    border-radius: 12px;
    padding: 20px;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    transition: all 0.3s ease;
    animation: magicalPulse 4s ease-in-out infinite;
}

.element-card:hover, .award:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

/* 元素符号样式 */
.element-symbol {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff9800, #ffc107, #ff9800);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255, 152, 0, 0.3);
}

.element-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
}

.element-number, .discovery-year {
    font-size: 0.9rem;
    color: #bf360c;
    margin: 4px 0;
}

/* 诺贝尔奖卡片特殊样式 */
.physics-award {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: rgba(33, 150, 243, 0.4);
}

.chemistry-award {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-color: rgba(156, 39, 176, 0.4);
}

.award-year {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 8px;
}

.chemistry-award .award-year {
    color: #7b1fa2;
}

.award-type {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.award-reason {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 知识总结列表 */
.knowledge-summary {
    background: rgba(138, 43, 226, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #8a2be2;
}

.knowledge-summary li {
    margin: 15px 0;
    padding-left: 10px;
    position: relative;
    color: #4a148c;
    font-weight: 500;
    line-height: 1.8;
    text-indent: 0;
}

.knowledge-summary li::before {
    content: '⚛️';
    position: absolute;
    left: -25px;
    font-size: 1rem;
}

/* 完成页面特殊效果 */
.final-page {
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(138, 43, 226, 0.1) 0%, transparent 40%),
        linear-gradient(135deg, #fefcf8, #f8f5f0);
    animation: mysticalGlow 3s ease-in-out infinite;
}

.final-page .sparkle-decoration {
    animation-duration: 2s;
    font-size: 1.5rem;
}

.chapter-completion {
    background: 
        radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, #fff8e1, #fffde7);
    border: 3px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 
        0 12px 30px rgba(255, 215, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    animation: magicalPulse 2s ease-in-out infinite;
}

.chapter-completion h3 {
    font-size: 2rem;
    background: linear-gradient(45deg, #ff9800, #ffc107, #ffeb3b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    animation: shimmerEffect 3s linear infinite;
    text-shadow: 2px 2px 4px rgba(255, 152, 0, 0.3);
}

.reward-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
}

.reward-icon {
    font-size: 3rem;
    animation: sparkleFloat 2s ease-in-out infinite;
}

.reward-text {
    text-align: left;
    color: #2e7d32;
    font-weight: 600;
}

.reward-text strong {
    font-size: 1.2rem;
    color: #1b5e20;
}

.completion-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
}

.complete-btn, .back-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.complete-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.complete-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.back-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #ffa726, #ff8f00);
}

/* 按钮发光效果 */
.complete-btn::before, .back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.complete-btn:hover::before, .back-btn:hover::before {
    left: 100%;
}

/* 签名样式 */
.signature {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: #6a1b9a;
    text-align: right;
    margin-top: 30px;
    position: relative;
}

.signature::before {
    content: '✒️';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.7;
}

/* 密码锁页面增强 */
.password-protected {
    background: 
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(75, 0, 130, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #f7f1e8, #ede0d3);
    border: 3px solid rgba(138, 43, 226, 0.2);
    animation: mysticalGlow 4s ease-in-out infinite;
}

.lock-overlay {
    position: relative;
    z-index: 2;
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: magicalPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.3));
}

.password-lock {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    margin: 30px auto;
    max-width: 400px;
    box-shadow: 
        0 8px 25px rgba(138, 43, 226, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(138, 43, 226, 0.2);
}

.password-lock h3 {
    color: #6a1b9a;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.password-hint {
    color: #8a2be2;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1rem;
}

.password-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#curie-password {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

#curie-password:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.unlock-btn {
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.password-error {
    color: #d32f2f;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: rgba(211, 47, 47, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(211, 47, 47, 0.3);
}

/* 科学家肖像样式 */
.scientist-portrait {
    margin: 25px auto;
    text-align: center;
}

.portrait-placeholder {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: magicalPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(138, 43, 226, 0.3));
}

.scientist-name {
    font-size: 1.4rem;
    color: #2c1810;
    font-weight: bold;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #2c1810, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scientist-achievement {
    font-size: 1rem;
    color: #6a1b9a;
    font-style: italic;
    opacity: 0.9;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .diary-page {
        padding: 30px 25px;
        margin: 15px 10px;
        border-radius: 12px;
    }
    
    .diary-content {
        padding-left: 20px;
        font-size: 1rem;
    }
    
    .diary-header h2 {
        font-size: 1.6rem;
    }
    
    .diary-header h2::before,
    .diary-header h2::after {
        display: none;
    }
    
    .chapter-navigation {
        padding: 15px;
        gap: 10px;
        flex-wrap: wrap;
        margin: 20px auto 15px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .page-indicator {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .page-indicator.clickable-toc:hover {
        transform: translateY(-1px);
    }
    
    .elements-showcase, .awards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .sparkle-decoration {
        display: none;
    }
    
    .completion-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .complete-btn, .back-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .reward-notification {
        flex-direction: column;
        text-align: center;
    }
    
    .reward-text {
        text-align: center;
    }
    
    .password-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .chapter-navigation {
        padding: 10px;
        gap: 8px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .page-indicator {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .page-indicator.clickable-toc:hover {
        transform: translateY(-1px);
    }
} 