/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f5f7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 音乐控制按钮 */
.music-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}



.music-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #ff6b81;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
}

.volume-slider {
    width: 80px;
    margin-left: 10px;
    cursor: pointer;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.header-content {
    position: relative;
    z-index: 2;
}

.title {
    font-size: 3.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease-out, letterSpacing 2s ease-out 0.5s both, textGlow 3s ease-in-out infinite 2s;
}

.subtitle {
    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.3s both, wave 2s ease-in-out infinite 2s;
}

/* 主内容样式 */
.main-content {
    padding: 50px 0;
}

.section-title {
    font-size: 2rem;
    color: #ff6b81;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #ff6b81, #87ceeb);
    border-radius: 3px;
}

/* 欢迎区域 */
.welcome-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.welcome-text {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.typing-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.typing-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.05), rgba(135, 206, 235, 0.05));
    border-radius: 15px;
    z-index: -1;
}

.welcome-image {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.welcome-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.welcome-image img:hover {
    transform: scale(1.02);
    animation: pulse 1s ease-in-out infinite;
}

/* 图片轮播样式 */
.carousel-section {
    margin-bottom: 80px;
}

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

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 时光轴样式 */
.timeline-section {
    margin-bottom: 80px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #ff6b81, #87ceeb);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }
.timeline-item:nth-child(5) { animation-delay: 1s; }
.timeline-item:nth-child(6) { animation-delay: 1.2s; }

.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.timeline-item:nth-child(even) .timeline-content {
    left: 50%;
    animation: slideInRight 0.8s ease-out forwards;
}

.timeline-content {
    position: relative;
    width: calc(50% - 30px);
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    opacity: 0;
}

.timeline-item:nth-child(odd) .timeline-content {
    transform: translateX(-50px);
}

.timeline-item:nth-child(even) .timeline-content {
    transform: translateX(50px);
}

.timeline-item:nth-child(1) .timeline-content { animation-delay: 0.3s; }
.timeline-item:nth-child(2) .timeline-content { animation-delay: 0.5s; }
.timeline-item:nth-child(3) .timeline-content { animation-delay: 0.7s; }
.timeline-item:nth-child(4) .timeline-content { animation-delay: 0.9s; }
.timeline-item:nth-child(5) .timeline-content { animation-delay: 1.1s; }
.timeline-item:nth-child(6) .timeline-content { animation-delay: 1.3s; }

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #ff6b81;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
}

.timeline-content h3 {
    color: #ff6b81;
    margin-bottom: 10px;
}

.timeline-content p {
    color: #555;
    margin-bottom: 10px;
}

.timeline-date {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #777;
}

/* 祝福语样式 */
.wishes-section {
    margin-bottom: 80px;
}

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

.wish-card {
    flex: 1;
    min-width: 250px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

.wish-card:nth-child(1) { animation-delay: 0.2s; }
.wish-card:nth-child(2) { animation-delay: 0.4s; }
.wish-card:nth-child(3) { animation-delay: 0.6s; }
.wish-card:nth-child(4) { animation-delay: 0.8s; }

.wish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #ff6b81, #87ceeb);
}

.wish-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.wish-icon {
    font-size: 2.5rem;
    color: #ff6b81;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.wish-card:hover .wish-icon {
    animation: heartBeat 1.5s ease-in-out infinite;
}

.wish-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.wish-card:hover .wish-text {
    transform: scale(1.05);
    color: #ff6b81;
}

/* 新增文字动画效果 */
.wish-animate {
    opacity: 0;
    animation: textReveal 1s ease-out forwards;
}

.wish-card:nth-child(1) .wish-animate { animation-delay: 0.5s; }
.wish-card:nth-child(2) .wish-animate { animation-delay: 0.7s; }
.wish-card:nth-child(3) .wish-animate { animation-delay: 0.9s; }
.wish-card:nth-child(4) .wish-animate { animation-delay: 1.1s; }

.poem-line {
    opacity: 0;
    animation: textSlideIn 0.8s ease-out forwards;
    display: inline-block;
}

.poem-line:nth-child(1) { animation-delay: 1.8s; }
.poem-line:nth-child(2) { animation-delay: 2s; }
.poem-line:nth-child(3) { animation-delay: 2.2s; }
.poem-line:nth-child(4) { animation-delay: 2.4s; }
.poem-line:nth-child(5) { animation-delay: 2.6s; }
.poem-line:nth-child(6) { animation-delay: 2.8s; }
.poem-line:nth-child(7) { animation-delay: 3s; }
.poem-line:nth-child(8) { animation-delay: 3.2s; }
.poem-line:nth-child(9) { animation-delay: 3.4s; }

.text-animate {
    opacity: 0;
    animation: textFadeIn 1s ease-out forwards;
}

.hongkong-info .text-animate:nth-child(1) { animation-delay: 0.3s; }
.hongkong-info .text-animate:nth-child(2) { animation-delay: 0.6s; }
.hongkong-info .text-animate:nth-child(3) { animation-delay: 0.9s; }

.special-wish {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 40px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.9);
    animation: zoomIn 1s ease-out forwards 1s;
    position: relative;
    overflow: hidden;
}

.special-wish::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

.poem {
    font-size: 1.3rem;
    line-height: 2;
    font-family: 'SimSun', serif;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: textFadeIn 1.5s ease-out forwards 1.5s;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

/* 留言板样式 */
.message-section {
    margin-bottom: 80px;
}

.message-container {
    max-width: 600px;
    margin: 0 auto;
}

.message-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.message-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.message-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.message-input:focus {
    outline: none;
    border-color: #ff6b81;
    box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
    transform: scale(1.02);
}

.message-submit {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #ff6b81, #ff8fab);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: bold;
}

.message-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.message-submit:hover {
    background: linear-gradient(to right, #ff5277, #ff7691);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.3);
    animation: pulse 1s ease-in-out infinite;
}

.message-submit:hover::before {
    left: 100%;
}

.message-submit:active {
    transform: translateY(0);
    animation: none;
}

.messages-container {
    max-width: 600px;
    margin: 0 auto;
}

.message-item {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

.message-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #ff6b81, #87ceeb);
    border-radius: 10px 0 0 10px;
}

.message-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.message-time {
    font-size: 0.9rem;
    color: #999;
    text-align: right;
}

/* 香港介绍样式 */
.hongkong-section {
    margin-bottom: 80px;
}

.hongkong-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
    transition: all 0.3s ease;
}

.hongkong-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.hongkong-image {
    flex: 1;
    min-width: 300px;
}

.hongkong-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hongkong-info {
    flex: 1;
    min-width: 300px;
    padding: 40px;
}

.hongkong-info p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    padding: 40px 0;
    text-align: center;
    color: white;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-date {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-icon {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.footer-icon:hover {
    transform: scale(1.2);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(to right, #ff6b81, #87ceeb);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 页面加载动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 打字机光标闪烁动画 */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #ff6b81; }
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 脉冲动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 滑入动画 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 缩放动画 */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 心跳动画 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

/* 摇摆动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-5px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(5px); }
}

/* 文字间距动画 */
@keyframes letterSpacing {
    from { letter-spacing: 0; }
    to { letter-spacing: 5px; }
}

/* 文字发光动画 */
@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(255, 107, 129, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 107, 129, 0.8), 0 0 30px rgba(255, 107, 129, 0.6); }
}

/* 文字显示动画 */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 滚动动画 */
/* =========================================
   滚动动画核心逻辑 (全局)
   ========================================= */

/* 所有带 animate-on-scroll 类的元素初始状态：隐藏且下移 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* 当 JS 添加 .visible 类时：显示并复位 */
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   祝福语区域动画特定样式
   ========================================= */

/* 1. 祝福语卡片基础样式 */
.wish-card {
    flex: 1;
    min-width: 250px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    /* 注意：这里不再写 animation，而是依赖父级 .animate-on-scroll 的过渡效果 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

/* 悬停效果保持不变 */
.wish-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 2. 卡片内部文字动画 (.wish-animate) */
/* 初始状态：隐藏 */
.wish-animate {
    opacity: 0;
    transform: translateY(20px);
    /* 这里不直接写 animation，而是等待父级 .visible 后触发 */
}

/* 当卡片变为可见时，内部文字执行 textReveal 动画 */
.wish-card.animate-on-scroll.visible .wish-animate {
    opacity: 1;
    transform: translateY(0);
    animation: textReveal 0.8s ease-out forwards;
}

/* 设置阶梯延迟，让四个卡片的文字依次出现 */
/* 注意：选择器要具体，确保优先级 */
.wishes-container .wish-card:nth-child(1).animate-on-scroll.visible .wish-animate { animation-delay: 0.1s; }
.wishes-container .wish-card:nth-child(2).animate-on-scroll.visible .wish-animate { animation-delay: 0.3s; }
.wishes-container .wish-card:nth-child(3).animate-on-scroll.visible .wish-animate { animation-delay: 0.5s; }
.wishes-container .wish-card:nth-child(4).animate-on-scroll.visible .wish-animate { animation-delay: 0.7s; }


/* 3. 特殊祝福（诗歌背景框）动画 */
.special-wish {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 40px;
    background: linear-gradient(135deg, #ffb6c1, #87ceeb);
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    /* 初始状态由 .animate-on-scroll 控制 (opacity:0) */
}

/* 当特殊祝福框可见时，执行 zoomIn 动画 */
.special-wish.animate-on-scroll.visible {
    /* 覆盖默认的 translateY，使用 zoomIn */
    animation: zoomIn 1s ease-out forwards;
}

/* 诗歌容器 */
.poem {
    font-size: 1.3rem;
    line-height: 2;
    font-family: 'SimSun', serif;
    position: relative;
    z-index: 1;
    opacity: 0; /* 初始隐藏 */
}

/* 当特殊祝福框可见时，诗歌容器淡入 */
.special-wish.animate-on-scroll.visible .poem {
    opacity: 1;
    animation: textFadeIn 1s ease-out forwards 0.5s;
}

/* 诗歌每一行 */
.poem-line {
    opacity: 0;
    display: inline-block;
}

/* 当特殊祝福框可见时，诗歌行逐行滑入 */
.special-wish.animate-on-scroll.visible .poem-line {
    animation: textSlideIn 0.8s ease-out forwards;
}

/* 设置诗歌行的阶梯延迟 */
.special-wish.animate-on-scroll.visible .poem-line:nth-child(1) { animation-delay: 0.7s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(2) { animation-delay: 0.9s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(3) { animation-delay: 1.1s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(4) { animation-delay: 1.3s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(5) { animation-delay: 1.5s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(6) { animation-delay: 1.7s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(7) { animation-delay: 1.9s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(8) { animation-delay: 2.1s; }
.special-wish.animate-on-scroll.visible .poem-line:nth-child(9) { animation-delay: 2.3s; }


/* =========================================
   定义动画关键帧 (Keyframes)
   ========================================= */

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

@keyframes textSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 保留原有的 shine 动画用于特殊祝福的背景闪光 */
.special-wish::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}


/* 香港介绍区域 */
.hongkong-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    /* 初始状态由 .animate-on-scroll 控制 */
}

.hongkong-info .text-animate {
    opacity: 0;
}

.animate-on-scroll.visible .hongkong-info .text-animate {
    opacity: 1;
    animation: textFadeIn 1s ease-out forwards;
}

.animate-on-scroll.visible .hongkong-info .text-animate:nth-child(1) { animation-delay: 0.3s; }
.animate-on-scroll.visible .hongkong-info .text-animate:nth-child(2) { animation-delay: 0.6s; }
.animate-on-scroll.visible .hongkong-info .text-animate:nth-child(3) { animation-delay: 0.9s; }


/* 时光轴样式修正 */
.timeline-item {
    margin-bottom: 50px;
    position: relative;
    /* 移除硬编码 animation，由 .animate-on-scroll 控制 */
}

.timeline-content {
    position: relative;
    width: calc(50% - 30px);
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    /* 初始状态由 .animate-on-scroll 控制 */
}

/* 时光轴左右滑入效果增强 */
/* 奇数项：从左侧滑入 */
.timeline-item:nth-child(odd) .timeline-content {
    transform: translateX(-50px); 
}

/* 偶数项：从右侧滑入 */
.timeline-item:nth-child(even) .timeline-content {
    transform: translateX(50px);
}

/* 当整个 timeline-item 可见时，覆盖上面的 transform，使其归位 */
.timeline-item.animate-on-scroll.visible .timeline-content {
    transform: translateX(0);
}

/* ... 后面的代码保持不变 ... */

/* 增强的悬停效果 */
img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

button:active, .btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* 延迟加载动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .welcome-section {
        flex-direction: column;
    }
    
    .welcome-text,
    .welcome-image {
        width: 100%;
    }
    
    .carousel-item img {
        height: 300px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        left: 60px !important;
    }
    
    .timeline-content::before {
        left: -10px !important;
    }
    
    .hongkong-content {
        flex-direction: column;
    }
    
    .hongkong-image,
    .hongkong-info {
        width: 100%;
    }
    
    .hongkong-image {
        height: 250px;
    }
    
    .music-controls {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .wish-card {
        min-width: 100%;
    }
    
    .poem {
        font-size: 1.1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}