:root {
    --pearl-white: #FAFAFA;
    --dai-qing: #2F4F4F;
    --ou-he: #E0C6D1;
}

body {
    margin: 0;
    padding: 0;
    font-family: '阿里巴巴普惠体', "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(to bottom, #FFEEF4, #E6F7FF);
    color: var(--dai-qing);
    font-size: 18px;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/伊利斯.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.07;
    z-index: -1;
}


#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
}

#garden {
    width: 100%;
    height: 100%;
}

.container {
    max-width: 60%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-family: '方正宋刻本秀楷', serif;
    font-size: 36px;
    font-weight: normal;
    margin: 0;
}

.moon-gate-nav {
    width: 150px;
    height: 150px;
    border: 10px solid var(--ou-he);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    opacity: 0.5;
}

main {
    padding: 40px 0;
    text-align: center;
}

#myContent {
    max-width: 600px; /* 设定一个较窄的宽度以强调垂直感 */
    margin: 60px auto 0; /* 上下边距及水平居中 */
    text-align: center; /* 整体居中对齐 */
}

#contentToWrite p {
    margin: 0 0 1.5em 0;
}

.addressee {
    font-size: 1.1em;
    margin-bottom: 2em;
    text-align: left;
}

.body-text {
    line-height: 2.2; /* 增加行距，营造呼吸感 */
}

.signature-group {
    line-height: 2;
    margin-top: 3em;
    text-align: right;
}

.body-text {
    text-align: justify;
    text-indent: 0em; /* 首行缩进两个字符 */
}

.typed-char {
    transition: opacity 0.3s ease-in-out;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 400px; /* 根据图片调整 */
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease-in-out, opacity 0.8s, filter 0.8s;
    transform-style: preserve-3d;
}

.carousel-image.center {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
    z-index: 10;
}

.carousel-image.left {
    transform: translateX(-50%) scale(0.8);
    opacity: 0.6;
    filter: blur(5px); /* 高斯模糊 */
    z-index: 5;
}

.carousel-image.right {
    transform: translateX(50%) scale(0.8);
    opacity: 0.6;
    filter: blur(5px); /* 高斯模糊 */
    z-index: 5;
}

.carousel-image.hidden {
    transform: scale(0.5);
    opacity: 0;
    z-index: 1;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    cursor: pointer;
    width: 15%;
    height: 100%;
    z-index: 2;
}

.prev-button {
    left: 0;
}

.next-button {
    right: 0;
}

.time-display {
    background-image: url('../images/xuanzhi.png'); /* 宣纸纹理 */
    background-color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.time-display p {
    font-family: '思源宋体 Medium', serif;
    font-size: 24px;
    margin: 0 0 10px 0;
}

#time-counter {
    font-family: '水墨风格字体', cursive; /* 需要引入水墨字体 */
    font-size: 32px;
    letter-spacing: 5px;
}

.divider {
    height: 10px;
    background:
        radial-gradient(circle at 50% 0, transparent 8px, var(--ou-he) 9px, var(--ou-he) 10px, transparent 11px),
        radial-gradient(circle at 50% 100%, transparent 8px, var(--ou-he) 9px, var(--ou-he) 10px, transparent 11px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-repeat: repeat-x;
    margin: 40px auto;
    width: 80%;
    opacity: 0.5;
}

.petal {
    position: absolute;
    top: -20px;
    width: 15px;
    height: 15px;
    background-color: var(--ou-he);
    border-radius: 0 50% 50% 50%;
    transform: rotate(-45deg);
    z-index: 100;
    pointer-events: none;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

@keyframes sway {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(40px); }
}

footer {
    padding: 40px 0;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}
