/* 纪念网站样式文件 - 更新版本 2024 */
/* 如果看不到半透明效果，请强制刷新浏览器 (Ctrl+F5 或 Cmd+Shift+R) */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.6;
    color: #333;
    background: #000;
    overflow-x: hidden;
}

/* 背景容器 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* 备用背景（如果视频加载失败） */
.background-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: -1;
}

/* 视频加载动画 */
.background-video {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.background-video.loaded {
    opacity: 1;
}

/* 主内容区域 */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: transparent;
    margin: 20px;
}

/* 头部区域 */
.header-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: transparent !important;
    border-radius: 0;
    position: relative;
    margin: 0 0 40px 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none !important;
}

/* 移除头部装饰线 */

.avatar-container {
    margin-bottom: 20px;
}

.avatar {
    width: 200px;
    height: 260px;
    border-radius: 8px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.avatar:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 25px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 墓碑效果装饰 */
.avatar::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.person-name {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.person-dates {
    font-size: 1.2em;
    color: #f8f9fa;
    font-weight: 400;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

.person-dates span:not(:last-child)::after {
    content: ' - ';
    margin: 0 5px;
}

/* 区块容器 */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2em;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    font-weight: 500;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #d4af37;
    border-radius: 2px;
}

/* 生平简介区域 */
.biography-section {
    padding: 40px 0;
    background: transparent;
}

.biography-section .section-container {
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 40px;
    border-radius: 15px !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.biography-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.biography-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.biography-content p:last-child {
    margin-bottom: 0;
}

/* 图片画廊区域 */
.gallery-section {
    padding: 40px 0;
    background: transparent;
}

.gallery-section .section-container {
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 40px;
    border-radius: 15px !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.gallery-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.image-gallery {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.gallery-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #d4af37;
    transform: scale(1.2);
}

/* 视频区域 */
.video-section {
    padding: 40px 0;
    background: transparent;
}

.video-section .section-container {
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 40px;
    border-radius: 15px !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-item {
    width: 100%;
    margin-bottom: 20px;
}

.video-item:last-child {
    margin-bottom: 0;
}

.video-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* 音乐播放器 */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-toggle {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    position: relative;
    overflow: hidden;
}

.player-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 6px 18px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.player-toggle:hover::before {
    opacity: 1;
}

.player-toggle:active {
    transform: translateY(-1px) scale(1.02);
}

.player-content {
    display: none;
    width: 320px;
    padding: 25px;
    position: absolute;
    bottom: 85px;
    right: 0;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.player-content.show {
    display: block;
    animation: slideUp 0.3s ease;
}

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

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.player-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.player-title {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.player-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.player-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.audio-info {
    margin-bottom: 20px;
    text-align: center;
}

.audio-title {
    font-size: 15px;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.control-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    width: 55px;
    height: 55px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.control-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.control-btn:active:not(:disabled) {
    transform: translateY(0) scale(1.02);
}

.control-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.5;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-radius: 10px;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
}

.progress-slider {
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 16px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.3);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #e0e0e0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-icon {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 图片预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

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

.modal-close:hover {
    color: #ccc;
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.modal-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 页脚 */
.footer {
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.25) !important;
    color: white;
    text-align: center;
    border-radius: 15px !important;
    margin-top: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.footer-content p {
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 300;
}

.footer-decoration {
    font-size: 1.5em;
}

.footer-decoration span {
    margin: 0 10px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.footer-decoration span:nth-child(2) {
    animation-delay: 1s;
}

.footer-decoration span:nth-child(3) {
    animation-delay: 2s;
}

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

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1em;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #d4af37;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        margin: 10px;
    }
    
    /* 移动设备上的视频背景优化 */
    .background-video {
        /* 在移动设备上确保视频覆盖整个屏幕 */
        min-width: 100%;
        min-height: 100%;
    }
    
    /* 移动端区块样式调整 */
    .biography-section .section-container,
    .gallery-section .section-container,
    .video-section .section-container {
        padding: 20px;
        margin: 0 10px;
    }

    .header-section {
        padding: 40px 20px 30px;
    }

    .avatar {
        width: 160px;
        height: 200px;
    }
    
    .avatar::before {
        width: 18px;
        height: 18px;
        top: -7px;
    }

    .person-name {
        font-size: 2em;
    }

    .person-dates {
        font-size: 1em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .biography-content {
        font-size: 1em;
        padding: 0 10px;
    }

    .image-gallery {
        height: 300px;
    }

    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .music-player {
        bottom: 20px;
        right: 20px;
    }
    
    .player-toggle {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .player-content {
        width: 300px;
        right: -15px;
        padding: 20px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .modal-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .footer {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin: 5px;
    }

    .header-section {
        padding: 30px 15px 20px;
    }

    .avatar {
        width: 140px;
        height: 180px;
    }
    
    .avatar::before {
        width: 16px;
        height: 16px;
        top: -6px;
    }

    .person-name {
        font-size: 1.8em;
    }

    .section-container {
        padding: 0 15px;
    }

    .biography-content {
        text-align: left;
    }

    .biography-content p {
        text-indent: 1em;
    }

    .image-gallery {
        height: 250px;
    }

    .gallery-controls {
        padding: 0 10px;
    }

    .player-content {
        width: 260px;
        padding: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }
}
