/* 回向祈福网站 - 小米风格样式表 */
/* 设计特点：纯白背景、大圆角、柔和阴影、橙色主题色、扁平化 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --mi-orange: #ff6700;
    --mi-orange-hover: #f25b00;
    --mi-black: #333;
    --mi-gray: #666;
    --mi-light-gray: #999;
    --mi-border: #e0e0e0;
    --mi-bg: #f5f5f5;
    --mi-white: #fff;
    --mi-radius: 16px;
    --mi-radius-sm: 8px;
    --mi-shadow: 0 2px 10px rgba(0,0,0,0.06);
    --mi-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--mi-bg);
    color: var(--mi-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Banner - 小米风格渐变 */
.banner {
    width: 100%;
    position: relative;     /* 为 Canvas 和文字覆盖层提供定位基准 */
    background: linear-gradient(135deg, #ff6700 0%, #ff8a00 50%, #ffa726 100%);
    overflow: hidden;
    min-height: 220px; /* 纯色模式无图片时保证高度 */
}

.banner img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.banner-default {
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.banner-default h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.banner-default p {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Banner Canvas 粒子动效 */
#bannerCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Banner 文字覆盖层 */
.banner-text-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    padding: 20px 32px;
    word-break: break-word;
    line-height: 1.4;
    pointer-events: none;
    white-space: pre-wrap;
    z-index: 2;   /* 在 Canvas 上方 */
    text-align: center;
}

/* 导航栏 - 纯白扁平 */
.nav-bar {
    background: var(--mi-white);
    box-shadow: var(--mi-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--mi-black);
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

/* Logo图片 */
.nav-logo-img {
    height: 38px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 8px;
}

/* 导航链接：支持角标定位 */
.nav-links a {
    position: relative;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--mi-gray);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    font-weight: 400;
}

/* 未读数字角标 */
.nav-badge {
    display: none;
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e53935;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
    transform: translate(40%, -40%);
}
.nav-badge.show {
    display: block;
}

.nav-links a:hover {
    color: var(--mi-orange);
    background: rgba(255,103,0,0.08);
}

.nav-links a.active {
    color: var(--mi-orange);
    background: rgba(255,103,0,0.12);
    font-weight: 500;
}

.btn-publish {
    background: var(--mi-orange);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(255,103,0,0.3);
}

.btn-publish:hover {
    background: var(--mi-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,103,0,0.4);
}

/* 主内容 */
.main-content {
    padding: 24px 20px;
    min-height: 500px;
}

/* 统计大盘条 */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--mi-white);
    border-bottom: 1px solid var(--mi-border);
    padding: 14px 24px;
    flex-wrap: wrap;
}

.stats-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stats-icon {
    font-size: 1rem;
    margin-right: 2px;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mi-orange);
    line-height: 1;
}

.stats-label {
    font-size: 0.82rem;
    color: var(--mi-gray);
}

.stats-text {
    font-size: 0.88rem;
    color: var(--mi-gray);
    font-weight: 500;
}

.stats-divider {
    width: 1px;
    height: 28px;
    background: var(--mi-border);
    flex-shrink: 0;
}

/* 滚动公告栏 */
.notice-bar {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, #fffaf5 0%, #fff8f0 100%);
    border-bottom: 1px solid #fddcbb;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(255,103,0,0.05);
}

.notice-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    color: var(--mi-orange);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid #fddcbb;
    background: rgba(255, 103, 0, 0.07);
    letter-spacing: 0.08em;
}

/* 绝对定位方案：彻底脱离 flex 内联布局干扰 */
.notice-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

/* translateX(100vw) 保证从视口右边界外进入，translateX(-100%) 移出左边界 */
.notice-track {
    position: absolute;
    top: 50%;
    left: 0;
    white-space: nowrap;
    font-size: 0.84rem;
    color: #5a3a1a;
    letter-spacing: 0.02em;
    animation: noticeScroll 18s linear infinite;
    will-change: transform;
}

.notice-track:hover {
    animation-play-state: paused;
}

@keyframes noticeScroll {
    0%   { transform: translateY(-50%) translateX(100vw); }
    100% { transform: translateY(-50%) translateX(-100%); }
}

@media (max-width: 600px) {
    .notice-icon span { display: none; }
    .notice-icon { padding: 0 12px; }
    .notice-track { animation-duration: 13s; }
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 视图切换工具栏 */
.view-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 0 8px;
}

.view-label {
    color: var(--mi-light-gray);
    font-size: 0.85rem;
}

.view-toggle {
    display: flex;
    background: var(--mi-white);
    border: 1px solid var(--mi-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--mi-shadow);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: none;
    background: transparent;
    color: var(--mi-light-gray);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    font-weight: 500;
}

.view-btn.active {
    background: var(--mi-orange);
    color: white;
}

.view-btn:not(.active):hover {
    background: #f5f5f5;
    color: var(--mi-gray);
}

.content-card {
    background: var(--mi-white);
    border-radius: var(--mi-radius);
    padding: 24px;
    box-shadow: var(--mi-shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mi-shadow-hover);
    border-color: rgba(255,103,0,0.1);
}

.content-card.top {
    border: 1px solid rgba(255,103,0,0.2);
    background: linear-gradient(135deg, #fff8f5 0%, var(--mi-white) 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-type {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--mi-black);
    font-size: 1rem;
}

.card-type-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 103, 0, 0.10);
    border-radius: 50%;
    color: #e65100;
    flex-shrink: 0;
}

.card-top-badge {
    background: var(--mi-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 内部人员发布：莲花图标 */
.card-internal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6700, #ff8a00);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    cursor: default;
    flex-shrink: 0;
    letter-spacing: 0;
    box-shadow: 0 1px 4px rgba(255,103,0,0.35);
}

.card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.card-body {
    margin-bottom: 16px;
}

.card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
}

.info-label {
    color: var(--mi-light-gray);
    font-size: 0.85rem;
    min-width: 80px;
    font-weight: 400;
}

.info-value {
    color: var(--mi-black);
    font-weight: 500;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.btn-copy,
.btn-huixiang {
    padding: 10px 20px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-copy {
    background: #f5f5f5;
    color: var(--mi-gray);
}

.btn-copy:hover {
    background: var(--mi-orange);
    color: white;
}

.btn-huixiang {
    background: #fff3e0;
    color: var(--mi-orange);
}

.btn-huixiang:hover {
    background: var(--mi-orange);
    color: white;
}

.btn-huixiang.done {
    background: #e8f5e9;
    color: #4caf50;
}

.btn-huixiang.done:hover {
    background: #4caf50;
    color: white;
}

.huixiang-count {
    font-size: 0.8rem;
    opacity: 0.8;
}

.card-time {
    font-size: 0.8rem;
    color: var(--mi-light-gray);
}

/* ──── 倒计时提醒 ──────────────────────── */
.item-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 18px;
    font-size: 0.78rem;
    color: #aaa;
    border-top: 1px dashed #f0f0f0;
    background: transparent;
    transition: color 0.3s;
}
.item-countdown svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.item-countdown.urgent {
    color: #e65100;
    border-top-color: #ffe0cc;
    background: #fffaf5;
}
.item-countdown.urgent svg { opacity: 1; }
.item-countdown.critical {
    color: #c62828;
    border-top-color: #ffd0d0;
    background: #fff5f5;
    animation: cdPulse 1.8s ease-in-out infinite;
}
.item-countdown.critical svg { opacity: 1; }
@keyframes cdPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}
/* 列表模式下的倒计时（行内紧凑样式）*/
.item-countdown-list {
    border-top: none;
    background: none;
    padding: 0;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
    animation: none !important;
}
.item-countdown-list.critical { animation: none !important; }

/* ============ 列表模式 ============ */
.content-list.list-mode {
    gap: 0;
    background: var(--mi-white);
    border-radius: var(--mi-radius);
    box-shadow: var(--mi-shadow);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #fafafa;
}

.list-item.top {
    background: linear-gradient(90deg, #fff8f5, #fff);
    border-left: 3px solid var(--mi-orange);
}

.list-item-tag {
    flex-shrink: 0;
    background: rgba(255,103,0,0.1);
    color: var(--mi-orange);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.list-item-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--mi-black);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-badges {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.list-item-date {
    font-size: 0.78rem;
    color: var(--mi-light-gray);
    flex-shrink: 0;
    white-space: nowrap;
}

.list-item-copy {
    flex-shrink: 0;
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    background: #f5f5f5;
    color: var(--mi-gray);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.list-item-copy:hover {
    background: var(--mi-orange);
    color: white;
}

/* 列表模式 - 回向按鈕 */
.list-item-huixiang {
    flex-shrink: 0;
    padding: 5px 10px;
    border: none;
    border-radius: 14px;
    background: #fff3e0;
    color: var(--mi-orange);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}
.list-item-huixiang:hover {
    background: var(--mi-orange);
    color: white;
}
.list-item-huixiang.done {
    background: #e8f5e9;
    color: #4caf50;
}
.list-item-huixiang.done:hover {
    background: #4caf50;
    color: white;
}
.btn-delete-own {
    padding: 10px 18px;
    border: 1px solid #ffcdd2;
    border-radius: 24px;
    background: #fff5f5;
    color: #e53935;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-delete-own:hover {
    background: #e53935;
    color: white;
    border-color: #e53935;
}
.btn-delete-own:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 发布者删除按鈕（列表模式） */
.list-item-delete {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1px solid #ffcdd2;
    border-radius: 14px;
    background: #fff5f5;
    color: #e53935;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.list-item-delete:hover {
    background: #e53935;
    color: white;
    border-color: #e53935;
}
.list-item-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   帮忙回向 念诵内容弹窗
============================================================ */
.huixiang-modal-tip {
    color: #888;
    font-size: 0.88rem;
    margin-bottom: 14px;
    line-height: 1.6;
}

/* 一行念诵 */
.recitation-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.recitation-name {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.recitation-name:focus {
    border-color: var(--mi-orange);
}

.recitation-count {
    width: 84px;
    flex-shrink: 0;
    padding: 9px 10px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.92rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.recitation-count::-webkit-inner-spin-button,
.recitation-count::-webkit-outer-spin-button { opacity: 1; }
.recitation-count:focus {
    border-color: var(--mi-orange);
}

.btn-remove-row {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: #999;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
.btn-remove-row:hover {
    background: #fee;
    color: #e53935;
}

/* 添加一行按钮 */
.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    padding: 7px 16px;
    background: none;
    border: 1.5px dashed var(--mi-orange);
    border-radius: 8px;
    color: var(--mi-orange);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-add-row:hover {
    background: rgba(255,103,0,0.06);
}

/* 操作按钮行 */
.huixiang-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-cancel-huixiang {
    flex: 1;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel-huixiang:hover {
    background: #f5f5f5;
}

.btn-submit-huixiang {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--mi-orange);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.btn-submit-huixiang:hover {
    background: var(--mi-orange-hover);
}
.btn-submit-huixiang:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 分页导航 */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 24px 0 16px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--mi-border);
    background: var(--mi-white);
    color: #555;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.18s ease;
    min-width: 40px;
    line-height: 1;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--mi-orange);
    color: var(--mi-orange);
    background: #fff8f4;
}

.page-btn.active {
    background: var(--mi-orange);
    color: #fff;
    border-color: var(--mi-orange);
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(255,103,0,0.3);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #bbb;
    font-size: 0.9rem;
    padding: 0 2px;
    line-height: 36px;
}

.page-info {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

/* 弹窗 - 小米风格 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--mi-white);
    border-radius: var(--mi-radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    color: var(--mi-black);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--mi-light-gray);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    color: var(--mi-black);
    background: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

/* 表单 - 小米风格 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--mi-black);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--mi-border);
    border-radius: var(--mi-radius-sm);
    font-size: 1rem;
    transition: all 0.25s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--mi-orange);
    background: var(--mi-white);
    box-shadow: 0 0 0 3px rgba(255,103,0,0.1);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--mi-orange);
    color: white;
    border: none;
    border-radius: var(--mi-radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--mi-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,103,0,0.3);
}

/* 页脚 */
.footer {
    background: #181818;
    color: #ccc;
    margin-top: 40px;
    border-top: 3px solid var(--mi-orange);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* 页脚内部所有 a 标签重置，防止移动端浏览器覆盖 */
.footer a {
    text-decoration: none !important;
    color: #999;
    -webkit-text-decoration: none !important;
}

.footer-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* 页脚主内容区 */
.footer-main {
    padding: 34px 0 26px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.footer-logo {
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer-site-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
}

.footer-desc {
    font-size: 0.84rem;
    color: #777;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

.footer-custom {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.85;
    max-width: 620px;
    margin: 12px auto 0;
    white-space: pre-wrap;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 12px;
}

/* 协议链接行 */
.footer-agree-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 16px 0 12px;
    font-size: 0.84rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    gap: 0;
}

.footer-agree-link {
    color: #aaa !important;
    text-decoration: none !important;
    padding: 5px 12px;
    transition: color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.02em;
    -webkit-text-decoration: none !important;
    font-size: 0.84rem;
}

.footer-agree-link:hover,
.footer-agree-link:active {
    color: var(--mi-orange) !important;
}

.footer-agree-sep {
    color: #444;
    user-select: none;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* 页脚底部信息条 */
.footer-bottom {
    padding: 0 0 22px;
    text-align: center;
}

/* 协议弹窗遮罩层 */
.agree-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
}

.agree-modal-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.25s ease;
    overflow: hidden;
}

.agree-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.agree-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    margin: 0;
}

.agree-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 1.1rem;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.agree-modal-close:hover {
    background: #ffe0cc;
    color: var(--mi-orange);
}

.agree-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}


@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 600px) {
    .agree-modal-box { border-radius: 12px; max-height: 90vh; }
    .agree-modal-header { padding: 16px 18px 12px; }
    .agree-modal-body  { padding: 16px 18px 20px; }
}

.footer-bottom-items {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-size: 0.78rem;
    line-height: 1.9;
}

.footer-copyright,
.footer-contact {
    color: #5a5a5a;
}

.footer-sep {
    color: #333;
    user-select: none;
}

.footer-icp {
    color: #5a5a5a;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-icp:hover {
    color: var(--mi-orange);
}

/* Toast提示 - 小米风格 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 14px 28px;
    border-radius: 28px;
    z-index: 2000;
    animation: fadeInUp 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============ 响应式设计 ============ */

/* 平板 (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .banner-default {
        height: 180px;
    }

    .banner-default h1 {
        font-size: 2.2rem;
    }

    .main-content {
        padding: 20px 16px;
    }

    .card-info {
        grid-template-columns: 1fr 1fr;
    }
}

/* 手机 (max-width: 640px) */
@media (max-width: 640px) {

    /* --- 导航栏 --- */
    .nav-bar .container {
        height: auto;
        padding: 0 16px;
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-logo {
        font-size: 1.05rem;
        padding: 12px 0;
    }

    .btn-publish {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    /* 分类 tab 横向滚动，不折行 */
    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        gap: 4px;
        padding: 6px 0 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex-shrink: 0;
        padding: 7px 13px;
        font-size: 0.82rem;
    }

    /* --- Banner --- */
    .banner-default {
        height: 148px;
    }
    .banner { min-height: 148px; }

    .banner-default h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .banner-default p {
        font-size: 0.9rem;
    }

    .banner img {
        height: 148px;
    }

    /* --- 主内容 --- */
    .main-content {
        padding: 14px 16px;
    }

    /* --- 工具栏 --- */
    .view-toolbar {
        padding: 6px 0 4px;
    }

    .view-label {
        font-size: 0.78rem;
    }

    .view-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    /* --- 卡片 --- */
    .content-card {
        padding: 16px;
        border-radius: 12px;
    }

    .card-type {
        font-size: 0.9rem;
    }

    .card-type-icon {
        width: 28px;
        height: 28px;
    }

    .card-info {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .info-item {
        padding: 5px 0;
    }

    .card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .btn-copy,
    .btn-huixiang {
        padding: 9px 16px;
        font-size: 0.82rem;
        min-height: 40px;
    }

    /* --- 列表模式手机适配 --- */
    .list-item {
        padding: 11px 14px;
        gap: 8px;
    }

    .list-item-tag {
        font-size: 0.68rem;
        padding: 2px 7px;
    }

    .list-item-title {
        font-size: 0.88rem;
    }

    .list-item-date {
        display: none; /* 手机隐藏日期，节省空间 */
    }

    .list-item-badges {
        display: none;
    }

    /* 手机上隐藏复制、分享、删除按钮，点击行可在详情弹窗操作 */
    .list-item-copy,
    .list-item-share,
    .list-item-delete {
        display: none !important;
    }

    /* --- 弹窗：底部全宽滑出 --- */
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    @keyframes slideUp {
        from { opacity: 1; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .modal-header {
        padding: 18px 20px 14px;
    }

    .modal-body {
        padding: 14px 20px 36px;
    }

    .form-group input,
    .form-group select {
        padding: 13px 14px;
        font-size: 16px; /* 防止 iOS 自动放大 */
    }

    /* --- Toast --- */
    .toast {
        bottom: 72px;
        font-size: 0.88rem;
        padding: 11px 22px;
        max-width: 86%;
        text-align: center;
    }

    /* --- 加载更多 --- */
    .load-more {
        padding: 24px 20px;
    }

    .load-more button {
        padding: 12px 36px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* --- 空状态 --- */
    .empty-state {
        padding: 56px 20px;
    }

    .empty-state-icon {
        opacity: 0.4;
    }

    /* --- 页脚 --- */
    .footer {
        margin-top: 20px;
    }
    .footer-main {
        padding: 24px 0 18px;
    }
    .footer-site-name {
        font-size: 1.05rem;
    }
    .footer-agree-bar {
        padding: 14px 0 10px;
    }
    .footer-agree-link {
        padding: 4px 9px;
        font-size: 0.8rem !important;
    }
    .footer-bottom {
        padding: 0 0 18px;
    }
}

/* 小屏手机 (max-width: 400px) */
@media (max-width: 400px) {
    .banner-default {
        height: 128px;
    }
    .banner { min-height: 128px; }

    .banner-default h1 {
        font-size: 1.5rem;
    }

    .nav-logo {
        font-size: 0.95rem;
    }

    .btn-publish {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .content-card {
        padding: 13px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--mi-light-gray);
}

.empty-state-icon {
    margin-bottom: 24px;
    opacity: 0.45;
    color: var(--mi-gray);
    display: flex;
    justify-content: center;
}

.empty-state p {
    font-size: 1rem;
    color: var(--mi-gray);
}

/* ===============================================
   移动端 APP 体验增强
   =============================================== */

/* ── 1. 去除点击高亮，修复 tap 300ms 延迟 ── */
* { -webkit-tap-highlight-color: transparent; }
a, button,
input[type="button"], input[type="submit"],
[role="button"] { touch-action: manipulation; }

/* ── 2. 按钮触控按压反馈 ── */
.btn-publish:active {
    transform: scale(0.93) translateY(0) !important;
    opacity: 0.8;
    transition: transform 0.08s ease, opacity 0.08s ease !important;
}
.btn-submit:active,
.btn-submit-huixiang:active,
.btn-cancel-huixiang:active {
    transform: scale(0.97);
    opacity: 0.8;
    transition: transform 0.08s ease, opacity 0.08s ease !important;
}
.btn-copy:active,
.btn-huixiang:active,
.btn-delete-own:active,
.list-item-copy:active,
.list-item-huixiang:active,
.list-item-delete:active,
.btn-add-row:active,
.close-btn:active,
.page-btn:active:not(:disabled) {
    transform: scale(0.9);
    opacity: 0.7;
    transition: transform 0.08s ease, opacity 0.08s ease !important;
}
.view-btn:active {
    transform: scale(0.87);
    transition: transform 0.08s ease !important;
}

/* ── 3. 卡片触控反馈 ── */
.content-card { will-change: transform; }
.content-card:active {
    transform: scale(0.982) !important;
    box-shadow: var(--mi-shadow) !important;
    transition: transform 0.08s ease, box-shadow 0.08s ease !important;
}

/* ── 4. 导航 tab 按压 ── */
.nav-links a:active {
    transform: scale(0.88);
    opacity: 0.65;
    transition: transform 0.08s ease, opacity 0.08s ease;
}

/* ── 5. 弹窗：背景遮罩淡入 ── */
.modal.active:not(.closing) {
    animation: backdropIn 0.22s ease both;
}
@keyframes backdropIn {
    from { background: rgba(0,0,0,0); }
    to   { background: rgba(0,0,0,0.5); }
}

/* 弹窗：关闭退场动效（背景 + 内容） */
.modal.active.closing {
    animation: backdropOut 0.22s ease forwards;
    pointer-events: none;
}
.modal.active.closing .modal-content {
    animation: contentClose 0.22s cubic-bezier(0.4,0,1,1) forwards;
}
@keyframes backdropOut {
    to { background: rgba(0,0,0,0); }
}
@keyframes contentClose {
    to { transform: translateY(36px) scale(0.95); opacity: 0; }
}

/* 手机底部弹层：向下滑出 */
@media (max-width: 640px) {
    .modal.active.closing .modal-content {
        animation: contentCloseMobile 0.22s ease forwards;
    }
    @keyframes contentCloseMobile {
        to { transform: translateY(100%); opacity: 0.3; }
    }
}

/* ── 6. 弹窗内容区滚动优化 ── */
.modal-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    will-change: transform;
}

/* ── 7. 卡片 / 列表行入场错开动效 ── */
@keyframes itemEnter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.content-card.app-enter,
.list-item.app-enter {
    animation: itemEnter 0.32s cubic-bezier(0.34,1.2,0.64,1) both;
}

/* ── 8. 内容列表切换淡出 ── */
#contentList { transition: opacity 0.15s ease; }
#contentList.fading { opacity: 0; pointer-events: none; }

/* ── 9. Toast 离场淡出 ── */
.toast.toast-hide {
    animation: toastOut 0.25s ease forwards;
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ── 10. iOS Safe Area 支持 ── */
.footer-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.toast {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 640px) {
    .toast {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
    .modal-body {
        padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
    }
}

/* ── 11. 全局平滑滚动 ── */
html { scroll-behavior: smooth; }

/* ══════════════════════════════════════════════════════════
   分享海报功能
   ══════════════════════════════════════════════════════════ */

/* 卡片视图 — 分享按钮（继承公共基础样式） */
.btn-share {
    padding: 10px 18px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    background: linear-gradient(135deg, #7c5cbf 0%, #9c4dcc 100%);
    color: #fff;
}
.btn-share:hover {
    background: linear-gradient(135deg, #6a4aad 0%, #8a3dba 100%);
    box-shadow: 0 3px 10px rgba(124,92,191,0.35);
}

/* 列表视图 — 分享按钮 */
.list-item-share {
    flex-shrink: 0;
    padding: 5px 11px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c5cbf 0%, #9c4dcc 100%);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.list-item-share:hover {
    background: linear-gradient(135deg, #6a4aad 0%, #8a3dba 100%);
}

/* 移动端按压反馈 */
.btn-share:active      { transform: scale(0.92); opacity: 0.85; }
.list-item-share:active { transform: scale(0.92); }

/* ── 分享弹窗 ── */
.share-modal-content {
    max-width: 500px;
    width: calc(100vw - 32px);
}
.share-modal-body {
    padding: 14px 20px 24px;
}

/* 海报预览容器 */
#posterPreviewWrap {
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f4;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    max-height: 62vh;
}
.poster-loading {
    padding: 52px 20px;
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    letter-spacing: 0.03em;
}

/* 操作按钮区 */
.share-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.btn-share-download {
    flex: 1;
    padding: 13px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6700, #ff8a00);
    color: #fff;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-share-download:hover {
    background: linear-gradient(135deg, #e85d00, #e07800);
    box-shadow: 0 4px 12px rgba(255,103,0,0.35);
}
.btn-share-download:active { transform: scale(0.97); opacity: 0.9; }

.btn-share-wx {
    flex: 1;
    padding: 13px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #07c160, #06ae56);
    color: #fff;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-share-wx:hover {
    background: linear-gradient(135deg, #06aa54, #059847);
    box-shadow: 0 4px 12px rgba(7,193,96,0.35);
}
.btn-share-wx:active { transform: scale(0.97); opacity: 0.9; }

/* 提示文字 */
.share-tip {
    text-align: center;
    font-size: 0.76rem;
    color: #b0b0b0;
    margin: 0;
    line-height: 1.6;
}

/* 移动端全屏弹窗优化 */
@media (max-width: 640px) {
    .share-modal-content {
        width: 100%;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        margin: 0;
        max-height: 92vh;
        overflow-y: auto;
    }
    #posterPreviewWrap {
        max-height: 52vh;
    }
    .share-actions {
        flex-direction: column;
    }
}

/* ============ 详情弹窗 ============ */
.detail-modal-content {
    max-width: 480px;
}

.detail-type-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-type-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255,103,0,0.1);
    color: var(--mi-orange);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-info-list {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 4px 0;
    margin-bottom: 20px;
}

.detail-info-row {
    display: flex;
    align-items: baseline;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.detail-info-row:last-child { border-bottom: none; }

.detail-info-label {
    flex-shrink: 0;
    width: 72px;
    font-size: 0.82rem;
    color: #999;
}

.detail-info-value {
    flex: 1;
    font-size: 0.92rem;
    color: var(--mi-black);
    font-weight: 500;
    word-break: break-all;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.detail-huixiang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid #eee;
    border-radius: 24px;
    background: #fff;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-huixiang-btn:hover {
    border-color: var(--mi-orange);
    color: var(--mi-orange);
}

.detail-huixiang-btn.done {
    border-color: var(--mi-orange);
    background: rgba(255,103,0,0.08);
    color: var(--mi-orange);
}

.detail-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    background: #f5f5f5;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
}

.detail-action-btn:hover {
    background: var(--mi-orange);
    color: #fff;
    border-color: var(--mi-orange);
}

.detail-action-btn.danger {
    border-color: #ffcccc;
    color: #e53e3e;
    background: #fff5f5;
}

.detail-action-btn.danger:hover {
    background: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
}
