:root {
    --theme-color: #0078D4; /* 核心：微软蓝 #0078D4 */
    --theme-hover: #005a9e; /* 优化：官方配套同色系深蓝，提供完美的悬停反馈 */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 12px;
    --radius-md: 8px;
    
    /* 升级：优化阴影体系，使其透明度更低、扩散更大、隐隐约约更显高级 */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.03);
}

/* 只要 Vue 还没加载完，带有 v-cloak 属性的容器一律隐藏，防止代码闪现 */
[v-cloak] {
    display: none !important;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

body { 
    background-color: var(--bg-main); 
    color: var(--text-primary); 
    line-height: 1.5; 
    padding-bottom: 60px; 
    -webkit-font-smoothing: antialiased; /* 让文字渲染更精致不发虚 */
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 导航栏 ==================== */
/* 升级：加入了高级感毛玻璃半透明效果 */
.navbar-wrapper { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
}

.navbar { 
    max-width: 800px; 
    margin: 0 auto; 
    height: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 16px; 
}

/* Logo 核心流光设计 */
.logo { 
    font-weight: 800; 
    font-size: 1.2rem; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    -webkit-tap-highlight-color: transparent !important; 
    position: relative;
    
    /* 1. 设置流光渐变背景：两边是高档深灰(#1e293b)，中间夹一道白色闪光 */
    background: linear-gradient(
        110deg, 
        #1e293b 0%, 
        #1e293b 40%, 
        #ffffff 50%, 
        #1e293b 60%, 
        #1e293b 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    
    /* 2. 核心：将背景裁剪到文字上，并使原本文字透明 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 3. 动画：默认每隔 5 秒自动闪烁一次 */
    animation: logoShine 5s ease-in-out infinite;
    transition: opacity 0.2s;
}

/* 确保网站名字完美继承流光效果 */
.logo span {
    color: inherit !important;
}

/* 鼠标悬停时，文字稍微变淡提供点击反馈，并同样支持流光触发 */
.logo:hover { 
    opacity: 0.8;
}

/* 清除点击后的各种边框与黑框 */
.logo:focus, .logo:active { 
    outline: none !important; 
    background-color: transparent !important; 
    box-shadow: none !important; 
}

/* Logo 图片进行隔离保护，防止被文字裁剪流光给滤透明 */
.logo img { 
    height: 32px; 
    width: 32px; 
    border-radius: 50% !important; 
    object-fit: cover !important; 
    flex-shrink: 0;
    aspect-ratio: 1;
    -webkit-text-fill-color: initial; /* 核心：阻断文字透明，保持图片原色 */
}

.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}


/* ==================== 容器与卡片 ==================== */
.container { 
    max-width: 800px; 
    margin: 24px auto; /* 略微加大间距增强呼吸感 */
    padding: 0 16px; 
}

/* 升级：主搜索框增加了丝滑的聚焦呼吸发光效果 */
.main-search-card { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    padding: 4px 18px; 
    display: flex; 
    align-items: center; 
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--border-color); 
    margin-bottom: 20px; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-search-card:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.15), var(--shadow-md); /* 已同步微软蓝发光圈 */
    background: #ffffff;
}

.main-search-input { 
    flex: 1; 
    border: none; 
    outline: none; 
    padding: 12px 8px; 
    font-size: 0.98rem; 
    background: transparent; 
    color: var(--text-primary);
}
.main-search-input::placeholder {
    color: #94a3b8;
}

.main-search-clear { 
    border: none; 
    background: transparent; 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    cursor: pointer; 
    transition: color 0.2s;
}
.main-search-clear:hover {
    color: var(--text-primary);
}

/* 升级：卡片增加了极其微弱的浮起动画，让社区信息流更显灵动 */
.card { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color); 
    padding: 24px; /* 扩展到 24px 排版更大气 */
    margin-bottom: 16px; 
    box-shadow: var(--shadow-sm); 
    position: relative; 
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 14px; 
}

.card-user { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

/* 升级：强力保护头像，在大/小屏幕被挤压时绝对不变形 */
.avatar { 
    border-radius: 50%; 
    object-fit: cover; 
    background: #f1f5f9; 
    flex-shrink: 0 !important; 
    aspect-ratio: 1 / 1;
}

.user-meta { 
    display: flex; 
    flex-direction: column; 
    gap: 2px;
}

.user-meta strong { 
    font-size: 0.95rem; 
    color: var(--text-primary); 
    font-weight: 600;
}

.card-time { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
}

.card-content { 
    font-size: 0.98rem; 
    color: var(--text-primary); 
    word-break: break-all; 
    white-space: pre-wrap; 
    margin-bottom: 16px; 
}


/* ==================== 按钮及交互（全体系触觉回馈） ==================== */
.btn { 
    background: var(--theme-color); 
    color: #fff; 
    border: none; 
    padding: 8px 18px; 
    border-radius: var(--radius-md); 
    font-weight: 500; 
    cursor: pointer; 
    font-size: 0.88rem; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 2px 4px rgba(0, 120, 212, 0.08); /* 已同步微软蓝发光圈 */
}

.btn:hover { 
    background: var(--theme-hover); 
    transform: translateY(-0.5px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.16); /* 已同步微软蓝发光圈 */
}

.btn:active {
    transform: translateY(0) scale(0.97); /* 点击时轻微压缩反冲，质感极佳 */
}

.btn-sub { 
    background: #f1f5f9; 
    color: var(--text-primary); 
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-sub:hover { 
    background: #e2e8f0; 
    color: var(--text-primary);
    box-shadow: none;
}

.btn-danger { 
    background: #ef4444; 
    color: #fff; 
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.btn-danger:hover { 
    background: #dc2626; 
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.action-btn-sm { 
    background: transparent; 
    border: none; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    font-weight: 500;
    cursor: pointer; 
    padding: 4px 8px; 
    border-radius: 6px; 
    transition: all 0.2s ease;
}

.action-btn-sm:hover { 
    background: rgba(0, 120, 212, 0.08); /* 优化：悬停底色改为微弱微软蓝，更加协调 */
    color: var(--theme-color); 
}


/* ==================== 回复系统 ==================== */
.replies { 
    background: #f8fafc; 
    border-radius: var(--radius-md); 
    padding: 14px 16px; 
    margin-bottom: 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    border: 1px solid rgba(226, 232, 240, 0.6); /* 微弱修饰边框线 */
}

/* 升级：丢弃低级廉价的虚线，采用大厂最爱的高档微实线 */
.reply-item { 
    font-size: 0.88rem; 
    border-bottom: 1px solid #edf2f7; 
    padding-bottom: 10px; 
}

.reply-item:last-child { 
    border-bottom: none; 
    padding-bottom: 0; 
}

.reply-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 6px; 
}

.reply-user { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.reply-time { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
}

.reply-content { 
    padding-left: 24px; /* 精准对齐头像下方 */
    color: #334155; 
    word-break: break-all; 
    line-height: 1.6;
}

.card-reply-box { 
    display: flex; 
    gap: 8px; 
    margin-top: 14px; 
}

/* 升级：小回复框聚焦也增加呼吸发光圈 */
.inline-reply-input { 
    flex: 1; 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    padding: 8px 14px; 
    font-size: 0.88rem; 
    outline: none; 
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.inline-reply-input:focus { 
    border-color: var(--theme-color); 
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15); /* 已同步微软蓝发光圈 */
    background: #ffffff;
}

.inline-reply-fake { 
    width: 100%; 
    text-align: center; 
    background: #f1f5f9; 
    color: var(--text-muted); 
    padding: 10px; 
    border-radius: var(--radius-md); 
    font-size: 0.85rem; 
    font-weight: 500;
    cursor: pointer; 
    transition: all 0.15s ease;
}
.inline-reply-fake:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}


/* ==================== 菜单下拉 ==================== */
.hamburger-container { 
    position: relative; 
}

/* 升级：加上小菜单展开时的微缩放动画，顺滑自然 */
.hamburger-menu { 
    position: absolute; 
    right: 0; 
    top: 36px; 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-lg); 
    width: 150px; 
    z-index: 60; 
    display: flex; 
    flex-direction: column; 
    padding: 4px; 
    transform-origin: top right;
    animation: slideUp 0.15s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

.hamburger-menu button { 
    border: none; 
    background: transparent; 
    padding: 10px 12px; 
    text-align: left; 
    font-size: 0.85rem; 
    font-weight: 500;
    cursor: pointer; 
    border-radius: 6px; 
    color: #475569; 
    transition: all 0.15s ease;
}

.hamburger-menu button:hover { 
    background: #f1f5f9; 
    color: var(--text-primary);
}


/* ==================== 模态框主流设计 ==================== */
.modal-overlay { 
    position: fixed; 
    top:0; 
    left:0; 
    right:0; 
    bottom:0; 
    background: rgba(15, 23, 42, 0.4); /* 适当减弱背景黑度，配合模糊更有高级质感 */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 100; 
    opacity: 0;
    animation: fadeIn 0.2s ease forwards; 
}

.modal { 
    background: var(--bg-card); 
    border-radius: var(--radius-lg); 
    width: 100%; 
    max-width: 500px; 
    max-height: 85vh; 
    overflow-y: auto; 
    box-shadow: var(--shadow-lg); 
    border: 1px solid rgba(15, 23, 42, 0.04); 
    display: flex; 
    flex-direction: column; 
    transform: scale(0.95) translateY(10px);
    animation: slideUp 0.25s cubic-bezier(0.34, 1.4, 0.64, 1) forwards; /* 大厂最爱的弹性贝塞尔 */
}

.modal-header { 
    padding: 18px 24px; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.modal-title { 
    font-weight: 700; 
    font-size: 1.05rem; 
    color: var(--text-primary);
}

.modal-close { 
    border:none; 
    background:transparent; 
    font-size:1.4rem; 
    cursor:pointer; 
    color:var(--text-muted); 
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--text-primary);
}

.modal-body { 
    padding: 24px; 
    overflow-y: auto; 
}

.modal-footer { 
    padding: 14px 24px; 
    border-top: 1px solid var(--border-color); 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    background: #f8fafc; /* 与大厂统一，底部区域用清爽冷灰底色格离开 */
}


/* ==================== 表单控件 ==================== */
.form-group { 
    margin-bottom: 16px; 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.form-group label { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #475569; 
}

.form-control { 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); 
    padding: 10px 14px; 
    font-size: 0.9rem; 
    outline: none; 
    width: 100%; 
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus { 
    border-color: var(--theme-color); 
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15); /* 已同步微软蓝发光圈 */
}


/* ==================== 原生 Toast ==================== */
.toast-container { 
    position: fixed; 
    top: 24px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 999; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    align-items: center; 
    pointer-events: none; 
}

.toast { 
    background: rgba(15, 23, 42, 0.95); /* 沉稳黑 */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff; 
    padding: 10px 24px; 
    border-radius: 50px; 
    font-size: 0.88rem; 
    font-weight: 500; 
    box-shadow: var(--shadow-lg); 
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; /* 带有弹性活力的登场 */
    white-space: nowrap; 
    pointer-events: auto; 
}


/* ==================== 骨架屏加载 ==================== */
.skeleton { 
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%); 
    background-size: 400% 100%; 
    animation: skeletonLoading 1.4s ease infinite; 
}

.sk-avatar { 
    width: 34px; 
    height: 34px; 
    border-radius: 50%; 
    flex-shrink: 0;
    aspect-ratio: 1;
}

.sk-line { 
    height: 12px; 
    border-radius: 4px; 
}


/* ==================== 控制台选项卡 ==================== */
.tabs { 
    display: flex; 
    gap: 4px; 
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 16px; 
}

.tab-btn { 
    border: none; 
    background: transparent; 
    padding: 8px 16px; 
    cursor: pointer; 
    font-size: 0.88rem; 
    color: var(--text-muted); 
    font-weight: 500; 
    border-bottom: 2px solid transparent; 
    transition: all 0.2s ease;
}
.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active { 
    color: var(--theme-color); 
    border-bottom-color: var(--theme-color); 
    font-weight: 600;
}

.footer { 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    padding: 32px 0; 
    border-top: 1px solid rgba(226, 232, 240, 0.5); /* 底部追加轻量分割线更显规范 */
    max-width: 800px;
    margin: 0 auto;
}


/* ==================== 动画定义 ==================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: scale(0.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-15px) scale(0.93); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes skeletonLoading { 0% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* 白光扫过动画关键帧 */
@keyframes logoShine {
    0% { background-position: 100% 0; }
    20% { background-position: -100% 0; }  /* 前 20% 时间完成扫光动作 */
    100% { background-position: -100% 0; } /* 剩余时间静止，形成间隔停顿感 */
}


/* ==================== 移动端媒体查询 ==================== */
@media(max-width:760px){
    /* 将 96% 更改为 90%，使两边多出精致留白 */
    .navbar, .container {
        width: 92% !important; /* 修正为 92% 可以留出恰到好处的边距，防止字挤压 */
        margin: 0 auto !important;
    }
    .card {
        padding: 16px 14px !important; /* 加固：手机上内边距不要缩得太死，保持呼吸感 */
        margin-bottom: 12px !important;
        border-radius: var(--radius-lg) !important;
    }
    .main-search-card {
        padding: 6px 14px !important;
        margin-bottom: 16px !important;
        border-radius: var(--radius-md) !important; /* 保持设计一致性 */
    }
    .main-search-card span {
        font-size: 0.9rem !important;
    }
    .main-search-input {
        font-size: 0.9rem !important;
        height: auto !important;
    }
    .main-search-clear {
        font-size: 1.1rem !important;
    }
    .modal {
        width: 92% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        padding: 0 !important; /* 维持 Flex 内部填充布局 */
    }
}