/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* macOS 风格配色 - 低饱和柔和色调 */
    --primary-color: #007AFF;
    --primary-hover: #0051D5;
    --secondary-color: #8E8E93;
    --success-color: #34C759;
    --danger-color: #FF3B30;
    --warning-color: #FF9500;

    /* 背景色 */
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.4);

    /* 文字颜色 */
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #C7C7CC;

    /* 磨砂玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-soft: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.18);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* 彩色阴影 - 柔和低饱和 */
    --shadow-primary: 0 8px 24px rgba(0, 122, 255, 0.15);
    --shadow-success: 0 8px 24px rgba(52, 199, 89, 0.15);
    --shadow-danger: 0 8px 24px rgba(255, 59, 48, 0.15);
    --shadow-warning: 0 8px 24px rgba(255, 149, 0, 0.15);

    /* 渐变色 - 柔和彩虹（按语义区分） */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-edit: linear-gradient(135deg, #6fb1fc 0%, #4364f7 50%, #8ea8ff 100%);
    --gradient-danger: linear-gradient(135deg, #f79a8e 0%, #e46f77 50%, #d98fb0 100%);
    --gradient-secondary: linear-gradient(135deg, #d5dbe8 0%, #e7e0ef 50%, #d8e4ef 100%);
    --gradient-ai: linear-gradient(135deg, #8ec5fc 0%, #b8a4f0 50%, #f3b8d8 100%);
    --gradient-success: linear-gradient(135deg, #7fd8be 0%, #9bd6a3 100%);
    --gradient-rainbow: linear-gradient(90deg,
        rgba(102, 126, 234, 0.6) 0%,
        rgba(118, 75, 162, 0.6) 20%,
        rgba(240, 147, 251, 0.6) 40%,
        rgba(99, 188, 255, 0.6) 60%,
        rgba(52, 199, 89, 0.6) 80%,
        rgba(102, 126, 234, 0.6) 100%
    );

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 过渡动画 */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 84px;
    position: relative;
    overflow-x: hidden;
}

/* ==================== 底层流光背景（多层） ==================== */
body::before {
    content: '';
    position: fixed;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(
        45deg,
        rgba(102, 126, 234, 0.07) 0%,
        rgba(118, 75, 162, 0.06) 25%,
        rgba(240, 147, 251, 0.07) 50%,
        rgba(99, 188, 255, 0.06) 75%,
        rgba(102, 126, 234, 0.07) 100%
    );
    animation: flowingBackground 18s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(closest-side at 18% 22%, rgba(140, 170, 255, 0.16), transparent),
        radial-gradient(closest-side at 82% 28%, rgba(240, 170, 235, 0.14), transparent),
        radial-gradient(closest-side at 30% 82%, rgba(150, 225, 205, 0.13), transparent),
        radial-gradient(closest-side at 74% 76%, rgba(190, 175, 255, 0.14), transparent);
    background-size: 60% 60%, 55% 55%, 58% 58%, 52% 52%;
    background-repeat: no-repeat;
    animation: auroraDrift 26s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
    filter: blur(10px);
}

@keyframes flowingBackground {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(12%, 12%) rotate(360deg); }
}

@keyframes auroraDrift {
    0% {
        background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
        opacity: 0.75;
    }
    50% {
        background-position: 18% 12%, 78% 20%, 20% 82%, 74% 70%;
        opacity: 1;
    }
    100% {
        background-position: 8% 24%, 88% 8%, 12% 70%, 86% 88%;
        opacity: 0.8;
    }
}

/* 粒子画布：位于流光之上、内容之下 */
.particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 只把主内容抬到背景层之上（.navbar 自带 fixed + z-index: 100）。
   这里不能用 body > * 通配：那会给 .modal / .image-viewer / .toast
   强行加上 position: relative 与 z-index: 1，
   使弹窗失去 fixed 定位而被塞进文档流（表现为"点了按钮没反应"）。 */
.main-container {
    position: relative;
    z-index: 1;
}

/* 通用隐藏工具类：优先级高于各元素自身的 display，
   用它替代内联 style.display 以免破坏 inline-flex 等布局 */
.is-hidden {
    display: none !important;
}

/* 通用磨砂面板 */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ==================== 顶部导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
    overflow: hidden;
}

/* 导航栏磨砂彩色反光动画（增强） */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        rgba(102, 126, 234, 0.14) 0%,
        rgba(118, 75, 162, 0.10) 18%,
        rgba(240, 147, 251, 0.14) 36%,
        rgba(99, 188, 255, 0.12) 54%,
        rgba(150, 225, 205, 0.12) 72%,
        rgba(102, 126, 234, 0.14) 100%
    );
    background-size: 300% 100%;
    animation: navShimmer 12s linear infinite;
    pointer-events: none;
}

.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gradient-rainbow);
    background-size: 220% 100%;
    animation: navShimmer 8s linear infinite;
    opacity: 0.7;
    /* 装饰层不拦截点击，否则会挡住导航栏底部的按钮 */
    pointer-events: none;
}

@keyframes navShimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.navbar-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* ==================== 导航菜单 ==================== */
.navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: all var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #fff;
    background: var(--gradient-primary);
    background-size: 220% 220%;
    animation: gradientFlow 6s ease infinite;
    box-shadow: 0 6px 18px rgba(118, 75, 162, 0.22);
}

@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-area {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.user-info:hover {
    box-shadow: var(--shadow-primary);
}

.user-email {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 按钮样式 ==================== */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-ai {
    /* isolation 建立层叠上下文，让裸文本节点始终盖在渐变层之上 */
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    overflow: hidden;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.2px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--transition-base),
                box-shadow var(--transition-base),
                filter var(--transition-base);
}

/* 渐变流动层：置于文字下方 */
.btn-primary::before,
.btn-danger::before,
.btn-ai::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 260% 260%;
    animation: gradientFlow 4s linear infinite;
    z-index: -1;
    transition: filter var(--transition-base), opacity var(--transition-base);
}

/* 主按钮 */
.btn-primary {
    color: #fff;
    box-shadow: 0 6px 18px rgba(118, 75, 162, 0.20);
}
.btn-primary::before { background-image: var(--gradient-primary); }

/* 次要按钮 */
.btn-secondary {
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.btn-secondary::before {
    background-image: var(--gradient-secondary);
    animation-duration: 6s;
}

/* 危险按钮 */
.btn-danger {
    color: #fff;
    box-shadow: 0 6px 18px rgba(228, 111, 119, 0.22);
}
.btn-danger::before { background-image: var(--gradient-danger); }

/* AI 按钮 */
.btn-ai {
    color: #2b2b46;
    box-shadow: 0 6px 18px rgba(184, 164, 240, 0.24);
}
.btn-ai::before {
    background-image: var(--gradient-ai);
    animation-duration: 5s;
}

/* hover：饱和度柔和升高 + 光晕向外扩散 */
.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled),
.btn-danger:hover:not(:disabled),
.btn-ai:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-primary:hover:not(:disabled)::before,
.btn-secondary:hover:not(:disabled)::before,
.btn-danger:hover:not(:disabled)::before,
.btn-ai:hover:not(:disabled)::before {
    filter: saturate(135%) brightness(1.04);
    animation-duration: 2.2s;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 12px 30px rgba(118, 75, 162, 0.30),
                0 0 0 6px rgba(118, 75, 162, 0.10),
                0 0 34px rgba(240, 147, 251, 0.24);
}
.btn-secondary:hover:not(:disabled) {
    box-shadow: 0 10px 26px rgba(120, 140, 180, 0.20),
                0 0 0 6px rgba(150, 170, 210, 0.10);
}
.btn-danger:hover:not(:disabled) {
    box-shadow: 0 12px 30px rgba(228, 111, 119, 0.30),
                0 0 0 6px rgba(228, 111, 119, 0.12),
                0 0 32px rgba(217, 143, 176, 0.24);
}
.btn-ai:hover:not(:disabled) {
    box-shadow: 0 12px 30px rgba(184, 164, 240, 0.30),
                0 0 0 6px rgba(184, 164, 240, 0.12),
                0 0 34px rgba(142, 197, 252, 0.26);
}

.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.btn-danger:active:not(:disabled),
.btn-ai:active:not(:disabled) {
    transform: translateY(0) scale(0.985);
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-ai:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* .full-width 定义见弹窗底部区块 */

/* ==================== 主内容区域 & 页面路由 ==================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: pageFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(14px) scale(0.994); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 页面 Hero */
.page-hero {
    padding: 40px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: var(--gradient-rainbow);
    background-size: 300% 100%;
    opacity: 0.10;
    animation: navShimmer 14s linear infinite;
    pointer-events: none;
}

.page-hero > * { position: relative; z-index: 1; }

.page-hero-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}

.page-hero-desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

/* 统计卡片 */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-tile {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 26px rgba(140, 170, 255, 0.18);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.5px;
    /* 先给纯色兜底，渐变裁字不生效时数字仍可见 */
    color: #5b4b9a;
}

/* 仅在支持 background-clip: text 的浏览器里启用渐变文字 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .stat-value {
        background: var(--gradient-primary);
        background-size: 200% 200%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: gradientFlow 7s ease infinite;
    }
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 通用区块 */
.section-block {
    padding: 26px 28px;
    margin-bottom: 24px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
}

.badge-soft {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #5a5a7a;
    background: rgba(184, 164, 240, 0.16);
    border: 1px solid rgba(184, 164, 240, 0.3);
}

/* ==================== 分享开关 ==================== */
.share-block {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(142, 197, 252, 0.08);
    border: 1px solid rgba(142, 197, 252, 0.24);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    cursor: pointer;
}

.switch-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

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

.switch-desc {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 27px;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(140, 150, 190, 0.30);
    transition: background var(--transition-base);
    pointer-events: none;
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform var(--transition-base);
}

.switch input:checked + .switch-slider {
    background-image: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
}

.switch input:checked + .switch-slider::before {
    transform: translateX(21px);
}

.switch input:focus-visible + .switch-slider {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.20);
}

/* 公开动态占位 */
.feed-placeholder {
    display: block;
}

.feed-empty {
    padding: 44px 20px;
    text-align: center;
    color: var(--text-secondary);
    border: 1.5px dashed rgba(140, 150, 190, 0.28);
    border-radius: var(--radius-md);
}

.feed-empty-icon {
    display: block;
    font-size: 34px;
    margin-bottom: 10px;
}

/* ==================== 社区动态流 ==================== */
.feed-tip {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.6;
    color: #4a4a6a;
    background: rgba(142, 197, 252, 0.12);
    border-left: 3px solid rgba(142, 197, 252, 0.55);
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feed-card {
    position: relative;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    animation: cardEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feed-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg),
                0 10px 32px rgba(102, 126, 234, 0.14),
                0 10px 40px rgba(240, 147, 251, 0.10);
}

.feed-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feed-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 7s ease infinite;
}

.feed-meta {
    flex: 1;
    min-width: 0;
}

.feed-author {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-date {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.feed-mine {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    color: #4a6a4a;
    background: rgba(127, 216, 190, 0.20);
    border: 1px solid rgba(127, 216, 190, 0.40);
}

.feed-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 8px;
}

.feed-content {
    font-size: 14px;
    line-height: 1.8;
    color: #3d3d42;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    line-clamp: 6;
    overflow: hidden;
}

.feed-content.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.feed-more {
    margin-top: 6px;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.feed-more:hover { text-decoration: underline; }

.feed-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.feed-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.feed-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.24);
}

.feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-summary {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #4a4a6a;
    background: rgba(184, 164, 240, 0.12);
    border-left: 3px solid rgba(184, 164, 240, 0.55);
}

/* ==================== 点赞 / 评论操作栏 ==================== */
.feed-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.feed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid rgba(140, 150, 190, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-base);
}

.feed-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.16);
}

/* 已点赞态：低饱和暖色，不刺眼 */
.feed-btn.liked {
    color: #b05a72;
    background: rgba(240, 175, 205, 0.18);
    border-color: rgba(240, 175, 205, 0.5);
    font-weight: 600;
}

.feed-btn.liked .feed-btn-icon {
    animation: likePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes likePop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.feed-btn-icon { font-size: 14px; line-height: 1; }

/* ==================== 评论区 ==================== */
.comment-area {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(140, 150, 190, 0.24);
    animation: pageFadeIn 0.3s ease both;
}

.comment-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.comment-input {
    flex: 1;
    min-width: 0;
    padding: 9px 13px;
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    outline: none;
    resize: vertical;
    min-height: 42px;
    transition: all var(--transition-base);
}

.comment-input:focus {
    background: #fff;
    border-color: rgba(118, 75, 162, 0.42);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.comment-submit {
    flex-shrink: 0;
    align-self: stretch;
}

.comment-login-tip {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    line-height: 1.6;
    color: #7a5a2e;
    background: rgba(255, 149, 0, 0.10);
    border-left: 3px solid rgba(255, 149, 0, 0.5);
}

.comment-login-tip button {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 10px;
    animation: pageFadeIn 0.3s ease both;
}

.comment-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #9db4e8 0%, #b8a4d8 100%);
}

.comment-body {
    flex: 1;
    min-width: 0;
    padding: 10px 13px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--glass-border);
}

.comment-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 13.5px;
    line-height: 1.7;
    color: #3d3d42;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.comment-tools {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.comment-tool {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.comment-tool:hover { color: var(--primary-color); }
.comment-tool.danger:hover { color: var(--danger-color); }

/* 回复列表：缩进一级 */
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding-left: 14px;
    border-left: 2px solid rgba(140, 150, 190, 0.20);
}

.reply-item {
    animation: pageFadeIn 0.3s ease both;
}

.reply-to {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.reply-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    animation: pageFadeIn 0.25s ease both;
}

.comment-empty {
    padding: 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .comment-form, .reply-form { flex-direction: column; }
    .comment-submit { width: 100%; }
    .feed-actions { gap: 8px; }
}

/* ==================== 日志页工具栏 ==================== */
.page-toolbar {
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.toolbar-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.search-bar:hover,
.search-bar:focus-within {
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.10), var(--shadow-sm);
}

.search-icon { font-size: 14px; }

.date-input {
    flex: 1 1 auto;
    /* 给足宽度，避免 yyyy/mm/dd 被压缩后截断 */
    min-width: 124px;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    background: rgba(140, 150, 190, 0.14);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-btn:hover {
    background: rgba(140, 150, 190, 0.24);
    color: var(--text-primary);
}

/* ==================== 空状态 ==================== */
.empty-state {
    display: none;
    text-align: center;
    padding: 80px 20px;
}

.empty-state.show { display: block; }

.empty-icon {
    font-size: 60px;
    margin-bottom: 14px;
    animation: floatSoft 5s ease-in-out infinite;
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.empty-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.empty-btn {
    padding: 12px 28px;
    font-size: 15px;
}

/* ==================== 日志卡片 ==================== */
.logs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
}

.log-card {
    position: relative;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    animation: cardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶部渐变条 */
.log-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--gradient-rainbow);
    background-size: 240% 100%;
    opacity: 0;
    animation: navShimmer 6s linear infinite;
    transition: opacity var(--transition-base);
}

/* 卡片边缘彩色柔光 */
.log-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-lg) + 2px);
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.35),
        rgba(240, 147, 251, 0.30),
        rgba(150, 225, 205, 0.32)
    );
    background-size: 220% 220%;
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    animation: gradientFlow 7s ease infinite;
    transition: opacity var(--transition-slow), filter var(--transition-slow);
}

/* 悬浮：上浮加大 + 多层彩色柔光扩散 */
.log-card:hover {
    transform: translateY(-12px) scale(1.012);
    box-shadow:
        0 26px 54px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        0 12px 40px rgba(102, 126, 234, 0.20),
        0 12px 60px rgba(240, 147, 251, 0.16),
        0 8px 34px rgba(150, 225, 205, 0.16);
}

/* 整卡可点击 */
.log-card {
    cursor: pointer;
}

/* 键盘聚焦时给出清晰可见的焦点环 */
.log-card:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(118, 75, 162, 0.45),
        0 0 0 8px rgba(102, 126, 234, 0.16),
        var(--shadow-lg);
}

.log-card:hover::before { opacity: 0.85; }
.log-card:hover::after  { opacity: 1; filter: blur(18px); }

.log-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.log-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.log-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateX(6px);
    transition: all var(--transition-base);
}

.log-card:hover .log-actions {
    opacity: 1;
    transform: translateX(0);
}

.log-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-base);
}

.log-action-btn.edit:hover {
    background-image: var(--gradient-edit);
    background-size: 200% 200%;
    animation: gradientFlow 3s linear infinite;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 20px rgba(67, 100, 247, 0.28),
                0 0 20px rgba(111, 177, 252, 0.30);
}

.log-action-btn.delete:hover {
    background-image: var(--gradient-danger);
    background-size: 200% 200%;
    animation: gradientFlow 3s linear infinite;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 20px rgba(228, 111, 119, 0.28),
                0 0 20px rgba(217, 143, 176, 0.30);
}

.log-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* 已分享到社区的标记 */
.log-public-tag {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: #4a6a5a;
    background: rgba(127, 216, 190, 0.20);
    border: 1px solid rgba(127, 216, 190, 0.42);
}

.log-content {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    line-clamp: 6;
    overflow: hidden;
}

.log-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.log-image-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.log-image-thumb:hover {
    transform: scale(1.07);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.26);
}

.log-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.log-summary {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #4a4a6a;
    background: rgba(184, 164, 240, 0.12);
    border-left: 3px solid rgba(184, 164, 240, 0.55);
}

/* ==================== 个人中心 ==================== */
.profile-card {
    padding: 30px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-avatar {
    width: 74px;
    height: 74px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 6s ease infinite;
    box-shadow: 0 10px 26px rgba(118, 75, 162, 0.26);
}

.profile-meta {
    min-width: 0;
    flex: 1;
}

.profile-nickname {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.profile-email,
.profile-joined {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 提示卡片 */
.notice-card {
    display: flex;
    gap: 16px;
    padding: 22px 24px;
    margin-bottom: 24px;
    border-left: 4px solid transparent;
}

.notice-card.warning {
    border-left-color: rgba(255, 149, 0, 0.6);
    background: linear-gradient(120deg, rgba(255, 246, 232, 0.85), rgba(255, 255, 255, 0.7));
}

.notice-card.danger {
    border-left-color: rgba(228, 111, 119, 0.6);
    background: linear-gradient(120deg, rgba(255, 240, 240, 0.85), rgba(255, 255, 255, 0.7));
}

.notice-icon {
    font-size: 22px;
    line-height: 1.2;
}

.notice-body {
    /* flex 子项默认不收缩，需显式允许换行避免长文本溢出 */
    min-width: 0;
    flex: 1;
}

.notice-body h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 6px;
}

.notice-body p {
    font-size: 13.5px;
    line-height: 1.7;
    color: #5c5c66;
    overflow-wrap: break-word;
}

.notice-icon {
    flex-shrink: 0;
}

/* 存储占用条 */
.storage-meter {
    height: 8px;
    margin-top: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(140, 150, 190, 0.18);
}

.storage-meter-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--gradient-success);
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
    transition: width var(--transition-slow), background-image var(--transition-base);
}

.storage-meter-fill.warn { background-image: linear-gradient(135deg, #f7d08a 0%, #f0b27a 100%); }
.storage-meter-fill.danger { background-image: var(--gradient-danger); }

.storage-meter-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.action-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

/* 按钮不被压缩，宁可换行也保证文字完整 */
.action-grid > button {
    flex: 0 0 auto;
}

.action-hint {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

/* 日志汇总列表 */
.summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 460px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-base);
}

.summary-item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.16);
}

.summary-date {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 88px;
}

.summary-title {
    flex: 1;
    /* min-width: 0 是 flex 子项省略号生效的前提 */
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-imgcount {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-empty {
    padding: 30px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* ==================== 帮助页 ==================== */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.help-card {
    padding: 24px 26px;
    transition: transform var(--transition-base), box-shadow var(--transition-slow);
}

.help-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg),
                0 10px 34px rgba(102, 126, 234, 0.16),
                0 10px 44px rgba(240, 147, 251, 0.12);
}

.help-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.help-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

/* ==================== 弹窗 ==================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show { display: flex; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: overlayIn var(--transition-base) both;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    /* 淡入 + 缩放 + 光晕扩散 组合动效 */
    animation: modalPop 0.42s cubic-bezier(0.22, 1.2, 0.36, 1) both,
               modalGlow 0.85s ease-out both;
}

@keyframes modalPop {
    from { opacity: 0; transform: translateY(22px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0.30),
                    0 0 0 0 rgba(240, 147, 251, 0.24),
                    var(--shadow-xl);
    }
    60% {
        box-shadow: 0 0 0 16px rgba(118, 75, 162, 0.10),
                    0 0 60px 12px rgba(240, 147, 251, 0.18),
                    var(--shadow-xl);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0),
                    0 0 40px 4px rgba(240, 147, 251, 0.10),
                    var(--shadow-xl);
    }
}

/* 弹窗顶部彩色流光：绝对定位，不占据文档流避免标题错位 */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: var(--gradient-rainbow);
    background-size: 240% 100%;
    animation: navShimmer 7s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* 顶部留出 3px 流光条的空间 */
    padding: 22px 26px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-header h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: break-word;
}

.close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(140, 150, 190, 0.14);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-base);
}

.close-btn:hover {
    background: rgba(228, 111, 119, 0.18);
    transform: rotate(90deg);
}

.modal-body { padding: 22px 26px 26px; }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    outline: none;
    /* 统一各浏览器控件外观，避免 date/number 高度塌陷 */
    -webkit-appearance: none;
    appearance: none;
    transition: all var(--transition-base);
}

/* date / number 输入在 WebKit 下需要显式高度与内边距 */
.form-input[type="date"],
.form-input[type="number"] {
    min-height: 44px;
}

.form-input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    margin: 0;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

/* 聚焦彩色发光范围扩大 */
.form-input:focus,
.form-textarea:focus {
    background: #fff;
    border-color: rgba(118, 75, 162, 0.45);
    box-shadow:
        0 0 0 5px rgba(102, 126, 234, 0.14),
        0 0 0 10px rgba(240, 147, 251, 0.08),
        0 8px 26px rgba(118, 75, 162, 0.14);
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.65;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px dashed rgba(118, 75, 162, 0.35);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.upload-btn:hover {
    border-color: rgba(118, 75, 162, 0.6);
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.10);
    transform: translateY(-1px);
}

.upload-hint {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* 上传区容量警示 */
.upload-warning {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.7;
    color: #7a5a2e;
    background: rgba(255, 149, 0, 0.10);
    border-left: 3px solid rgba(255, 149, 0, 0.5);
    overflow-wrap: break-word;
}

.upload-warning strong {
    color: #6a4a1e;
    font-weight: 600;
}

/* 待上传图片预览 */
.batch-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
}

.batch-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.batch-preview-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    background: rgba(228, 111, 119, 0.14);
    color: #8a4a52;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.batch-preview-clear:hover {
    background: rgba(228, 111, 119, 0.24);
}

.batch-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
}

.batch-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-base);
    animation: cardEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.batch-preview-item:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.20);
}

.batch-preview-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.batch-preview-item.skipped img {
    filter: grayscale(1);
    opacity: 0.45;
}

/* 被跳过文件的占位图标 */
.batch-preview-fallback {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    font-size: 22px;
    background: rgba(228, 111, 119, 0.08);
}

.batch-preview-name {
    display: block;
    padding: 4px 6px;
    font-size: 10.5px;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-preview-item.skipped .batch-preview-name {
    color: #a8636b;
}

.batch-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
}

.batch-preview-item:hover .batch-preview-remove {
    opacity: 1;
}

.batch-preview-remove:hover {
    background: rgba(228, 111, 119, 0.9);
}

.batch-preview-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9.5px;
    line-height: 1.5;
    color: #fff;
    background: rgba(228, 111, 119, 0.85);
}

/* 批量导入图片进度提示 */
.batch-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.6;
    color: #4a4a6a;
    background: rgba(142, 197, 252, 0.12);
    border-left: 3px solid rgba(142, 197, 252, 0.55);
    overflow-wrap: break-word;
}

.batch-status.error {
    color: #8a4a52;
    background: rgba(228, 111, 119, 0.10);
    border-left-color: rgba(228, 111, 119, 0.55);
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.image-preview-item:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.22);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
}

.image-preview-item:hover .image-preview-remove { opacity: 1; }

.image-preview-remove:hover { background: rgba(228, 111, 119, 0.9); }

/* AI 区块 */
.ai-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(184, 164, 240, 0.08);
    border: 1px solid rgba(184, 164, 240, 0.22);
}

.ai-result {
    width: 100%;
    flex: 1 1 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    line-height: 1.7;
    color: #4a4a6a;
    background: rgba(255, 255, 255, 0.8);
    border-left: 3px solid rgba(184, 164, 240, 0.6);
    /* 长摘要需换行，避免溢出弹窗 */
    overflow-wrap: break-word;
    white-space: normal;
    animation: pageFadeIn 0.35s ease both;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* full-width 需要覆盖按钮基类的 inline-flex 宽度 */
.full-width {
    width: 100%;
    flex: 1 1 100%;
}

/* 批量导入预览 */
.import-preview {
    max-height: 220px;
    overflow-y: auto;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
}

.import-preview-item {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(140, 150, 190, 0.2);
}

.import-preview-item:last-child { border-bottom: none; }

.import-preview-date {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.import-preview-text { color: var(--text-secondary); }

/* ==================== 登录/注册表单 ==================== */
.auth-form { animation: pageFadeIn 0.3s ease both; }

.auth-notice {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    color: #4a4a6a;
    background: rgba(142, 197, 252, 0.14);
    border: 1px solid rgba(142, 197, 252, 0.3);
    line-height: 1.6;
}

.auth-notice code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

/* ==================== 图片预览弹窗 ==================== */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.image-viewer.show { display: flex; }

.image-viewer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: overlayIn var(--transition-base) both;
}

.image-viewer-content {
    position: relative;
    max-width: 92vw;
    max-height: 88vh;
    animation: modalPop 0.35s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.image-viewer-close {
    position: absolute;
    top: -44px;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-base);
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.image-viewer-content img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    transform: translate(-50%, 24px);
    z-index: 400;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-slow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.success {
    background: linear-gradient(135deg, rgba(90, 180, 150, 0.94), rgba(120, 195, 165, 0.94));
    box-shadow: 0 10px 30px rgba(52, 199, 89, 0.24);
}

.toast.error {
    background: linear-gradient(135deg, rgba(214, 110, 118, 0.94), rgba(208, 130, 165, 0.94));
    box-shadow: 0 10px 30px rgba(228, 111, 119, 0.24);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1080px) {
    .navbar-container { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 900px) {
    body { padding-top: 132px; }

    .navbar {
        height: auto;
        padding: 12px 0;
    }

    .navbar-container {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .navbar-right { justify-content: center; flex-wrap: wrap; }

    .logo { text-align: center; }
}

@media (max-width: 640px) {
    .main-container { padding: 22px 16px 48px; }
    .logs-container { grid-template-columns: 1fr; }
    .page-hero { padding: 28px 22px; }
    .page-hero-title { font-size: 24px; }
    .profile-card { flex-direction: column; text-align: center; }
    .page-toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-right { flex-direction: column; align-items: stretch; }
    .search-bar { justify-content: space-between; }
    .action-grid { flex-direction: column; }
    .action-grid > button { flex: 1 1 auto; width: 100%; }
    .hero-actions { flex-direction: column; }
    .hero-actions > button { width: 100%; }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer button { width: 100%; flex: 1 1 auto; }
    .upload-area { flex-direction: column; align-items: stretch; }
    .upload-btn { width: 100%; }
    .ai-block { flex-direction: column; align-items: stretch; }
    .ai-block .btn-ai { width: 100%; }
    .nav-link { padding: 7px 11px; font-size: 13px; }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 10px; height: 10px; }

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

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(140, 150, 190, 0.32);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover { background: rgba(118, 75, 162, 0.42); background-clip: content-box; }

/* ==================== 无障碍：降低动效偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .particle-canvas { display: none; }
}
