/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0a0a0a;
    overflow-x: hidden;
}

/* 加载提示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index: 9999;
    color: white;
    font-size: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-right: 15px;
}

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

/* 全屏展示区域 */
.showcase {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
    opacity: 0;
    z-index: 1;
    /* 添加模糊效果作为占位符 */
    filter: blur(10px);
    transform: scale(1.1);
}

.showcase-image.loaded {
    filter: blur(0);
    transform: scale(1);
    transition: filter 0.5s ease, transform 0.5s ease, opacity 1.5s ease-in-out;
}

.showcase-image.active {
    opacity: 1;
}

.showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}

.showcase-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 0 20px;
    max-width: 800px;
}

.showcase-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 700;
    letter-spacing: 2px;
}

.showcase-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    font-weight: 300;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

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

/* 画廊区域 */
.gallery-section {
    padding: 5rem 0;
    background: #0a0a0a;
}

.section-title {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
}

.gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    column-count: 4;
    column-gap: 15px;
}

@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 800px) {
    .gallery {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    .gallery {
        column-count: 1;
    }
    
    .showcase-content h1 {
        font-size: 2.5rem;
    }
    
    .showcase-content p {
        font-size: 1.2rem;
    }
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: #1a1a1a;
    position: relative;
}

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

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    /* 渐进加载效果 */
    filter: blur(5px);
    transform: scale(1.05);
}

.photo-item img.loaded {
    filter: blur(0);
    transform: scale(1);
    transition: filter 0.5s ease, transform 0.5s ease;
}

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

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(15px) brightness(0.7);
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    z-index: -1;
}

.modal-content {
    display: flex;
    min-height: 100vh;
    padding: 40px 20px;
    align-items: center;
    justify-content: center;
}

.modal-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s ease;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active .modal-container {
    transform: scale(1);
    opacity: 1;
}

.modal-image {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0c0c0c;
    cursor: pointer;
    position: relative;
}

.modal-image img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    /* 渐进加载效果 */
    filter: blur(5px);
}

.modal-image img.loaded {
    filter: blur(0);
    transition: filter 0.5s ease;
}

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

.modal-image::after {
    content: '点击查看全屏';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-details {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ecf0f1;
}

.modal-details h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.modal-details .photo-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.modal-details .photo-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #bdc3c7;
}

.modal-details .photo-meta {
    font-size: 0.9rem;
    color: #95a5a6;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    font-size: 1.5rem;
    color: white;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 全屏图片样式 */
.fullscreen-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.fullscreen-image.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.fullscreen-image img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    /* 渐进加载效果 */
    filter: blur(5px);
}

.fullscreen-image img.loaded {
    filter: blur(0);
    transition: filter 0.5s ease;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    font-size: 1.5rem;
    color: white;
    z-index: 2001;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* 页脚样式 */
footer {
    text-align: center;
    padding: 3rem;
    background: #0a0a0a;
    color: #7f8c8d;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links {
    margin-bottom: 1.5rem;
}

.social-links a {
    color: #7f8c8d;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #3498db;
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #3498db;
}