/* assets/css/love-diary.css */
:root {
    --primary-color: #ff4e79;
    --secondary-color: #ff8e9e;
    --bg-color: rgba(255, 245, 247, 0.95);
    --text-color: #5a3d4e;
    --border-color: rgba(255, 214, 224, 0.8);
    --card-bg: rgba(255, 255, 255, 0.92);
    --heart-pink: #ff2d62;
    --meta-bg: rgba(255, 240, 243, 0.85);
    --shadow-sm: 0 2px 8px rgba(255, 78, 121, 0.08);
    --shadow-md: 0 4px 12px rgba(255, 78, 121, 0.12);
    --gold-color: #ffd700;
    --silver-color: #c0c0c0;
    --bronze-color: #cd7f32;
}

/* 主标题区域优化 */
.central .title {
    margin-bottom: 1.8rem;
    position: relative;
}

.central .title h1 {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(255, 78, 121, 0.1);
    position: relative;
    display: inline-block;
}

.central .title h1:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

.central .title .subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    letter-spacing: 1px;
    margin-top: 0.2rem;
    opacity: 0.9;
    font-weight: 500;
    animation: subtitleFadeIn 1.5s ease-out;
}

@keyframes subtitleFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 0.9; transform: translateY(0); }
}

/* 事件列表优化 */
.lovelist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lovelist li.cike {
    padding: 14px 18px;
    margin: 8px 0;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
    overflow: hidden;
}

.lovelist li.cike:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
}

.lovelist li.cike:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.lovelist li.cike:hover:before {
    width: 5px;
}

.lovelist li.cike:active {
    transform: translateX(8px) scale(0.98);
}

.lovelist li.cike i.iconfont {
    margin-right: 12px;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.lovelist li.cike span {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.lovelist li.cike svg.icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    margin-left: 8px;
}

.lovelist li.cike:hover svg.icon {
    transform: scale(1.2);
    color: var(--primary-color);
}

/* 图片查看器容器 */
.image-viewer {
    padding: 0;
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    margin: -5px 0 20px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: none;
    opacity: 0;
    height: 0;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.image-viewer.active {
    opacity: 1;
    height: auto;
    padding-bottom: 5px;
}

/* 图片滑动区域 */
.image-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 0;
    scrollbar-width: none;
}

.image-slider::-webkit-scrollbar {
    display: none;
}

/* 单张幻灯片样式 */
.slide {
    scroll-snap-align: start;
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}

/* 主图片样式 */
.main-image {
    width: 100%;
    max-height: 70vh;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    display: block;
    background-color: #fafafa;
}

/* 图片元信息样式 - 极致优化版 */
.image-meta {
    margin: 0;
    max-width: 100%;
    background: linear-gradient(to bottom, var(--meta-bg), var(--card-bg));
    padding: 18px 20px 18px 25px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid rgba(255, 214, 224, 0.5);
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.image-meta:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

/* 日期时间区域 - 极致优化 */
.image-date {
    color: var(--primary-color);
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 24px;
    transition: all 0.3s ease;
}

.image-date:before {
    content: "❤️";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    opacity: 0.8;
    animation: heartbeat 1.5s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* 日期时间特殊样式 - 根据时间远近显示不同颜色 */
.image-date.recent {
    color: var(--heart-pink);
}

.image-date.recent:before {
    content: "🔥";
    animation: flame 1s ease-in-out infinite alternate;
}

.image-date.today {
    color: var(--gold-color);
}

.image-date.today:before {
    content: "✨";
    animation: sparkle 1.5s ease-in-out infinite;
}

.image-date.week {
    color: var(--silver-color);
}

.image-date.month {
    color: var(--bronze-color);
}

/* 描述区域 - 极致优化 */
.image-desc {
    color: var(--text-color);
    font-size: 1em;
    line-height: 1.6;
    padding: 10px 0 0 24px;
    position: relative;
    border-top: none;
    margin-top: 0;
    transition: all 0.3s ease;
}

.image-desc:before {
    content: "✏️";
    position: absolute;
    left: 0;
    top: 10px;
    opacity: 0.6;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

/* 悬停时描述区域效果 */
.slide:hover .image-desc {
    color: var(--primary-color);
    transform: translateX(3px);
}

.slide:hover .image-desc:before {
    opacity: 1;
    transform: scale(1.1);
}

/* 悬停时日期效果 */
.slide:hover .image-date {
    transform: translateX(3px);
    text-shadow: 0 1px 2px rgba(255, 78, 121, 0.2);
}

.slide:hover .image-date:before {
    transform: translateY(-50%) scale(1.1);
}

/* 图片计数器样式 */
.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    z-index: 10;
    font-size: 0.85em;
    color: var(--text-color);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

.image-viewer.active .image-counter {
    transform: translateY(0);
    opacity: 1;
}

.current-index {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 1.2em;
    text-align: center;
    transition: all 0.3s ease;
}

.total-count {
    color: var(--text-color);
    opacity: 0.8;
}

.counter-separator {
    margin: 0 5px;
    color: var(--secondary-color);
}

/* 新增动画效果 */
@keyframes heartbeat {
    0% { transform: translateY(-50%) scale(1); }
    14% { transform: translateY(-50%) scale(1.1); }
    28% { transform: translateY(-50%) scale(1); }
    42% { transform: translateY(-50%) scale(1.2); }
    70% { transform: translateY(-50%) scale(1); }
}

@keyframes flame {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateY(-50%) scale(1.2); opacity: 1; }
}

@keyframes sparkle {
    0% { transform: translateY(-50%) rotate(0deg) scale(1); opacity: 0.8; }
    25% { transform: translateY(-50%) rotate(5deg) scale(1.1); opacity: 1; }
    50% { transform: translateY(-50%) rotate(0deg) scale(1); opacity: 0.9; }
    75% { transform: translateY(-50%) rotate(-5deg) scale(1.1); opacity: 1; }
    100% { transform: translateY(-50%) rotate(0deg) scale(1); opacity: 0.8; }
}

/* 响应式调整 */
@media (min-width: 768px) {
    .central .title h1 {
        font-size: 2.5rem;
    }
    
    .central .title .subtitle {
        font-size: 1.1rem;
        margin-top: 0.3rem;
    }
    
    .lovelist li.cike {
        padding: 16px 20px;
        margin: 10px 0;
    }
    
    .slide {
        flex: 0 0 50%;
        min-width: 50%;
    }
    
    .image-meta {
        padding: 20px 25px 20px 30px;
    }
    
    .image-date {
        font-size: 1em;
        padding-left: 28px;
    }
    
    .image-desc {
        font-size: 1.05em;
        padding-left: 28px;
    }
}

@media (max-width: 480px) {
    .central .title h1 {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .central .title .subtitle {
        font-size: 0.9rem;
        margin-top: 0.1rem;
    }
    
    .lovelist li.cike {
        padding: 12px 15px;
        margin: 6px 0;
    }
    
    .image-meta {
        padding: 15px 18px 15px 22px;
    }
    
    .image-date {
        font-size: 0.9em;
        padding-left: 22px;
    }
    
    .image-desc {
        font-size: 0.95em;
        padding-left: 22px;
    }
    
    .image-counter {
        bottom: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 0.8em;
    }
}