/* ============================================================
 *  style.css  ·  GlassBlog 全局样式
 *  设计语言：Glassmorphism + 深色主题 + 渐变光晕
 * ============================================================ */

/* ---------- 导入字体 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ---------- 自定义属性 ---------- */
:root {
    --bg:              #060611;
    --bg-card:         rgba(255,255,255,0.03);
    --bg-card-hover:   rgba(255,255,255,0.06);
    --border:          rgba(255,255,255,0.07);
    --border-hover:    rgba(255,255,255,0.14);
    --blur:            24px;

    --accent:          #6366f1;
    --accent-light:    #818cf8;
    --accent-glow:     rgba(99,102,241,0.25);
    --cyan:            #06b6d4;
    --grad:            linear-gradient(135deg, var(--accent), var(--cyan));

    --text:            #eeeef5;
    --text-2:          rgba(238,238,245,0.55);
    --text-3:          rgba(238,238,245,0.30);

    --success:         #10b981;
    --warning:         #f59e0b;
    --danger:          #ef4444;

    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  24px;

    --font-h: 'Playfair Display', 'Noto Serif SC', serif;
    --font-b: 'DM Sans', 'Noto Sans SC', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-b);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
button, input, textarea, select {
    font-family: inherit; font-size: inherit; color: inherit;
    border: none; outline: none; background: none;
}
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

/* ---------- 背景光晕 ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
    position: absolute; border-radius: 50%; filter: blur(100px); opacity: .35;
    animation: orbFloat 22s ease-in-out infinite;
}
.orb-1 { width: 600px; height: 600px; background: rgba(99,102,241,.25);  top: -200px; right: -120px; }
.orb-2 { width: 500px; height: 500px; background: rgba(6,182,212,.18);   bottom: -160px; left: -100px; animation-delay: -7s; }
.orb-3 { width: 380px; height: 380px; background: rgba(168,85,247,.14);  top: 40%; left: 45%; animation-delay: -14s; }
@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(30px,-25px) scale(1.06); }
    66%     { transform: translate(-20px,18px) scale(.94); }
}

/* 噪点叠加 */
body::after {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .025;
}

/* ---------- Glass 工具类 ---------- */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.glass-strong {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--r-lg);
}

/* ---------- 导航栏 ---------- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px; height: 68px;
    background: rgba(6,6,17,.65);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid var(--border);
}
.navbar .logo {
    font-family: var(--font-h); font-size: 22px; font-weight: 700;
    background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.navbar nav { display: flex; gap: 28px; align-items: center; }
.navbar nav a {
    color: var(--text-2); font-size: 14px; font-weight: 500;
    transition: color .25s;
    position: relative;
}
.navbar nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--grad); border-radius: 1px; transition: width .3s;
}
.navbar nav a:hover, .navbar nav a.active { color: var(--text); }
.navbar nav a:hover::after, .navbar nav a.active::after { width: 100%; }

.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px; border-radius: var(--r-md); font-weight: 500; font-size: 14px;
    cursor: pointer; transition: all .3s cubic-bezier(.4,0,.2,1);
    white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-ghost {
    background: var(--bg-card); color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-hover); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--r-md); }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500;
    color: var(--text-2); letter-spacing: .02em;
}
.input, .textarea, .select {
    width: 100%; padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md); color: var(--text);
    font-size: 15px; transition: all .3s;
}
.input:focus, .textarea:focus, .select:focus {
    background: rgba(255,255,255,0.06);
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
.select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px;
}
.select option { background: #1a1a2e; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    text-align: center; padding: 100px 20px 60px;
    position: relative;
}
.hero h1 {
    font-family: var(--font-h); font-size: clamp(36px,6vw,72px);
    font-weight: 700; line-height: 1.15; margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 50%, var(--cyan) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: heroIn .8s ease-out both;
}
.hero p {
    color: var(--text-2); font-size: 18px; max-width: 560px; margin: 0 auto 36px;
    animation: heroIn .8s ease-out .15s both;
}
@keyframes heroIn { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }

/* 搜索栏 */
.search-bar {
    display: flex; max-width: 520px; margin: 0 auto 48px;
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: 50px; overflow: hidden;
    animation: heroIn .8s ease-out .3s both;
}
.search-bar input {
    flex: 1; padding: 14px 24px; background: transparent; color: var(--text);
    font-size: 15px;
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar button {
    padding: 14px 28px; background: var(--grad); color: #fff; cursor: pointer;
    font-weight: 500; transition: opacity .2s;
}
.search-bar button:hover { opacity: .85; }

/* 分类标签 */
.cat-pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.cat-pill {
    padding: 7px 18px; border-radius: 50px; font-size: 13px; font-weight: 500;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2);
    cursor: pointer; transition: all .3s;
}
.cat-pill:hover, .cat-pill.active {
    background: rgba(99,102,241,0.12); border-color: var(--accent); color: var(--accent-light);
}

/* ---------- 文章卡片网格 ---------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px; padding: 0 40px 80px; max-width: 1280px; margin: 0 auto;
}
.post-card {
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: var(--r-xl);
    overflow: hidden; cursor: pointer;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    animation: fadeUp .6s ease-out both;
}
.post-card:nth-child(2) { animation-delay: .08s; }
.post-card:nth-child(3) { animation-delay: .16s; }
.post-card:nth-child(4) { animation-delay: .24s; }
.post-card:nth-child(5) { animation-delay: .32s; }
.post-card:nth-child(6) { animation-delay: .40s; }

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99,102,241,.3);
    box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 40px var(--accent-glow);
}
.post-card .cover-wrap {
    position: relative; height: 200px; overflow: hidden;
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(6,182,212,.10));
}
.post-card .cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .cover-wrap img { transform: scale(1.05); }
.post-card .card-body { padding: 24px; }
.post-card .badge {
    display: inline-block; padding: 3px 12px; border-radius: 50px;
    font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(99,102,241,.12); color: var(--accent-light);
}
.post-card h3 {
    font-family: var(--font-h); font-size: 21px; font-weight: 600;
    margin: 12px 0 8px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .excerpt {
    color: var(--text-2); font-size: 14px; line-height: 1.65; margin-bottom: 18px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text-3);
}
.post-card .meta .author { display: flex; align-items: center; gap: 8px; }
.post-card .meta .avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--grad); display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #fff; font-weight: 600;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 文章详情 ---------- */
.post-detail { max-width: 780px; margin: 0 auto; padding: 60px 24px 100px; }
.post-detail .back-link {
    display: inline-flex; align-items: center; gap: 6px; color: var(--text-2);
    font-size: 14px; margin-bottom: 32px; transition: color .2s;
}
.post-detail .back-link:hover { color: var(--accent-light); }
.post-detail h1 {
    font-family: var(--font-h); font-size: clamp(28px,4.5vw,44px);
    font-weight: 700; line-height: 1.2; margin-bottom: 16px;
}
.post-detail .detail-meta {
    display: flex; gap: 20px; flex-wrap: wrap; color: var(--text-3); font-size: 14px; margin-bottom: 40px;
}
.post-detail .detail-meta span { display: flex; align-items: center; gap: 6px; }
.post-detail .content {
    font-size: 16.5px; line-height: 1.85; color: var(--text-2);
}
.post-detail .content h2, .post-detail .content h3 { color: var(--text); margin: 32px 0 12px; font-family: var(--font-h); }
.post-detail .content p { margin-bottom: 18px; }
.post-detail .content code {
    background: rgba(99,102,241,.1); padding: 2px 7px; border-radius: 4px;
    font-size: .9em; font-family: 'DM Mono', monospace;
}
.post-detail .content pre {
    background: rgba(0,0,0,.35); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 20px; overflow-x: auto; margin: 24px 0;
}
.post-detail .content img { border-radius: var(--r-md); margin: 24px 0; }
.post-detail .content blockquote {
    border-left: 3px solid var(--accent); padding: 12px 20px; margin: 24px 0;
    background: rgba(99,102,241,.06); border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--text-2); font-style: italic;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex; gap: 8px; justify-content: center; padding: 20px 0 60px;
}
.pagination button {
    width: 40px; height: 40px; border-radius: var(--r-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-2); cursor: pointer; font-size: 14px; transition: all .25s;
}
.pagination button:hover, .pagination button.active {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.pagination button:disabled { opacity: .3; cursor: default; }

/* ---------- Footer ---------- */
.footer {
    text-align: center; padding: 32px; color: var(--text-3); font-size: 13px;
    border-top: 1px solid var(--border);
}

/* ---------- 登录 / 注册页 ---------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
    width: 100%; max-width: 440px; padding: 48px 40px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-xl);
    animation: fadeUp .6s ease-out;
}
.auth-card .auth-logo {
    text-align: center; font-family: var(--font-h); font-size: 28px; font-weight: 700;
    background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.auth-card .auth-sub { text-align: center; color: var(--text-3); font-size: 14px; margin-bottom: 32px; }
.auth-card .auth-toggle { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-3); }
.auth-card .auth-toggle a { color: var(--accent-light); cursor: pointer; }
.auth-card .auth-toggle a:hover { text-decoration: underline; }
.auth-card .error-msg {
    background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
    border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px;
    color: var(--danger); font-size: 13px; display: none;
}
.auth-card .error-msg.show { display: block; }

/* ---------- 仪表盘 ---------- */
.dash-layout {
    display: grid; grid-template-columns: 260px 1fr; min-height: 100vh;
}

/* 侧边栏 */
.dash-sidebar {
    position: sticky; top: 0; height: 100vh; padding: 28px 20px;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.dash-sidebar .sidebar-logo {
    font-family: var(--font-h); font-size: 22px; font-weight: 700;
    background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 36px; padding: 0 8px;
}
.dash-sidebar .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 500;
    color: var(--text-2); cursor: pointer; transition: all .25s; margin-bottom: 4px;
}
.dash-sidebar .nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.dash-sidebar .nav-item.active {
    background: rgba(99,102,241,0.1); color: var(--accent-light);
    border-left: 3px solid var(--accent);
}
.dash-sidebar .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer {
    margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2);
}
.sidebar-footer .user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--grad); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px; color: #fff;
}

/* 主内容 */
.dash-main { padding: 32px 40px; }
.dash-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px;
}
.dash-header h1 {
    font-family: var(--font-h); font-size: 28px; font-weight: 600;
}

/* 统计卡片 */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; margin-bottom: 36px;
}
.stat-card {
    padding: 24px; border-radius: var(--r-lg);
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); transition: all .3s;
    animation: fadeUp .5s ease-out both;
}
.stat-card:nth-child(2) { animation-delay: .06s; }
.stat-card:nth-child(3) { animation-delay: .12s; }
.stat-card:nth-child(4) { animation-delay: .18s; }
.stat-card:nth-child(5) { animation-delay: .24s; }
.stat-card:nth-child(6) { animation-delay: .30s; }
.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; font-size: 20px;
}
.stat-card .stat-icon.purple { background: rgba(99,102,241,.12); color: var(--accent-light); }
.stat-card .stat-icon.green  { background: rgba(16,185,129,.12); color: var(--success); }
.stat-card .stat-icon.amber  { background: rgba(245,158,11,.12); color: var(--warning); }
.stat-card .stat-icon.cyan   { background: rgba(6,182,212,.12); color: var(--cyan); }
.stat-card .stat-icon.red    { background: rgba(239,68,68,.12); color: var(--danger); }
.stat-card .stat-num {
    font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 4px;
    font-family: var(--font-h);
}
.stat-card .stat-label { font-size: 13px; color: var(--text-3); }

/* 表格 */
.table-wrap {
    background: var(--bg-card); backdrop-filter: blur(20px);
    border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th {
    text-align: left; padding: 14px 20px; font-size: 12px; font-weight: 600;
    color: var(--text-3); text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.table-wrap td {
    padding: 14px 20px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.table-wrap tr:hover td { background: rgba(255,255,255,0.02); }
.status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 50px;
    font-size: 12px; font-weight: 500;
}
.status-badge.published { background: rgba(16,185,129,.12); color: var(--success); }
.status-badge.draft     { background: rgba(245,158,11,.12); color: var(--warning); }
.status-badge.archived  { background: rgba(255,255,255,.06); color: var(--text-3); }
.action-btns { display: flex; gap: 6px; }

/* 媒体网格 */
.media-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px; margin-top: 20px;
}
.media-item {
    border-radius: var(--r-md); overflow: hidden; position: relative;
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all .3s; aspect-ratio: 1;
}
.media-item:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.media-item img, .media-item .file-icon {
    width: 100%; height: 100%; object-fit: cover;
}
.media-item .file-icon {
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: var(--text-3);
}
.media-item .media-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.6);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; opacity: 0; transition: opacity .3s;
}
.media-item:hover .media-overlay { opacity: 1; }
.media-item .media-name {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 8px 10px; font-size: 11px; color: var(--text-2);
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 上传区域 */
.upload-zone {
    border: 2px dashed rgba(255,255,255,0.1); border-radius: var(--r-lg);
    padding: 48px; text-align: center; cursor: pointer;
    transition: all .3s; margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent); background: rgba(99,102,241,0.05);
}
.upload-zone .upload-icon { font-size: 48px; margin-bottom: 12px; color: var(--text-3); }
.upload-zone p { color: var(--text-2); font-size: 14px; }
.upload-zone .hint { color: var(--text-3); font-size: 12px; margin-top: 8px; }

/* 上传进度 */
.upload-progress {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 12px;
}
.upload-progress .prog-header {
    display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px;
}
.upload-progress .prog-header .name { color: var(--text); font-weight: 500; }
.upload-progress .prog-header .pct  { color: var(--accent-light); }
.progress-bar {
    height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.progress-bar .progress-fill {
    height: 100%; background: var(--grad); border-radius: 3px;
    transition: width .3s ease; width: 0;
}
.upload-progress .prog-detail { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* 编辑器 */
.editor-wrap { margin-bottom: 20px; }
.editor-toolbar {
    display: flex; gap: 4px; padding: 8px 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-bottom: none; border-radius: var(--r-md) var(--r-md) 0 0;
}
.editor-toolbar button {
    width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
    color: var(--text-2); display: flex; align-items: center; justify-content: center;
    transition: all .2s; font-size: 14px;
}
.editor-toolbar button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.editor-wrap .textarea {
    border-radius: 0 0 var(--r-md) var(--r-md); min-height: 360px;
    font-family: 'DM Mono', 'Fira Code', monospace; font-size: 14px; line-height: 1.8;
}

/* Toast */
.toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    padding: 14px 20px; border-radius: var(--r-md); font-size: 14px;
    backdrop-filter: blur(20px); border: 1px solid var(--border);
    animation: toastIn .4s ease-out; min-width: 280px;
    display: flex; align-items: center; gap: 10px;
}
.toast.success { background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.3); color: var(--success); }
.toast.error   { background: rgba(239,68,68,.15);  border-color: rgba(239,68,68,.3);  color: var(--danger); }
.toast.info    { background: rgba(99,102,241,.15);  border-color: rgba(99,102,241,.3);  color: var(--accent-light); }
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* Modal */
.modal-mask {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.6); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal-box {
    background: #12121f; border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 32px; max-width: 480px; width: 100%;
    animation: fadeUp .3s ease-out;
}
.modal-box h3 { font-family: var(--font-h); font-size: 20px; margin-bottom: 12px; }
.modal-box p { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* 空状态 */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar {
        position: fixed; left: -280px; z-index: 200; width: 260px;
        transition: left .3s;
    }
    .dash-sidebar.open { left: 0; }
    .dash-main { padding: 20px; }
    .mobile-menu-btn { display: flex !important; }
    .posts-grid { grid-template-columns: 1fr; padding: 0 16px 60px; }
    .navbar { padding: 0 16px; }
    .navbar nav { display: none; }
}
.mobile-menu-btn { display: none; }

/* ---------- 加载骨架 ---------- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
