/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    --primary-pink: #ffb6c1;
    --primary-blue: #87ceeb;
    --primary-yellow: #fffacd;
    --accent-pink: #ff69b4;
    --accent-blue: #4682b4;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-blue) 50%, var(--primary-yellow) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 彩屑动画 */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Canvas 彩屑层 */
#confetti-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-pink);
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(2n) {
    background: var(--accent-blue);
}

.confetti:nth-child(3n) {
    background: var(--primary-yellow);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 页面头部 */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-pink);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 300;
}

/* 主要内容区域 */
.main {
    padding: 3rem 0;
}

/* 相册区域 */
.album-section {
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.album-section:nth-child(1) { animation-delay: 0.1s; }
.album-section:nth-child(2) { animation-delay: 0.2s; }
.album-section:nth-child(3) { animation-delay: 0.3s; }
.album-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 相册容器 */
.album-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
}

/* 相册信息区域 */
.album-info {
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid rgba(255, 182, 193, 0.2);
}

.album-title {
    font-size: 2rem;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.album-date {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.album-description {
    text-align: left;
    line-height: 1.8;
    color: var(--text-dark);
}

.album-description p {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 300;
}

.album-description p:last-child {
    margin-bottom: 0;
}

/* 轮播容器 */
.carousel-container {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 640px;
    object-fit: cover;
    border: 8px solid var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-slide img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--accent-pink);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--accent-pink);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--accent-pink);
    transform: scale(1.2);
}

/* 大图查看模态框 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary-pink);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: -80px;
}

.lightbox-nav.next {
    right: -80px;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    margin-top: 1rem;
    color: var(--white);
    font-size: 1.1rem;
}

/* 页面底部 */
.footer {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    text-align: center;
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

.footer p {
    color: var(--text-light);
    font-weight: 300;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .title {
        font-size: 2rem;
    }

    .album-title {
        font-size: 1.6rem;
    }

    .album-info {
        padding: 1.5rem;
    }

    .album-description {
        font-size: 0.95rem;
    }

    .carousel-slide img {
        height: 480px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .album-title {
        font-size: 1.4rem;
    }

    .album-info {
        padding: 1rem;
    }

    .album-description {
        font-size: 0.9rem;
    }

    .carousel-slide img {
        height: 360px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 悬停暂停动画 */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 焦点样式 */
.carousel-btn:focus,
.lightbox-close:focus,
.lightbox-nav:focus,
.indicator:focus {
    outline: 2px solid var(--accent-pink);
    outline-offset: 2px;
}
