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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    overflow-x: hidden;
    background: #000;
}

/* 主页面样式 */
.main-page {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* 确保背景是黑色 */
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* 确保容器背景是黑色 */
}

#backgroundVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* 向上移动视频内容，显示更多脸部 */
    background: #000; /* 确保视频背景是黑色 */
    min-width: 100%;
    min-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6; /* 确保视频在备用背景之上 */
}

/* 视频控制按钮 */
.video-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
}

.audio-btn, .play-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.audio-btn:hover, .play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.play-btn {
    font-size: 24px;
}

/* 播放按钮提示框样式 */
.play-btn-hint {
    position: absolute;
    right: 60px; /* 调整位置，确保在播放按钮左侧 */
    top: 50px; /* 调整垂直位置，与播放按钮对齐 */
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
    white-space: nowrap;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    animation: pulse 2s infinite;
    z-index: 30; /* 确保显示在其他元素之上 */
}

.play-btn-hint:after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 0 5px 10px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.7);
}

/* 视频提示样式 */
.video-tooltip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: bold;
    z-index: 25;
    opacity: 1;
    transition: opacity 0.5s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    30% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* 视频加载提示样式 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 15;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* 备用背景图片样式 */
.fallback-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: #000;
}

.fallback-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ff6b6b;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-loading p {
    font-size: 1.2rem;
    margin: 0;
}

/* 视频错误提示样式 */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 15;
    background: rgba(255, 71, 87, 0.9);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid #ff4757;
}

.video-error p {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.video-error button {
    background: white;
    color: #ff4757;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-error button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}



.content-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.countdown-section {
    margin-bottom: 50px;
}

.title {
    font-size: 3rem;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.time-number {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.time-label {
    font-size: 1.2rem;
    margin-top: 5px;
    color: #ffffff;
}

.overtime-message {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff4757;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    border-radius: 15px;
    border: 2px solid #ff4757;
    animation: pulse 2s infinite;
}

.play-hint {
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 15px 30px;
    border-radius: 25px;
    border: 2px solid #ffd700;
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite alternate;
}

.play-hint p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes glow {
    from { box-shadow: 0 0 10px #ffd700; }
    to { box-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700; }
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    font-size: 2rem;
    margin-bottom: 10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* 照片画廊页面样式 */
.gallery-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.gallery-header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.back-to-top {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.photo-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* 弹出框样式 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-text {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
}

/* 管理页面入口 */
.admin-trigger {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: transparent;
    cursor: pointer;
    z-index: 100;
}

/* 管理页面样式 */
.admin-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    padding: 20px;
    color: white;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.admin-header h3 {
    font-size: 2rem;
}

.close-admin {
    padding: 10px 20px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.close-admin:hover {
    background: #ff3742;
}

.upload-section {
    margin-bottom: 30px;
    text-align: center;
}

#photoUpload {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #4834d4;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #3742fa;
    transform: translateY(-2px);
}

.admin-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

.admin-photo-item {
    position: relative;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.admin-photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #ff3742;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .countdown-display {
        gap: 20px;
    }
    
    .time-unit {
        padding: 15px;
    }
    
    .time-number {
        font-size: 2.5rem;
    }
    
    .overtime-message {
        font-size: 1.8rem;
        padding: 15px 25px;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .countdown-display {
        gap: 15px;
    }
    
    .time-unit {
        padding: 10px;
    }
    
    .time-number {
        font-size: 2rem;
    }
    
    .overtime-message {
        font-size: 1.5rem;
        padding: 10px 20px;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
    }
}
