@charset "UTF-8";

/* ==========================================================================
   CHY TechArt 全站核心全局样式防线（ArtStation 克制暗黑风）
   ========================================================================== */
:root {
    --bg-main: #131313;
    --bg-card: #1c1c1c;
    --border-color: #2c2c2c;
    --text-primary: #eeeeee;
    --text-secondary: #999999;
    --text-muted: #707074;
    --accent-blue: #00b0ff;
    --accent-blue-hover: #0091ea;
    --radius-sm: 3px;
    --radius-md: 4px;
    --gap-card: 12px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding-top: 60px;
}

.error-gate {
    text-align: center;
    padding: 5rem 0;
    color: var(--text-secondary);
}

/* ==========================================================================
   共享组件：页标题（蓝色竖条 + 底边，全站唯一形态）
   ========================================================================== */
.page-header {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.page-header::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--accent-blue);
}

/* ==========================================================================
   共享组件：文字 Tab 筛选组（下划线指示，与导航栏语言一致）
   ========================================================================== */
.tabs {
    display: flex;
    gap: 1.6rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.6rem 2px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}
.tab::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.tab:hover { color: var(--text-primary); }
.tab:hover::after, .tab.active::after { transform: scaleX(1); }
.tab.active { color: #fff; }

/* ==========================================================================
   共享组件：作品卡（无边框小圆角图像卡，wf-card 为首页别名同规）
   ========================================================================== */
.art-card, .wf-card {
    position: relative;
    background: #111;
    overflow: hidden;
    cursor: pointer;
    display: block;
    text-decoration: none;
    border-radius: var(--radius-md);
}
.art-card { aspect-ratio: 4 / 3; }
.art-card img, .wf-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.art-card:hover img, .wf-card:hover img { transform: scale(1.03); }
.card-overlay, .wf-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    z-index: 10;
}
.art-card:hover .card-overlay, .wf-card:hover .wf-overlay { opacity: 1; }
.card-title, .wf-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}
.card-description, .wf-desc {
    font-size: 0.85rem;
    color: #bebec2;
    font-weight: 400;
}

/* ==========================================================================
   共享组件：按钮
   ========================================================================== */
.btn-primary, .btn-action {
    display: block;
    text-align: center;
    background: var(--accent-blue);
    color: #fff;
    border: 1px solid var(--accent-blue);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-primary:hover, .btn-action:hover {
    background: var(--accent-blue-hover);
    border-color: var(--accent-blue-hover);
}
.btn-ghost {
    display: block;
    text-align: center;
    background: #252525;
    color: #aaa;
    border: 1px solid #333;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: #333; color: #fff; }

/* ==========================================================================
   共享组件：加载 / 空状态占位
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* ==========================================================================
   共享组件：全站页脚（由 navbar.js 自动注入）
   ========================================================================== */
.site-footer {
    max-width: 1600px;
    margin: 3.5rem auto 0;
    padding: 1.8rem 4% 2.2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.site-footer .footer-links { display: flex; gap: 1.4rem; }
.site-footer .beian-icon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
}
.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.site-footer a:hover { color: #fff; }

/* ==========================================================================
   内联可视化编辑（仅 admin 激活，由 inline-edit.js 驱动）
   ========================================================================== */
.ie-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--accent-blue);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.ie-fab:hover { background: var(--accent-blue-hover); }
.ie-fab svg, .ie-pencil svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ie-fab svg { width: 20px; height: 20px; }

.ie-toolbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    z-index: 5000;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.ie-toolbar .ie-btn-save,
.ie-toolbar .ie-btn-cancel,
.ie-toolbar .ie-btn-exit {
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ie-toolbar .ie-btn-save { background: var(--accent-blue); color: #fff; border: 1px solid var(--accent-blue); }
.ie-toolbar .ie-btn-save:hover { background: var(--accent-blue-hover); border-color: var(--accent-blue-hover); }
.ie-toolbar .ie-btn-cancel, .ie-toolbar .ie-btn-exit { background: #252525; color: #aaa; border: 1px solid #333; }
.ie-toolbar .ie-btn-cancel:hover, .ie-toolbar .ie-btn-exit:hover { background: #333; color: #fff; }

.ie-editable {
    outline: 1px dashed var(--accent-blue);
    outline-offset: 3px;
    cursor: text;
}
.ie-input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-md);
    color: #fff;
    font: inherit;
    letter-spacing: inherit;
    padding: 0.3rem 0.5rem;
    outline: none;
}
textarea.ie-input { min-height: 6em; resize: vertical; line-height: 1.6; }

.ie-pencil {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: background 0.2s, color 0.2s;
}
.ie-pencil:hover { background: var(--accent-blue); color: #fff; }
.ie-pencil svg { width: 14px; height: 14px; }
/* 静态容器上的铅笔（页头等）：回归文档流内联定位 */
.ie-pencil.ie-pencil-static {
    position: static;
    display: inline-flex;
    margin-left: auto;
    flex-shrink: 0;
}


/* ==========================================================================
   极客高订：GPU 加速全站暗黑微缝滚动条
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #252525;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}
/* ==========================================================================
   极客高订：全站图片防止被选中、拖拽、长按弹出菜单
   ========================================================================== */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}
