/* ===== 红色记忆详情页面样式 ===== */
.memory-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f5f5f5;
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
}

.memory-detail-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.memory-detail-back-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 4px);
    left: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.memory-detail-back-btn:active {
    background-color: rgba(0, 0, 0, 0.5);
}

.memory-detail-header-placeholder {
    width: 44px;
    height: 44px;
}

.memory-detail-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: #999;
    padding: 0 20px;
}

.memory-detail-error svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.memory-detail-error p {
    font-size: 16px;
    margin-bottom: 20px;
}

.memory-detail-error button {
    padding: 12px 32px;
    background-color: #C41E3A;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* ===== 顶部大图区域 ===== */
.memory-detail-hero {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    margin-top: 0;
}

.memory-detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #e8e8e8;
}

.memory-detail-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.memory-detail-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-top));
    pointer-events: none;
}

.memory-detail-hero-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.memory-detail-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: transform 0.2s ease;
}

.memory-detail-play-badge:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.memory-detail-play-badge svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.memory-detail-link-hint {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
    padding: 4px 10px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.memory-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.memory-detail-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    backdrop-filter: blur(4px);
}

/* ===== 内容区域 ===== */
.memory-detail-content {
    flex: 1;
    padding: 16px;
    padding-bottom: calc(16px + 100px + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.memory-detail-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.memory-detail-section:last-child {
    margin-bottom: 0;
}

.memory-detail-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.memory-detail-section-title svg {
    margin-right: 8px;
    flex-shrink: 0;
}

.memory-detail-section-title span {
    margin-left: 8px;
}

.memory-detail-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.memory-detail-detail-content {
    font-size: 14px;
    color: #666;
    line-height: 1.9;
    text-align: justify;
}

.memory-detail-detail-content p {
    margin: 0 0 14px 0;
    text-indent: 2em;
}

.memory-detail-detail-content p:last-child {
    margin-bottom: 0;
}

/* ===== 图片网格 ===== */
.memory-detail-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.memory-detail-grid-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* ===== 标签区域 ===== */
.memory-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memory-detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #fff8f8;
    border: 1px solid #ffe4e4;
    border-radius: 16px;
    font-size: 12px;
    color: #C41E3A;
}

/* ===== 响应式适配 ===== */
@media (max-width: 375px) {
    .memory-detail-hero {
        height: 250px;
    }

    .memory-detail-title {
        font-size: 22px;
    }

    .memory-detail-section {
        padding: 14px;
    }

    .memory-detail-desc {
        font-size: 13px;
    }

    .memory-detail-grid-img {
        height: 90px;
    }
}

@media (max-width: 320px) {
    .memory-detail-hero {
        height: 220px;
    }

    .memory-detail-title {
        font-size: 20px;
    }

    .memory-detail-content {
        padding: 12px;
    }
}
