/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    background-image: linear-gradient(to bottom, #fff1f2, #f8f9fa);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* 添加页面过渡动画 */
.container {
    animation: fadeIn 0.8s ease-in-out;
}

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

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: bold;
    color: #e83e8c !important;
    position: relative;
    padding-left: 28px;
}

.navbar-brand::before {
    content: '❤';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #e83e8c;
    font-size: 18px;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: translateY(-50%) scale(1); }
    15% { transform: translateY(-50%) scale(1.2); }
    30% { transform: translateY(-50%) scale(1); }
    45% { transform: translateY(-50%) scale(1.2); }
    60% { transform: translateY(-50%) scale(1); }
    100% { transform: translateY(-50%) scale(1); }
}

.nav-link {
    color: #555 !important;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #e83e8c;
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #e83e8c !important;
}

.nav-link:hover::after {
    width: 80%;
}

/* 首页样式 */
.love-header {
    background-color: rgba(255, 192, 203, 0.1);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(232, 62, 140, 0.2);
    box-shadow: 0 10px 30px rgba(232, 62, 140, 0.1);
    position: relative;
    overflow: hidden;
}

.love-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(232, 62, 140, 0.05);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
}

.love-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background-color: rgba(232, 62, 140, 0.05);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 20px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.love-counter {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(232, 62, 140, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.love-counter:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(232, 62, 140, 0.2);
}

#love-days {
    font-size: 3.5rem;
    font-weight: bold;
    color: #e83e8c;
    margin: 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 卡片样式 */
.card {
    transition: all 0.4s ease;
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 62, 140, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: -1;
    transition: opacity 0.4s;
    opacity: 0;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(232, 62, 140, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.card-body {
    padding: 1.8rem 1.5rem;
}

.card-title {
    color: #e83e8c;
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #e83e8c;
    transition: width 0.3s;
}

.card:hover .card-title::after {
    width: 100%;
}

.btn-primary {
    background-color: #e83e8c;
    border-color: #e83e8c;
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
    z-index: -1;
}

.btn-primary:hover {
    background-color: #d33076;
    border-color: #d33076;
    box-shadow: 0 5px 15px rgba(232, 62, 140, 0.3);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

/* 照片墙样式 */
.photo-gallery {
    margin: 2rem 0;
}

.photo-item {
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
    border-radius: 10px;
}

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

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.photo-item:hover .photo-caption {
    opacity: 1;
}

/* 纪念日样式 */
.memory-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.memory-date {
    color: #e83e8c;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.memory-content {
    margin-top: 1rem;
}

/* 留言板样式 */
.message-form {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.message-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.message-name {
    font-weight: bold;
    color: #e83e8c;
}

.message-date {
    color: #777;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .love-header {
        padding: 1.5rem;
    }
    
    #love-days {
        font-size: 2.5rem;
    }
    
    .photo-item img {
        height: 150px;
    }
    
    .memory-item {
        padding: 1rem;
    }
    
    .message-form, .message-item {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .love-header {
        padding: 1rem;
    }
    
    #love-days {
        font-size: 2rem;
    }
    
    .photo-item img {
        height: 120px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .memory-date {
        font-size: 0.9rem;
    }
    
    .memory-item h3 {
        font-size: 1.3rem;
    }
}

/* 额外的小屏幕调整 */
@media (max-width: 320px) {
    .love-header {
        padding: 0.8rem;
    }
    
    #love-days {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .photo-item img {
        height: 100px;
    }
}

/* 页脚样式 */
.footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(232, 62, 140, 0.1);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(232, 62, 140, 0.5), transparent);
}

.footer .text-muted {
    position: relative;
    display: inline-block;
    padding: 0 10px;
}

.footer .text-muted::before,
.footer .text-muted::after {
    content: '❤';
    color: #e83e8c;
    font-size: 12px;
    margin: 0 8px;
    animation: pulse 2s infinite;
}