/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 密码保护页面 */
.password-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #ffeef8 0%, #e8d5ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.password-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 2.5rem;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: fadeInUp 0.8s ease-out;
}

.password-header h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.password-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #ff6b9d, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.password-header p {
    color: #636e72;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.password-form {
    margin-bottom: 1.5rem;
}

.password-form input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #ffe5f0;
    border-radius: 50px;
    font-size: 1.1rem;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.password-form input:focus {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.password-form button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
}

.password-form button:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 20px;
}

.password-hint {
    color: #636e72;
    font-size: 0.95rem;
    padding-top: 1rem;
    border-top: 1px solid #ffe5f0;
}

.password-page.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --accent-color: #ffa8c5;
    --light-pink: #ffe5f0;
    --purple: #a29bfe;
    --light-purple: #dfe6e9;
    --gold: #ffeaa7;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --shadow: rgba(255, 107, 157, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #ffeef8 0%, #e8d5ff 100%);
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景 */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 音乐控制按钮 */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
}

.music-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px var(--shadow);
}

.music-toggle.playing {
    animation: pulse 1.5s ease-in-out infinite;
}

.music-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 头部区域 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 1;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1) 0%, rgba(162, 155, 254, 0.1) 100%);
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px var(--shadow);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.date-counter {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.start-date {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.days-together {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

#daysCount {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 2rem;
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 时间轴区域 */
.timeline-section {
    position: relative;
    padding: 80px 20px;
    z-index: 1;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* 时间轴中心线 */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--purple));
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 时间轴项目 */
.timeline-item {
    position: relative;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.timeline-item.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* 时间轴内容容器 */
.timeline-content {
    width: 45%;
    position: relative;
}

.timeline-content.left {
    float: left;
    text-align: right;
    padding-right: 40px;
}

.timeline-content.right {
    float: right;
    text-align: left;
    padding-left: 40px;
}

/* 时间轴卡片 */
.timeline-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.timeline-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(255, 107, 157, 0.3);
}

.timeline-card.special {
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, rgba(255, 234, 167, 0.2), rgba(255, 255, 255, 0.95));
}

.timeline-card.highlight {
    border: 3px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 255, 255, 0.95));
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
}

.timeline-card.final {
    border: 4px solid var(--primary-color);
    box-shadow: 0 15px 60px rgba(255, 107, 157, 0.5);
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light-pink), var(--white));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin: 0;
}

.date-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.timeline-card:hover .card-image img {
    transform: scale(1.05);
}

/* 图片画廊样式 */
.card-image-gallery {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* 如果只有一张图片，占满整行 */
.card-image-gallery:has(.gallery-img:only-child) {
    grid-template-columns: 1fr;
}

.card-image-gallery .gallery-img:only-child {
    height: 400px;
}

/* 占位图样式 */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    transition: all 0.3s ease;
}

.gradient-1 {
    background: linear-gradient(135deg, #ffeef8, #e8d5ff);
}

.placeholder-text {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.timeline-card:hover .placeholder-image {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    text-align: left;
}

.card-body p {
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.8;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.highlight-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.15rem !important;
    margin-top: 1rem !important;
}

/* 时间轴标记点 */
.timeline-marker {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    z-index: 10;
}

.marker-dot {
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.2);
    transition: all 0.3s ease;
}

.timeline-item:hover .marker-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(255, 107, 157, 0.3);
}

.marker-dot.special {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 234, 167, 0.3);
    animation: glow 2s ease-in-out infinite;
}

.marker-dot.highlight {
    width: 32px;
    height: 32px;
    border-width: 5px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 6px rgba(255, 107, 157, 0.3);
    animation: glow 1.5s ease-in-out infinite;
}

.marker-dot.final-dot {
    width: 36px;
    height: 36px;
    border-width: 6px;
    animation: glow-strong 1.2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 157, 0.4);
    }
}

@keyframes glow-strong {
    0%, 100% {
        box-shadow: 0 0 0 6px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(255, 107, 157, 0.5);
    }
}

/* 底部区域 */
.footer {
    position: relative;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(162, 155, 254, 0.1));
    z-index: 1;
}

.footer-content {
    animation: fadeInUp 1s ease-out;
}

.message {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.copyright {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 响应式设计 - 平板 */
@media (max-width: 968px) {
    .main-title {
        font-size: 3rem;
    }

    .timeline-content.left,
    .timeline-content.right {
        width: 42%;
    }

    .card-header h3 {
        font-size: 1.5rem;
    }

    .card-image-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-img {
        height: 200px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .date-counter {
        padding: 1.5rem 2rem;
    }

    #daysCount {
        font-size: 1.5rem;
    }

    .music-toggle {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }

    .music-icon {
        font-size: 20px;
    }

    /* 移动端时间轴单列布局 */
    .timeline-container::before {
        left: 30px;
    }

    .timeline-content.left,
    .timeline-content.right {
        width: 100%;
        float: none;
        text-align: left;
        padding-left: 80px;
        padding-right: 20px;
    }

    .timeline-marker {
        left: 30px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-header h3 {
        font-size: 1.3rem;
    }

    .card-image {
        height: 250px;
    }

    .card-image-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-img {
        height: 200px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-body p {
        font-size: 1rem;
    }

    .message {
        font-size: 1.5rem;
    }

    .copyright {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .date-counter {
        padding: 1rem 1.5rem;
    }

    .start-date {
        font-size: 1rem;
    }

    .days-together {
        font-size: 1.2rem;
    }

    #daysCount {
        font-size: 1.3rem;
    }

    .timeline-content.left,
    .timeline-content.right {
        padding-left: 60px;
    }

    .timeline-container::before {
        left: 20px;
    }

    .timeline-marker {
        left: 20px;
    }

    .marker-dot {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .marker-dot.highlight {
        width: 26px;
        height: 26px;
        border-width: 4px;
    }

    .marker-dot.final-dot {
        width: 30px;
        height: 30px;
        border-width: 5px;
    }

    .card-image {
        height: 200px;
    }

    .gallery-img {
        height: 180px;
    }
}

/* 清除浮动 */
.timeline-item::after {
    content: '';
    display: table;
    clear: both;
}
