/* iOS 17+ 设计系统 - 横向时间线布局 */

[v-cloak] {
    display: none !important;
}

:root {
    /* iOS 颜色系统 */
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-yellow: #FFCC00;

    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F9F9F9;

    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;

    --separator: rgba(60, 60, 67, 0.12);

    /* iOS 17 圆角系统 */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --radius-xlarge: 20px;

    /* iOS 阴影 */
    --shadow-1: 0 0.5px 2px rgba(0, 0, 0, 0.04);
    --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-3: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-4: 0 8px 24px rgba(0, 0, 0, 0.10);

    /* iOS 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;

    /* 心情颜色 */
    --mood-sunny: #FF9500;
    --mood-cloudy: #007AFF;
    /* 恢复为蓝色 */
    --mood-rainy: #5856D6;

    --bg-sunny: rgba(255, 149, 0, 0.05);
    --bg-cloudy: rgba(0, 122, 255, 0.05);
    /* 恢复为蓝色背景 */
    --bg-rainy: rgba(88, 86, 214, 0.05);

    /* 动画时长变量 */
    --anim-fast: 0.2s;
    --anim-medium: 0.3s;
    --anim-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --anim-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* 深色模式变量 */
body.dark-mode {
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;

    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF599;
    /* 60% opacity white */
    --text-tertiary: #EBEBF54D;
    /* 30% opacity white */

    --separator: #38383A;

    --shadow-1: 0 0.5px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-4: 0 8px 24px rgba(0, 0, 0, 0.6);

    --bg-sunny: rgba(255, 149, 0, 0.15);
    --bg-cloudy: rgba(10, 132, 255, 0.15);
    --bg-rainy: rgba(94, 92, 230, 0.15);
}

/* 深色模式下的一些特殊调整 */
body.dark-mode .navbar {
    background: rgba(28, 28, 30, 0.85);
    /* Dark translucent */
    border-bottom: 0.5px solid var(--separator);
}

body.dark-mode .note-dot {
    border-color: #000;
    /* Dark border for dots to separate from background */
}

body.dark-mode .image-viewer-container {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .image-preview-item img,
body.dark-mode .card-image,
body.dark-mode .detail-image {
    opacity: 0.9;
    /* Slightly dim images in dark mode */
}


/* ... (body and #app styles remain unchanged) ... */

/* 关键帧动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0);
    }
}

/* 笔记卡片进入动画 - 更有层次感 */
.note-card {
    /* ... existing styles ... */
    animation: fadeInUp var(--anim-medium) var(--anim-ease-out) backwards;
}

/* 为前10个卡片添加交错延迟，营造流水般的加载感 */
.note-card:nth-child(1) {
    animation-delay: 0.05s;
}

.note-card:nth-child(2) {
    animation-delay: 0.1s;
}

.note-card:nth-child(3) {
    animation-delay: 0.15s;
}

.note-card:nth-child(4) {
    animation-delay: 0.2s;
}

.note-card:nth-child(5) {
    animation-delay: 0.25s;
}

.note-card:nth-child(6) {
    animation-delay: 0.3s;
}

.note-card:nth-child(7) {
    animation-delay: 0.35s;
}

.note-card:nth-child(8) {
    animation-delay: 0.4s;
}

.note-card:nth-child(9) {
    animation-delay: 0.45s;
}

.note-card:nth-child(10) {
    animation-delay: 0.5s;
}

/* 交互反馈优化 */

/* 1. 按钮点击的 Q 弹效果 */
.icon-btn,
.header-btn,
.compose-btn,
.retry-btn,
.filter-option,
.tag-chip,
.default-tag-chip {
    transition: transform var(--anim-fast) var(--anim-bounce),
        background-color var(--anim-fast) ease,
        opacity var(--anim-fast) ease !important;
}

.icon-btn:active,
.header-btn:active,
.compose-btn:active,
.retry-btn:active,
.filter-option:active {
    transform: scale(0.92) !important;
}

/* 2. 点赞按钮的心跳特效 */
.like-btn {
    transition: transform var(--anim-fast) var(--anim-bounce), color 0.2s ease;
}

.like-btn:active {
    transform: scale(0.8);
}

.like-btn.active svg {
    animation: heartBeat 0.6s ease-in-out;
}

/* 3. 模态弹窗的柔和缩放进出 */
.modal-enter-active,
.modal-leave-active {
    transition: all 0.4s var(--anim-bounce);
    /* 使用更有弹性的缓动 */
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
    backdrop-filter: blur(0px);
}

.modal-enter-from .compose-modal,
.modal-leave-to .compose-modal,
.modal-enter-from .detail-modal,
.modal-leave-to .detail-modal,
.modal-enter-from .filter-modal,
.modal-leave-to .filter-modal {
    transform: scale(0.9) translateY(20px);
    /* 增加一点位移，更生动 */
    opacity: 0;
}

.modal-enter-to .compose-modal,
.modal-enter-to .detail-modal,
.modal-enter-to .filter-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* 4. 图片 hover 时的轻微浮动 */
.card-image,
.detail-image {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.card-image:hover {
    transform: scale(1.02);
    filter: brightness(1.02);
}

/* 5. 导航栏标题的入场 */
.nav-title {
    animation: popIn 0.5s var(--anim-bounce) backwards;
}

/* 6. 卡片 Hover 的阴影加深过渡更平滑 */
.card-inner {
    /* ... existing styles ... */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* 更跟手的缓动 */
}

.note-card:hover .card-inner {
    transform: translateY(-2px);
    /* 轻微上浮 */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    /* 阴影扩散更柔和 */
}

/* 7. 评论列表的顺滑展开 */
.comments-list {
    /* 移除 min-height 防止跳动 */
    /* min-height: 80px; */
}

.comment-item {
    animation: fadeInUp 0.4s var(--anim-ease-out) backwards;
}

/* 评论逐个进入 */
.comment-item:nth-child(1) {
    animation-delay: 0.05s;
}

.comment-item:nth-child(2) {
    animation-delay: 0.1s;
}

.comment-item:nth-child(3) {
    animation-delay: 0.15s;
}

/* 8. 标签 Hover 效果增强 */
.card-tag:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* iOS 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--separator);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--spacing-lg);
    min-height: 52px;
}

.nav-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* iOS 撰写按钮 */
.compose-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--ios-blue);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.compose-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.compose-btn:active {
    transform: scale(0.95);
}

/* 导航栏按钮组 */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.icon-btn-nav {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: var(--ios-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn-nav:hover {
    background: rgba(0, 122, 255, 0.1);
}

.icon-btn-nav:active {
    transform: scale(0.95);
}

/* 主容器 */
.main-container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-xl);
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============ 下拉刷新 ============ */

.pull-to-refresh {
    display: none !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.pull-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.pull-icon {
    transition: transform 0.3s ease;
}

.pull-icon.rotated {
    transform: rotate(180deg);
}

.pull-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-tertiary);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pull-text {
    font-size: 14px;
    font-weight: 500;
}

/* 横向时间线布局 */
.timeline-wrapper {
    position: relative;
}

/* 横向时间线 - 隐藏 */
.timeline-horizontal {
    display: none;
}

/* 笔记流布局 - 横向排列自动换行 */
.notes-flow {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg) 16px;
    align-items: flex-start;
    padding-top: 32px;
}

/* 笔记卡片 */
.note-card {
    position: relative;
    width: 206px;
    flex-shrink: 0;
    cursor: pointer;
    /* transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);  <-- Removed old transition */
    transition: transform var(--anim-medium) var(--anim-ease-out);
    /* 使用新定义的平滑缓动 */
    padding-top: 8px;
    /* animation: fadeInUp ... (defined at top) */
}

.note-card.has-image {
    width: 206px;
}

/* 收藏的卡片样式 */
.note-card.is-favorite {
    background: rgba(255, 204, 0, 0.03);
    border-radius: var(--radius-medium);
    padding: 4px;
}

.note-card.is-favorite .card-inner {
    box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.3);
}

/* 皇冠收藏按钮 */
.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-1);
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn:hover svg {
    color: var(--ios-yellow);
}

.favorite-btn.active svg {
    color: var(--ios-yellow);
    filter: drop-shadow(0 0 2px rgba(255, 204, 0, 0.5));
}

.note-card:hover {
    transform: translateY(-4px);
}

.note-card:active {
    transform: scale(0.98);
}

/* 每个卡片的横线 */
.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    right: -12px;
    height: 2px;
    background: var(--separator);
    z-index: 0;
}

/* 时间点包装器 - 保持定位逻辑 */
.note-dot-wrapper {
    position: absolute;
    top: -8px;
    /* 调整位置以适应图标中心 */
    left: 17px;
    /* 调整水平位置 */
    width: 16px;
    height: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认圆点 (蓝色) 和 收藏圆点 (黄色) */
.note-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ios-blue);
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
    transition: all 0.2s ease;
}

/* 收藏圆点 - 强制黄色 */
.note-dot.is-favorite-dot {
    background: var(--ios-yellow);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.25);
}

/* 默认心情圆点 (阴天/默认) - 蓝色 */
.note-dot.mood-default {
    background: var(--ios-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

/* 心情图标 (无背景圆点，纯图标) */
.note-dot-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    /* 遮挡背后的线 */
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.note-dot-icon.mood-sunny {
    color: var(--mood-sunny);
}

.note-dot-icon.mood-rainy {
    color: var(--mood-rainy);
}

/* Hover 效果 */
.note-card:hover .note-dot.mood-default {
    box-shadow: 0 0 0 6px rgba(0, 122, 255, 0.25);
}

.note-card:hover .note-dot.is-favorite-dot {
    box-shadow: 0 0 0 6px rgba(255, 204, 0, 0.35);
}

.note-card:hover .note-dot-icon {
    transform: scale(1.2);
}

/* 收藏的时间点 - 优先级最高 */
.note-card.is-favorite .note-dot {
    /* 这里的样式已经被上面的 .is-favorite-dot 覆盖，保留此块为了兼容性或未来扩展 */
}

/* 卡片内容 */
.card-inner {
    background: var(--bg-secondary);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    border: 0.5px solid var(--separator);
    /* transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1); <-- Removed old transition */
    transition: all var(--anim-medium) cubic-bezier(0.25, 0.8, 0.25, 1);
    /* 更跟手的悬停效果 */
    position: relative;
}

.note-card:hover .card-inner {
    box-shadow: var(--shadow-3);
    /* transform is handled by .note-card:hover .card-inner definition at top */
}

.card-header {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-xs);
}

.card-time {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-primary);
    padding: 0 var(--spacing-md) var(--spacing-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-image {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    background: var(--bg-tertiary);
    padding: var(--spacing-sm) 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 var(--spacing-md) var(--spacing-sm);
}

.card-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* 彩虹文字效果 */
.rainbow-text {
    background: linear-gradient(90deg, #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF, #4B0082, #9400D3, #FF0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: rainbow-flow 3s linear infinite;
}

@keyframes rainbow-flow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* 标签和点赞行 */
.card-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px var(--spacing-md);
    gap: 8px;
}

/* 点赞按钮 */
.like-btn {
    flex-shrink: 0;
    width: 28px;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    padding: 0;
}

.like-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.active {
    color: #FF2D55;
}

.like-btn.active svg {
    fill: #FF2D55;
    stroke: #FF2D55;
    filter: drop-shadow(0 0 2px rgba(255, 45, 85, 0.4));
}

/* 点赞数 */
.like-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 2px;
}

.like-btn.active .like-count {
    color: #FF2D55;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px var(--spacing-md);
    background: var(--bg-tertiary);
    border-top: 0.5px solid var(--separator);
}

.card-date {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chevron {
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.note-card:hover .chevron {
    transform: translateX(2px);
}

/* 空状态 */
.empty-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    text-align: center;
}

.empty-icon {
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 加载状态 */
.loading-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 122, 255, 0.1);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 15px;
    color: var(--text-secondary);
}

/* 错误状态 */
.error-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    text-align: center;
}

.error-icon {
    color: var(--ios-red);
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.error-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.error-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.retry-btn {
    padding: 10px 24px;
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.retry-btn:hover {
    opacity: 0.8;
}

/* 模态弹窗 - 屏幕中间显示 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    /* 优化过渡效果，使其更平滑 */
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

/* 复用上面的 .modal-enter-active 等定义，这里删除重复或冲突的旧定义，保持代码整洁 */
/* .modal-enter-active, .modal-leave-active { ... } (已在顶部定义) */

/* 
.modal-enter-from, .modal-leave-to { ... } (已在顶部定义) 
*/

/* 
.modal-enter-from .compose-modal, ... { ... } (已在顶部定义)
*/

/* 
.modal-enter-to .compose-modal, ... { ... } (已在顶部定义)
*/

/* 撰写弹窗 - 居中显示 */
.compose-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xlarge);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-4);
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 0.5px solid var(--separator);
    background: var(--bg-tertiary);
}

.header-btn {
    border: none;
    background: none;
    font-size: 17px;
    font-weight: 600;
    color: var(--ios-blue);
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: opacity 0.15s ease;
}

.header-btn:hover {
    opacity: 0.7;
}

.header-btn-primary {
    opacity: 1;
}

.header-btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.compose-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.compose-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

/* 默认标签选择区 */
.default-tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.default-tag-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: rgba(0, 122, 255, 0.1);
    color: var(--ios-blue);
    user-select: none;
    position: relative;
}

.default-tag-chip:hover {
    transform: scale(1.05);
}

.default-tag-chip.selected {
    background: var(--tag-color);
    color: white;
    box-shadow: 0 2px 8px var(--tag-color);
}

.compose-textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.5;
    color: var(--text-primary);
}

.compose-textarea::placeholder {
    color: var(--text-tertiary);
}

.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--spacing-sm);
    font-weight: 500;
}

.char-counter .over-limit {
    color: var(--ios-red);
}

/* ============ 图片预览区 - 九宫格布局 ============ */

.images-attachment {
    margin-top: var(--spacing-md);
}

/* 单张图片 */
.images-count-1 {
    display: flex;
    justify-content: center;
}

.images-count-1 .image-preview-item {
    max-width: 200px;
}

/* 2张图片 - 1x2 */
.images-count-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    max-width: 300px;
}

/* 3张图片 - 1x3 */
.images-count-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 400px;
}

/* 4张图片 - 2x2 */
.images-count-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    max-width: 300px;
}

/* 5-9张图片 - 3x3 */
.images-count-5,
.images-count-6,
.images-count-7,
.images-count-8,
.images-count-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 400px;
}

.image-preview-item {
    position: relative;
    cursor: move;
    /* 显示可拖拽光标 */
}

.image-preview-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: block;
}

/* 单张图片特殊处理 */
.images-count-1 .image-preview-item img {
    width: auto;
    height: auto;
    aspect-ratio: auto;
    max-width: 200px;
    max-height: 200px;
}

/* 删除按钮 - 桌面端悬停显示 */
.remove-attachment {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transform: scale(0.8);
}

.image-preview-item:hover .remove-attachment {
    opacity: 1;
    transform: scale(1);
}

.remove-attachment:hover {
    background: var(--ios-red);
    transform: scale(1.15) !important;
}

/* Sortable 拖拽中的样式 */
.image-preview-item.sortable-ghost {
    opacity: 0.3;
}

.image-preview-item.sortable-drag {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* 手机端触摸优化 */
@media (max-width: 600px) {
    .images-count-1 .image-preview-item {
        max-width: 150px;
    }

    .images-count-1 .image-preview-item img {
        max-width: 150px;
        max-height: 150px;
    }

    .images-count-2 {
        max-width: 100%;
    }

    .images-count-3 {
        max-width: 100%;
    }

    .images-count-4 {
        max-width: 100%;
    }

    .images-count-5,
    .images-count-6,
    .images-count-7,
    .images-count-8,
    .images-count-9 {
        max-width: 100%;
        gap: 3px;
    }

    /* 手机端始终显示删除按钮 */
    .remove-attachment {
        opacity: 1;
        transform: scale(1);
        background: rgba(0, 0, 0, 0.5);
    }
}

.tags-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-medium);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.tag-remove {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-input-field {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    padding: var(--spacing-sm) 0;
    color: var(--text-primary);
}

.tag-input-field::placeholder {
    color: var(--text-tertiary);
}

.compose-toolbar {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 0.5px solid var(--separator);
    background: var(--bg-tertiary);
    position: relative;
    /* 为弹出层定位 */
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-medium);
    color: var(--ios-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.toolbar-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

/* 心情选择器气泡 */
.mood-selector-bubble {
    position: absolute;
    bottom: 50px;
    /* 在按钮上方 */
    left: 20px;
    /* 稍微调整位置 */
    background: var(--bg-secondary);
    border-radius: var(--radius-large);
    padding: 8px 12px;
    display: flex;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 101;
    animation: bubble-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mood-selector-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    transform: rotate(45deg);
    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.05);
}

@keyframes bubble-pop {
    from {
        transform: scale(0.8) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.mood-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: var(--text-tertiary);
    border: 2px solid transparent;
}

.mood-option:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

/* 选中状态 */
.mood-option.active {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mood-option.active[data-mood="sunny"] {
    color: var(--mood-sunny);
    border-color: var(--mood-sunny);
}

.mood-option.active[data-mood="cloudy"] {
    color: var(--mood-cloudy);
    border-color: var(--mood-cloudy);
}

.mood-option.active[data-mood="rainy"] {
    color: var(--mood-rainy);
    border-color: var(--mood-rainy);
}

.toolbar-btn svg {
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke: currentColor;
}

/* 针对心情图标单独调整，因为 use href 引用可能自带样式，这里强制统一 */
.toolbar-btn use {
    stroke: currentColor;
    fill: none;
}

/* 按钮本身的激活态颜色 */
.toolbar-btn.mood-btn-sunny {
    color: var(--mood-sunny);
}

.toolbar-btn.mood-btn-cloudy {
    color: var(--mood-cloudy);
}

.toolbar-btn.mood-btn-rainy {
    color: var(--mood-rainy);
}

.hidden-input {
    display: none;
}

/* 详情弹窗 - 居中显示 */
.detail-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xlarge);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-4);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 0.5px solid var(--separator);
    background: var(--bg-tertiary);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-medium);
    color: var(--ios-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.icon-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xl);
}

.detail-text {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: var(--spacing-lg);
}

.detail-images {
    margin-bottom: var(--spacing-lg);
}

/* 单张图片 - 居中显示，尺寸适中 */
.images-count-1 {
    display: flex;
    justify-content: center;
}

.images-count-1 .detail-image {
    max-width: 60%;
    max-height: 350px;
    width: auto;
    height: auto;
    border-radius: var(--radius-large);
}

/* 2张图片 - 1x2 布局 */
.images-count-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

/* 3张图片 - 1x3 布局 */
.images-count-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

/* 4张图片 - 2x2 布局 */
.images-count-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

/* 5-9张图片 - 3x3 布局 */
.images-count-5,
.images-count-6,
.images-count-7,
.images-count-8,
.images-count-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

/* 多张图片时的通用样式 */
.images-count-2 .detail-image,
.images-count-3 .detail-image,
.images-count-4 .detail-image,
.images-count-5 .detail-image,
.images-count-6 .detail-image,
.images-count-7 .detail-image,
.images-count-8 .detail-image,
.images-count-9 .detail-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

/* 兼容旧版本单张图片（image 字段） */
.detail-image-single {
    max-width: 60%;
    max-height: 350px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-large);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.detail-tags-edit {
    margin-bottom: var(--spacing-lg);
}

.detail-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.detail-tag-remove {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.detail-tag-remove:hover {
    opacity: 1;
}

.detail-tag-input {
    width: 100%;
    border: none;
    background: var(--bg-tertiary);
    font-size: 16px;
    font-family: inherit;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-medium);
    outline: none;
    color: var(--text-primary);
}

.detail-tag-input::placeholder {
    color: var(--text-tertiary);
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    border-top: 0.5px solid var(--separator);
}

.detail-date-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 详情页心情图标 */
.mood-icon-detail {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-icon-detail.sunny {
    color: var(--mood-sunny);
}

.mood-icon-detail.cloudy {
    color: var(--mood-cloudy);
}

.mood-icon-detail.rainy {
    color: var(--mood-rainy);
}

.detail-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 详情页点赞按钮 */
.detail-meta .like-btn {
    width: 36px;
    height: 36px;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* 响应式 */
@media (max-width: 600px) {
    .main-container {
        padding: var(--spacing-md);
    }

    /* 手机端强制两列布局 */
    .notes-flow {
        gap: 12px;
    }

    .note-card {
        width: calc((100% - 12px) / 2);
    }

    .note-card.has-image {
        width: calc((100% - 12px) / 2);
    }

    /* 详情页图片九宫格 - 手机端优化 */
    .images-count-1 .detail-image {
        max-width: 80%;
        max-height: 250px;
    }

    .detail-image-single {
        max-width: 80%;
        max-height: 250px;
    }

    /* 手机端多张图片保持3x3布局，但调整间距 */
    .images-count-2,
    .images-count-3,
    .images-count-4,
    .images-count-5,
    .images-count-6,
    .images-count-7,
    .images-count-8,
    .images-count-9 {
        gap: 3px;
    }
}

/* 筛选弹窗 */
.filter-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xlarge);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-4);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 0.5px solid var(--separator);
    background: var(--bg-tertiary);
}

.filter-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.filter-section {
    margin-bottom: var(--spacing-xl);
}

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

.filter-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
}

/* 筛选选项 */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-medium);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(0, 122, 255, 0.05);
}

.filter-option.active {
    background: rgba(0, 122, 255, 0.1);
}

.filter-option-text {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.filter-check {
    width: 20px;
    height: 20px;
    background: var(--ios-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-tag {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-tag:hover {
    transform: scale(1.05);
}

.filter-tag.selected {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.filter-empty {
    font-size: 15px;
    color: var(--text-tertiary);
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin: 0;
}

/* 加载更多提示 */
.loading-more {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 8px;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 122, 255, 0.1);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============ 评论区样式 (iOS风格) ============ */

/* 评论区容器 */
.detail-comments-section {
    margin-top: var(--spacing-lg);
    border-top: 0.5px solid var(--separator);
    padding-top: var(--spacing-md);
}

/* 评论折叠按钮 */
.comments-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comments-toggle-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.comments-toggle-title svg {
    color: var(--text-secondary);
}

.comments-toggle .chevron {
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
}

.comments-toggle .chevron.expanded {
    transform: rotate(180deg);
}

/* 评论展开动画 */
.comments-expand-enter-active,
.comments-expand-leave-active {
    transition: all 0.3s ease;
    overflow: hidden;
}

.comments-expand-enter-from,
.comments-expand-leave-to {
    opacity: 0;
    max-height: 0;
}

.comments-expand-enter-to,
.comments-expand-leave-from {
    opacity: 1;
    max-height: 1000px;
}

/* 评论内容区 */
.comments-content {
    padding-top: var(--spacing-md);
}

/* 排序切换 */
.comments-sort {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-medium);
    width: fit-content;
}

.sort-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    color: var(--text-primary);
}

.sort-btn.active {
    background: var(--bg-secondary);
    color: var(--ios-blue);
    box-shadow: var(--shadow-1);
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    min-height: 80px;
}

/* 单个评论项 */
.comment-item {
    animation: comment-fade-in 0.3s ease;
}

@keyframes comment-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 评论气泡 */
.comment-bubble {
    background: var(--bg-tertiary);
    border-radius: var(--radius-medium);
    padding: var(--spacing-md);
    position: relative;
    transition: all 0.2s ease;
}

.comment-bubble:hover {
    background: rgba(0, 0, 0, 0.03);
}

.comment-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
    margin-bottom: var(--spacing-sm);
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* 评论元信息 */
.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-time {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* 删除评论按钮 */
.comment-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: var(--radius-small);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.comment-bubble:hover .comment-delete {
    opacity: 1;
}

.comment-delete:hover {
    background: rgba(255, 59, 48, 0.1);
    color: var(--ios-red);
}

/* 评论空状态 */
.comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
}

.comments-empty svg {
    color: var(--text-tertiary);
    opacity: 0.3;
    margin-bottom: var(--spacing-md);
}

.comments-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 评论输入区 */
.comment-input-section {
    padding-top: var(--spacing-md);
    border-top: 0.5px solid var(--separator);
}

.comment-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.comment-input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.comment-input:focus {
    background: rgba(0, 0, 0, 0.05);
}

.comment-input::placeholder {
    color: var(--text-tertiary);
}

/* 发送按钮 */
.comment-send-btn {
    padding: 10px 20px;
    background: var(--ios-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.comment-send-btn:hover:not(.disabled) {
    background: #0051D5;
    transform: scale(1.02);
}

.comment-send-btn:active:not(.disabled) {
    transform: scale(0.98);
}

.comment-send-btn.disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.5;
}

/* 字数统计 */
.comment-char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-weight: 500;
}

/* 响应式 - 评论区 */
@media (max-width: 600px) {
    .comments-sort {
        width: 100%;
    }

    .sort-btn {
        flex: 1;
        text-align: center;
    }

    .comment-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .comment-send-btn {
        width: 100%;
    }

    .comment-delete {
        opacity: 1;
    }
}

/* ============ 图片查看器 ============ */

.image-viewer-backdrop {
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
}

.image-viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-medium);
    user-select: none;
    -webkit-user-select: none;
}

/* 关闭按钮 */
.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 导航按钮 */
.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* 图片计数 */
.image-viewer-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

/* 详情页图片可点击提示 */
.detail-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.detail-image:hover {
    transform: scale(1.02);
}

.detail-image-single {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.detail-image-single:hover {
    transform: scale(1.02);
}

/* 手机端优化 */
@media (max-width: 600px) {
    .image-viewer-container {
        padding: 10px;
    }

    .image-viewer-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .image-viewer-nav {
        width: 44px;
        height: 44px;
    }

    .image-viewer-prev {
        left: 10px;
    }

    .image-viewer-next {
        right: 10px;
    }

    .image-viewer-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }

    /* 支持左右滑动切换 */
    .image-viewer-container {
        touch-action: pan-y;
    }
}

/* 屏幕震动动画 - 用于"生气"彩蛋 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-screen {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}