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

body {
    font-family: 'Noto Serif SC', serif;
    color: #333;
    background-color: #f8f5f0;
}

/* 封面页样式 */
.cover {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(rgba(255, 255, 255, 0.7), 
                url('../images/couple.jpg')) no-repeat center center;
    background-size: cover;
    color: #5a3e2b;
}

/* 信息页样式 */
.info {
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #f8f5f0;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #5a3e2b;
    flex: 1;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.nav-text {
    font-size: 12px;
}

/* 音乐控制按钮 */
.music-control {
    position: fixed;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.music-control.playing {
    background-color: rgba(139, 90, 43, 0.2);
}

/* 内容样式 */
.content {
    max-width: 90%;
    margin: 0 auto;
}
/* 首页图片样式优化 */
.cover {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8));
    overflow: hidden;
}

/* 背景图片容器 */
.cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.cover-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：保持比例填充 */
    object-position: center;
    filter: brightness(0.7); /* 降低亮度让文字更清晰 */
}

/* 内容区域 */
.cover-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(139, 90, 43, 0.2);
    backdrop-filter: blur(10px);
}

/* 情侣照片样式 */
.couple-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #8b5a2b;
    box-shadow: 0 8px 25px rgba(139, 90, 43, 0.3);
    margin: 20px auto;
    display: block;
}

/* 桌面端网格布局 */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: auto;
    height: 100%;
    /*object-fit: cover;*/
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 移动端横向滚动布局 */
.mobile-gallery {
    display: none;
    width: 100%;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    margin-bottom: 40px;
    scrollbar-width: none; /* Firefox */
}

.mobile-gallery::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.mobile-gallery-inner {
    display: flex;
    width: max-content;
}

.mobile-item {
    scroll-snap-align: start;
    width: 85vw;
    flex: 0 0 auto;
    margin-right: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    aspect-ratio: 4/3;
    height: auto;
}

.mobile-item:last-child {
    margin-right: 0;
}

.mobile-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* 导航指示器 */
.gallery-nav {
    display: none;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 1024px) and (max-height: 1500px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) and (max-height: 1500px) {
    .photo-gallery {
        display: none;
    }
    
    .mobile-gallery {
        display: block;
    }
    
    .gallery-nav {
        display: flex;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .description {
        font-size: 1rem;
    }
}
        

/* 图片动画效果 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animated-image {
    animation: fadeInScale 0.8s ease-out;
}

/* 图片悬停效果 */
.hover-effect {
    transition: all 0.3s ease;
}

.hover-effect:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(139, 90, 43, 0.25);
}

/* 边框样式 */
.image-border {
    border: 3px solid #8b5a2b;
    padding: 4px;
    background: white;
}

.image-border-light {
    border: 2px solid #e8d6b9;
}

.time {
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: bold;
}

h2 {
    font-size: 24px;
    margin-bottom: 40px;
    font-family: 'Ma Shan Zheng', cursive;
}

.couple-names {
    margin-bottom: 30px;
}

.name {
    font-size: 20px;
    margin: 10px 0;
    font-weight: bold;
}

.date, .location {
    font-size: 18px;
    margin: 10px 0;
}

.theme {
    font-size: 28px;
    margin-top: 30px;
    font-family: 'Ma Shan Zheng', cursive;
    color: #8b5a2b;
}

.story-content {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin-top: 20px;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    padding-top: 56px;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    height: 60px; /* 固定高度 */
    padding-bottom: 60px; /* 等于导航栏高度 */
}
/* 导航栏样式增强 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: #d63384 !important;
}

.nav-link {
    color: #555 !important;
    font-weight: 500;
    margin: 0 5px;
    padding: 8px 15px !important;
    border-radius: 20px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: white !important;
    background-color: #d63384;
}

/* 章节通用样式 */
.chapter {
    padding: 30px 20px;
    margin: 0 auto;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.1);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* 章节标题 */
.chapter h2 {
    font-family: 'Ma Shan Zheng', cursive;
    color: #8b5a2b;
    font-size: 24px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.chapter h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, transparent, #d4a373, transparent);
}

/* 章节图片 */
.chapter img {
    width: 40%;
    height: 40%;
    border-radius: 10px;
    margin: 15px 0;
    position: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 2px solid #f8f5f0;
}

.chapter img:hover {
    transform: scale(1.02);
}

/* 章节文字内容 */
.chapter p {
    font-size: 16px;
    line-height: 1.8;
    color: #5a3e2b;
    margin: 15px 0;
    text-align: justify;
    padding: 0 10px;
}

/* 装饰元素 */
.chapter::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23d4a373" d="M50 0 L100 50 L50 100 L0 50 Z"/></svg>') no-repeat;
    opacity: 0.1;
    z-index: -1;
}

.chapter::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%23d4a373" opacity="0.1"/></svg>') no-repeat;
    z-index: -1;
}

/* 移动端菜单样式 */
@media (max-width: 992px) {
    .navbar-collapse {
        padding: 15px 0;
    }
    .nav-link {
        margin: 5px 0;
    }
}

.countdown #countdown-timer div {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 5px;
    min-width: 80px;
}

.countdown #countdown-timer span {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
}

body {
  font-family: 'Noto Serif SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #5a3e2b;
  background-color: #f8f5f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 主容器 */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

/* 标题样式 */
h1, h2, h3 {
  font-family: 'Ma Shan Zheng', cursive;
  color: #8b5a2b;
  text-align: center;
  margin: 20px 0;
  position: relative;
}

h1 {
  font-size: 2.2rem;
  padding-bottom: 10px;
}

h1:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, transparent, #d4a373, transparent);
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

/* 段落文本 */
p {
  margin: 15px 0;
  text-align: justify;
  font-size: 1.1rem;
}

/* 卡片式设计 */
.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(139, 90, 43, 0.1);
  margin-bottom: 30px;
}

/* 为内容区域添加底部间距，避免被导航栏遮挡 */
.main-content {
  padding-bottom: 70px; /* 导航栏高度 + 额外间距 */
  min-height: 100vh;
}