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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #f1f1f1;
    text-align: center;
    padding: 50px;
}

header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #777;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #e3e3e3;
    padding: 40px;
    animation: fadeIn 2s ease-in-out;
}

.hero-text h2 {
    font-size: 2.5rem;
    color: #444;
}

.hero-text p {
    font-size: 1.2rem;
    color: #666;
    max-width: 400px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-image {
    position: relative;
    width: 300px;
    height: 400px;
    background-color: #ddd;
    border-radius: 8px;
    background-image: url('hero-image.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.flowers,
.candles {
    position: absolute;
    bottom: -20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.flowers {
    bottom: -50px;
}

.candles {
    bottom: -80px;
    justify-content: space-between;
    padding: 0 10px;
}

.flower,
.candle {
    width: 40px;
    height: 40px;
    background-color: #ff6f61;
    border-radius: 50%;
}

.candle {
    background-color: #ffd700;
    height: 60px;
    width: 15px;
    position: relative;
}

.candle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 10px;
    background-color: #ff6347;
    border-radius: 50%;
    animation: flicker 1.5s infinite ease-in-out;
}

@keyframes flicker {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.timeline {
    background-color: #fff;
    padding: 40px;
    text-align: center;
}

.timeline h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.timeline ul {
    list-style-type: none;
}

.timeline li {
    font-size: 1.2rem;
    margin: 10px 0;
}

.timeline .date {
    font-weight: bold;
    color: #555;
}

.gallery {
    background-color: #fff;
    padding: 40px;
    text-align: center;
}

.gallery h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.images {
    display: flex;
    justify-content: space-around;
}

.image {
    width: 200px;
    height: 200px;
    background-color: #ccc;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image:hover {
    transform: scale(1.1);
}

.message {
    background-color: #e3e3e3;
    padding: 40px;
    text-align: center;
    font-size: 1.2rem;
}

footer {
    background-color: #f1f1f1;
    text-align: center;
    padding: 20px;
    font-size: 1rem;
    color: #777;
}

.fo {
    font-size: 1rem;
    color: #777;
}
/* 鲜花样式 */
.flowers {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    width: 200px;
    animation: flowerAnimation 2s ease-in-out infinite;
}

.flower {
    width: 40px;
    height: 40px;
    background-color: #ff6f61;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: flowerBloom 2s ease-in-out infinite;
}

.flower::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #ffeb3b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

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

@keyframes flowerAnimation {
    0% {
        transform: translateX(-50%) scale(0.8);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        transform: translateX(-50%) scale(0.8);
    }
}

/* 蜡烛样式 */
.candles {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    width: 150px;
    z-index: 1;
}

.candle {
    width: 15px;
    height: 60px;
    background-color: #ffd700;
    position: relative;
    border-radius: 8px;
    animation: flicker 1.5s infinite ease-in-out;
}

.candle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 10px;
    background-color: #ff6347;
    border-radius: 50%;
    animation: flicker 1.5s infinite ease-in-out;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* 标题样式 */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #e3e3e3;
    height: 80vh; /* 使页面占满大部分高度 */
    position: relative;
}

.hero-text h2 {
    font-size: 2.5rem;
    color: #444;
}

.hero-text p {
    font-size: 1.2rem;
    color: #666;
    max-width: 400px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-image {
    position: relative;
    width: 300px;
    height: 400px;
    background-color: #aaa; /* 模拟遗照背景色 */
    border-radius: 8px;
}

/* 鲜花样式 */
.flowers {
    position: absolute;
    bottom: -10px; /* 使鲜花出现在遗照下方 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    width: 200px;
    z-index: 2;
}

.flower {
    width: 40px;
    height: 40px;
    background-color: #ff6f61;
    border-radius: 50%;
    position: relative;
    animation: flowerBloom 2s ease-in-out infinite;
}

.flower::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #ffeb3b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

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

/* 蜡烛样式 */
.candles {
    position: absolute;
    bottom: -20px; /* 使蜡烛出现在鲜花下方 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    width: 150px;
    z-index: 1;
}

.candle {
    width: 15px;
    height: 60px;
    background-color: #ffd700;
    position: relative;
    border-radius: 8px;
    animation: flicker 1.5s infinite ease-in-out;
}

.candle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 10px;
    background-color: #ff6347;
    border-radius: 50%;
    animation: flicker 1.5s infinite ease-in-out;
}

.center-flex {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    height: 100px;           /* 为了垂直居中，可以设置一个高度 */
}


@keyframes flicker {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) scaleY(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleY(1.1);
    }
    100% {
        opacity: 0.8;
        transform: translateX(-50%) scaleY(1);
    }
}



@keyframes flicker {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) scaleY(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleY(1.1);
    }
    100% {
        opacity: 0.8;
        transform: translateX(-50%) scaleY(1);
    }
}


@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
