/* ===== 每日感恩记录展示区样式 ===== */
.daily-gratitude-showcase {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.daily-gratitude-showcase h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-align: center;
}

.daily-gratitude-showcase h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.gratitude-entries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    /* 新增：用于承载未登录提示覆盖层 */
    position: relative;
}

/* 新增：未登录状态的模糊效果与提示覆盖层 */
.gratitude-entries.blurred > * {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.gratitude-entries.blurred::before {
    content: '登录后可查看最近记录';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.6rem 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1;
    white-space: nowrap;
}

.gratitude-entry-placeholder {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.gratitude-entry-placeholder:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.entry-date-placeholder {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.entry-mood {
    display: inline-block;
    font-size: 0.8rem;
    background-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.entry-content-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.entry-content {
    color: var(--text-light);
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}

.archive-link {
    text-align: center;
    margin-top: 1rem;
}

.archive-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.archive-link a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.archive-link a i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

/* 时光轴条目样式 */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%; /* 中线居中 */
    transform: translateX(-1px);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
}

.timeline-entry {
    position: relative;
    margin-bottom: 2rem;
    width: 50%;
}

/* 左侧条目 - 使用更强的选择器优先级 */
.timeline .timeline-entry.left {
    padding: 0 1rem 0 0 !important; /* 进一步减少右内边距，使用!important确保生效 */
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

/* 右侧条目 - 使用更强的选择器优先级 */
.timeline .timeline-entry.right {
    padding: 0 0 0 1rem !important; /* 进一步减少左内边距，使用!important确保生效 */
    margin-left: auto;
    margin-right: 0;
    text-align: left; /* 内容仍靠左排版 */
}

/* 日期与心情徽章的定位，随左右切换 */
.timeline-entry .entry-date,
.timeline-entry .entry-mood {
    position: absolute;
}

.timeline-entry.left .entry-date {
    right: -70px; /* 靠近中线左侧 */
    left: auto;
    top: 0;
    width: 60px;
    text-align: center;
}

.timeline-entry.right .entry-date {
    left: -70px; /* 靠近中线右侧 */
    right: auto;
    top: 0;
    width: 60px;
    text-align: center;
}

.timeline-entry.left .entry-mood {
    right: -20px; /* 贴近中线 */
    left: auto;
    top: 0;
}

.timeline-entry.right .entry-mood {
    left: -20px; /* 贴近中线 */
    right: auto;
    top: 0;
}

.timeline-entry .entry-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 连接到中线的小圆点 */
.timeline-entry::after {
    content: '';
    position: absolute;
    top: 10px; /* 与日期/徽章对齐 */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.timeline-entry.left::after {
    right: -6px; /* 接近中线 */
}

.timeline-entry.right::after {
    left: -6px; /* 接近中线 */
}

/* 移动端：改为单列并将中线移回左侧 */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
        transform: none;
    }
    .timeline-entry {
        width: 100%;
        padding-left: 50px;
        margin: 0 0 1.5rem 0;
    }
    .timeline-entry.left,
    .timeline-entry.right {
        padding: 0 0 0 50px; /* 统一左内边距 */
        margin: 0 0 1.5rem 0;
    }
    .timeline-entry .entry-date {
        left: 0;
        right: auto;
        width: 40px;
        text-align: right;
    }
    .timeline-entry .entry-mood {
        left: 50px;
        right: auto;
        top: 0;
    }
    .timeline-entry::after {
        left: 44px; /* 接近左侧中线 */
        right: auto;
    }
}