/* DiaryManager系统专用样式 */
/* 创建日期: 2024-12-19 */
/* 用途: 为数据驱动的日记本系统提供样式支持 */

/* 确保历史图片容器样式正确 */
.historical-image-container {
    margin: 25px auto;
    text-align: center;
}

.historical-image {
    max-width: 75%;
    width: 75%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    margin: 0 auto;
    display: block;
}

.historical-image::after {
    content: '🔍 点击查看大图';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.historical-image:hover {
    transform: scale(1.02);
}

.historical-image:hover::after {
    opacity: 1;
}

/* 小图片样式 - 与默认样式相同，用于明确指定 */
.historical-image-container.small-image .historical-image {
    max-width: 40%;
    width: 40%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    display: block;
}

.historical-image-container.small-image .historical-image:hover {
    transform: scale(1.02);
}

/* 中等图片样式 - 适中的图片显示尺寸 */
.historical-image-container.medium-image {
    margin: 25px auto;
    text-align: center;
    max-width: none;
    width: auto;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
}

.historical-image-container.medium-image .historical-image {
    max-width: 60%;
    width: 60%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.18);
    margin: 0 auto;
    display: block;
}

.historical-image-container.medium-image .historical-image:hover {
    transform: scale(1.02);
}

/* 大图片样式 - 为特定页面提供更大的图片显示 */
.historical-image-container.large-image {
    margin: 35px 0;
}

.historical-image-container.large-image .historical-image {
    max-width: 120%;
    width: 120%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    margin-left: -10%;
    display: block;
}

.historical-image-container.large-image .historical-image:hover {
    transform: scale(1.03);
}

/* 超大图片样式 - 为需要特别突出的图片 */
.historical-image-container.extra-large-image {
    margin: 40px 0;
}

.historical-image-container.extra-large-image .historical-image {
    max-width: 140%;
    width: 140%;
    max-height: 700px;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    margin-left: -20%;
    display: block;
}

.historical-image-container.extra-large-image .historical-image:hover {
    transform: scale(1.04);
}

/* 确保交互完成覆盖层样式正确 */
.interaction-completed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.completion-message {
    text-align: center;
    color: white;
}

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

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

/* 交互容器样式 */
.interaction-container {
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: #fff;
    position: relative;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: height 0.3s ease;
}

/* 动态高度交互容器 */
.interaction-container.dynamic-height {
    height: auto;
    min-height: 400px;
}

.interaction-container.dynamic-height .interaction-frame {
    height: auto;
    min-height: inherit;
}

/* 中等交互游戏区样式 - 适中的游戏区显示尺寸 */
.interaction-container.medium-interaction {
    max-width: 75%;
    width: 75%;
    margin: 25px auto;
}

.interaction-container.medium-interaction .interaction-frame {
    height: 500px;
}

/* 大交互游戏区样式 - 为特定页面提供更大的游戏区显示 */
.interaction-container.large-interaction {
    max-width: 120%;
    width: 120%;
    margin: 30px auto;
    transform: translateX(-10%);
}

.interaction-container.large-interaction .interaction-frame {
    height: 700px;
}

/* 超大交互游戏区样式 - 为需要特别突出的游戏区 */
.interaction-container.extra-large-interaction {
    max-width: 140%;
    width: 140%;
    margin: 35px auto;
    transform: translateX(-20%);
}

.interaction-container.extra-large-interaction .interaction-frame {
    height: 800px;
}

/* 移动端适配 - 确保大尺寸交互区在小屏幕上不会溢出 */
@media (max-width: 768px) {
    .interaction-container.large-interaction,
    .interaction-container.extra-large-interaction {
        max-width: 100%;
        width: 100%;
        transform: none;
        margin: 20px auto;
    }
    
    .interaction-container.large-interaction .interaction-frame,
    .interaction-container.extra-large-interaction .interaction-frame {
        height: 500px;
    }
    
    .interaction-container.medium-interaction {
        max-width: 90%;
        width: 90%;
    }
    
    .interaction-container.medium-interaction .interaction-frame {
        height: 450px;
    }
}

.interaction-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(138, 43, 226, 0.03));
    border-bottom: 1px solid rgba(138, 43, 226, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.interaction-header h3 {
    margin: 0 0 8px 0;
    color: #8a2be2;
    font-size: 1.2rem;
    font-weight: 600;
}

.interaction-header p {
    margin: 0;
    color: #6a1b9a;
    font-size: 0.95rem;
    opacity: 0.9;
}

.interaction-frame {
    width: 100%;
    height: auto;
    min-height: 400px;
    border: none;
    display: block;
    background: #fff;
}

/* 只对非动态高度的iframe设置最大高度限制 */
.interaction-container:not(.dynamic-height) .interaction-frame {
    max-height: 80vh;
}

/* 为iframe内容添加缩放容器 */
.interaction-frame-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 400px;
    overflow: hidden;
    background: #fff;
    border-radius: 15px;
}

/* 针对特定需要缩放的iframe */
.interaction-frame.scaled {
    transform-origin: top center;
    transition: transform 0.3s ease;
}

/* 自适应缩放 - 根据容器大小计算缩放比例 */
@media (max-width: 1200px) {
    .interaction-container:not(.dynamic-height) .interaction-frame {
        min-height: 350px;
        max-height: 70vh;
    }
    
    .interaction-container.dynamic-height .interaction-frame {
        min-height: 350px;
    }
}

@media (max-width: 900px) {
    .interaction-container:not(.dynamic-height) .interaction-frame {
        min-height: 300px;
        max-height: 65vh;
    }
    
    .interaction-container.dynamic-height .interaction-frame {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .interaction-container:not(.dynamic-height) .interaction-frame {
        min-height: 280px;
        max-height: 60vh;
    }
    
    .interaction-container.dynamic-height .interaction-frame {
        min-height: 280px;
    }
    
    .interaction-container {
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .interaction-container:not(.dynamic-height) .interaction-frame {
        min-height: 250px;
        max-height: 55vh;
    }
    
    .interaction-container.dynamic-height .interaction-frame {
        min-height: 250px;
    }
    
    .interaction-container {
        margin: 10px auto;
    }
}

/* 日记图片样式 */
.diary-image {
    margin: 25px 0;
    text-align: center;
}

.diary-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.diary-image img:hover {
    transform: scale(1.02);
}

.image-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    opacity: 0.8;
}

/* 目录覆盖层样式 */
.toc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.toc-container {
    background: linear-gradient(135deg, #f8f5f0, #ede0d3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(138, 43, 226, 0.2);
}

.toc-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.toc-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.toc-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toc-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.toc-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 8px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.5);
}

.toc-item:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: rgba(138, 43, 226, 0.3);
    transform: translateX(5px);
}

.toc-item.current {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.2);
}

.toc-number {
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 0.9rem;
}

.toc-title {
    flex: 1;
    font-weight: 600;
    color: #2c1810;
    font-size: 1rem;
}

.toc-type {
    background: rgba(138, 43, 226, 0.1);
    color: #6a1b9a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 消息提示样式 */
.diary-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.diary-message-success {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    border-left: 4px solid #2e7d32;
}

.diary-message-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left: 4px solid #c62828;
}

.diary-message-info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-left: 4px solid #1565c0;
}

.diary-message-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-left: 4px solid #ef6c00;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 152, 0, 0.6);
    }
}

/* 目录中锁定项的样式 */
.toc-item.locked {
    opacity: 0.6;
    background: #f5f5f5 !important;
    cursor: not-allowed !important;
    position: relative;
}

.toc-item.locked:hover {
    background: #eeeeee !important;
    transform: none !important;
}

.toc-item.locked .toc-lock {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
}

.toc-item.locked .toc-title,
.toc-item.locked .toc-number,
.toc-item.locked .toc-type {
    color: #999 !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 错误页面样式 */
.error {
    text-align: center;
    padding: 50px 20px;
    color: #d32f2f;
    font-size: 1.2rem;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(244, 67, 54, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toc-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .toc-header {
        padding: 20px;
    }
    
    .toc-header h3 {
        font-size: 1.2rem;
    }
    
    .toc-content {
        padding: 15px;
    }
    
    .toc-item {
        padding: 12px 15px;
    }
    
    .toc-number {
        width: 30px;
        height: 30px;
        margin-right: 12px;
        font-size: 0.8rem;
    }
    
    .toc-title {
        font-size: 0.9rem;
    }
    
    .diary-message {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .historical-image-container.large-image .historical-image {
        max-width: 110%;
        width: 110%;
        max-height: 400px;
        margin-left: -5%;
    }
    
    .historical-image-container.extra-large-image .historical-image {
        max-width: 120%;
        width: 120%;
        max-height: 450px;
        margin-left: -10%;
    }
}

@media (max-width: 480px) {
    .interaction-frame {
        height: 400px;
    }
    
    .interaction-header {
        padding: 15px 20px;
    }
    
    .interaction-header h3 {
        font-size: 1.1rem;
    }
    
    .interaction-header p {
        font-size: 0.9rem;
    }
}

/* 解锁要求页面样式 */
.unlock-required-theme {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.unlock-required-page {
    text-align: center;
    padding: 60px 40px;
    color: white;
}

.lock-icon-large {
    font-size: 80px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.unlock-required-page h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #ecf0f1;
}

.unlock-requirement {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.unlock-requirement p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.unlock-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.action-btn.primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.action-btn.secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
}

/* 锁定状态的按钮样式 */
.continue-reading-btn.locked,
.enter-btn.locked {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d) !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.continue-reading-btn.locked:hover,
.enter-btn.locked:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4) !important;
}

/* 阶段指示器样式 */
.stage-indicator {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.stage-info {
    display: block;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.stage-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.stage-dot.active {
    background: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    transform: scale(1.2);
}

.stage-dot:hover {
    background: rgba(138, 43, 226, 0.7);
    transform: scale(1.1);
}

/* 阶段内容样式 */
.stage-content {
    margin-bottom: 30px;
}

.stage-title {
    color: #8a2be2;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
    font-weight: 600;
}

/* 阶段导航按钮 */
.stage-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stage-nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(45deg, #8a2be2, #6a1b9a);
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

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

.stage-nav-btn:disabled {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    cursor: not-allowed;
    opacity: 0.6;
}

.stage-nav-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 下一页按钮特殊样式 */
.next-page-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.next-page-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;
}

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

.next-page-btn:hover:not(:disabled) {
    background: linear-gradient(45deg, #ff5252, #e53935) !important;
    box-shadow: 0 8px 25px rgba(255, 82, 82, 0.5);
    transform: translateY(-3px) scale(1.02);
}

/* 交互未完成按钮样式 */
.interaction-required {
    background: linear-gradient(45deg, #f39c12, #e67e22) !important;
    border: 2px solid rgba(255, 193, 7, 0.5) !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4) !important;
    animation: interactionPulse 2s ease-in-out infinite !important;
    position: relative;
    overflow: hidden;
}

.interaction-required::after {
    content: '⚠️';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 1.2em;
    animation: warningBlink 1.5s ease-in-out infinite;
}

.interaction-required:hover:not(:disabled) {
    background: linear-gradient(45deg, #e67e22, #d35400) !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6) !important;
    transform: translateY(-2px) scale(1.02);
}

.interaction-required:disabled {
    background: linear-gradient(45deg, #f39c12, #e67e22) !important;
    opacity: 0.8;
    cursor: not-allowed;
}

@keyframes interactionPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(243, 156, 18, 0.7);
    }
}

@keyframes warningBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .stage-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .stage-nav-btn {
        max-width: none;
    }
    
    .stage-progress {
        gap: 6px;
    }
    
    .stage-dot {
        width: 10px;
        height: 10px;
    }
    
    .stage-indicator {
        padding: 12px;
    }
    
    .stage-title {
        font-size: 1.2em;
    }
}

/* 图片查看器模态框 */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.image-viewer-modal.active {
    display: flex;
}

.image-viewer-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px 15px 0 0;
    margin-bottom: 10px;
}

.image-viewer-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.image-viewer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-viewer-content {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 80vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    cursor: grab;
    display: block;
    object-fit: contain;
    transform-origin: center center;
}

.image-viewer-image:active {
    cursor: grabbing;
}

.image-viewer-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 25px;
    align-items: center;
}

.zoom-control {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.zoom-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.zoom-control:active {
    transform: scale(0.95);
}

.zoom-level {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 15px;
}

.reset-zoom {
    background: rgba(138, 43, 226, 0.7);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.reset-zoom:hover {
    background: rgba(138, 43, 226, 0.9);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .image-viewer-header {
        padding: 10px 15px;
    }
    
    .image-viewer-title {
        font-size: 1rem;
    }
    
    .image-viewer-close {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .image-viewer-controls {
        gap: 8px;
        padding: 12px 15px;
    }
    
    .zoom-control {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .zoom-level {
        font-size: 0.9rem;
        min-width: 50px;
        padding: 6px 10px;
    }
    
    .reset-zoom {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .historical-image::after {
        content: '🔍';
        font-size: 1rem;
        padding: 3px 6px;
    }
}

/* 纸条收集部分样式 */
.paper-collection-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.paper-collection-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: paperGlow 3s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes paperGlow {
    0% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    100% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

.paper-reward-container {
    position: relative;
    z-index: 1;
}

.paper-reward-container h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.paper-reward-container p {
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.collect-paper-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e, #f59e0b);
    color: #1a202c;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.collect-paper-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

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

.collect-paper-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.collect-paper-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.collect-paper-btn.collected {
    background: linear-gradient(135deg, #48bb78, #68d391);
    color: white;
    cursor: default;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.collect-paper-btn.collected:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.paper-hint-text {
    color: #805ad5 !important;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.paper-status-text {
    color: #38a169 !important;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 15px;
    background: rgba(72, 187, 120, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .paper-collection-section {
        margin-top: 20px;
        padding: 20px 15px;
    }
    
    .paper-reward-container h3 {
        font-size: 1.3rem;
    }
    
    .paper-reward-container p {
        font-size: 0.9rem;
    }
    
    .collect-paper-btn {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 160px;
    }
}

/* 内联解谜区域样式 */
.inline-puzzle-area {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(138, 43, 226, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(138, 43, 226, 0.2);
    animation: puzzleAreaSlideIn 0.5s ease-out;
}

.puzzle-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
    margin: 0 0 20px 0;
    border-radius: 1px;
}

.puzzle-title {
    color: #8a2be2;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: 600;
}

.puzzle-instruction {
    color: #6a1b9a;
    font-size: 1rem;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.5;
}

.spell-input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.spell-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    background: #fff;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 1px;
}

.spell-input:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
    transform: scale(1.02);
}

.spell-input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
    animation: inputShake 0.5s ease-in-out;
}

.spell-input.success {
    border-color: #28a745;
    background: #f8fff9;
}

.check-spell-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

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

.spell-feedback {
    min-height: 30px;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.spell-feedback.error {
    background: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #fadbd8;
}

.spell-feedback.success {
    background: #f8fff9;
    color: #28a745;
    border: 1px solid #d4edda;
}

.spell-feedback.info {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.spell-hint {
    min-height: 25px;
    padding: 12px 15px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 15px;
    display: none;
}

.spell-hint.show {
    display: block;
    animation: hintFadeIn 0.5s ease-out;
}

.attempt-counter {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.attempt-counter #attempt-count {
    color: #8a2be2;
    font-weight: bold;
    font-size: 1.1rem;
}

/* 动画效果 */
@keyframes puzzleAreaSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes hintFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .spell-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .check-spell-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .puzzle-title {
        font-size: 1.2rem;
    }
    
    .puzzle-instruction {
        font-size: 0.9rem;
    }
    
    .spell-input {
        font-size: 1rem;
        padding: 12px 15px;
    }
} 