/* LeonZone static theme CSS — extracted from theme.php for browser caching */

* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; list-style: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background-color: var(--bg-color); }
html[data-theme="dark"] { background-color: var(--bg-color); }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background-color: var(--bg-color); color: var(--text-color);
    overflow-x: hidden; max-width: 100vw; min-height: 100vh;
}

/* ─── 全局滚动条（浅色模式透明轨道 + 浅灰滑块，暗色模式浅白滑块） ───
   文档滚动条（html）单独切到 webkit 自定义样式（下方 html 规则以更高优先级覆盖 * 的 thin），
   使 track 玻璃渐变生效：顶部 60px 用半透明 var(--nav-bg)，叠在画布基色（--bg-color）上，
   与固定顶栏的磨砂玻璃完全同色，让顶栏延伸到屏幕物理右缘（填满滚动条槽 gutter）；
   60px 以下透明，透出画布基色即页面背景。track 背景锚定视口、不随内容滚动。
   内部滚动元素仍走 * 规则的 thin 标准滚动条，不受影响。 */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:linear-gradient(180deg, var(--nav-bg) 0, var(--nav-bg) 60px, transparent 60px); }
::-webkit-scrollbar-thumb { background:rgba(0,0,0,.15); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,.25); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background:rgba(255,255,255,.15); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,.25); }
* { scrollbar-width:thin; scrollbar-color:rgba(0,0,0,.15) transparent; }
[data-theme="dark"] * { scrollbar-color:rgba(255,255,255,.15) transparent; }
/* 文档滚动条改用 webkit 自定义：scrollbar-width/color 须同时为 auto，否则 Chromium 仍走标准路径忽略 ::-webkit-scrollbar */
html { scrollbar-width:auto; scrollbar-color:auto; }
/* Firefox 不支持 ::-webkit-scrollbar：文档滚动条保持 thin 样式，否则回退成默认宽滚动条 */
@supports (-moz-appearance:none) {
    html { scrollbar-width:thin; scrollbar-color:rgba(0,0,0,.15) transparent; }
    html[data-theme="dark"] { scrollbar-color:rgba(255,255,255,.15) transparent; }
}

/* 导航栏 — 不使用 backdrop-filter，消除滚动时 GPU 每帧模糊重算 */
.lz-header {
    position: fixed; top: 0; width: 100%; height: 60px;
    padding-top: env(safe-area-inset-top);
    background: var(--nav-bg);
    z-index: 9999; border-bottom: 1px solid var(--glass-border);
    display: flex; justify-content: stretch;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
/* 导航栏微光（进场单次扫过，不使用 infinite 避免持续主线程重绘） */
.lz-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(100, 149, 237, 0.5), rgba(147, 112, 219, 0.3), rgba(72, 209, 204, 0.5), transparent);
    background-size: 200% 100%;
    animation: navShimmer 4s linear 1 forwards;
}
@keyframes navShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.lz-nav-wrap {
    width: 100%; max-width: none; display: flex;
    justify-content: space-between; align-items: center;
    padding: 0 24px; height: 100%; overflow: visible;
}
.lz-nav-wrap > div:first-child { min-width: 0; }
.lz-user-area { margin-left: auto; }
.lz-logo { font-size: 20px; font-weight: 700; color: var(--brand-blue); letter-spacing: 1px; }
.lz-logo:hover { opacity: 0.8; }
.lz-backhome {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--brand-blue); font-weight: 600;
    padding: 6px 12px; border-radius: 8px;
    transition: background 0.2s ease, opacity 0.2s ease;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(100, 149, 237, 0.2);
}
.lz-backhome:hover { background: rgba(100,149,237,0.1); opacity: 0.85; }
.lz-backhome svg { width: 16px; height: 16px; }

/* 用户区 */
.lz-user-area { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lz-user-area a { color: var(--text-color); font-size: 13px; font-weight: 500; text-decoration: none; }
.lz-user-area a:hover { color: var(--brand-blue); }
.lz-user-capsule {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 8px; border-radius: 980px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border); text-decoration: none;
    color: var(--text-color); white-space: nowrap; transition: border-color 0.2s;
}
.lz-user-capsule:hover { border-color: var(--brand-blue); color: var(--text-color); }
.lz-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--glass-border); flex-shrink: 0; }
.lz-avatar-preset { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; overflow: hidden; border: 1.5px solid var(--glass-border); background: transparent; }
.lz-avatar-preset .preset-avatar-art { width: 100%; height: 100%; display: block; border-radius: 50%; }
.lz-avatar-wrap { position: relative; display: inline-flex; }
.lz-unread-dot {
    position: absolute; top: -1px; right: -1px;
    width: 8px; height: 8px; background: #ff3b30;
    border-radius: 50%; border: 1.5px solid var(--nav-bg);
    box-shadow: 0 0 0 1px rgba(255,59,48,0.3);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

/* 内容区 */
.lz-main { padding-top: calc(80px + env(safe-area-inset-top)); max-width: 1100px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* 玻璃拟态卡片 */
.lz-card {
    background: var(--card-bg); backdrop-filter: saturate(180%);
    -webkit-backdrop-filter: saturate(180%);
    border-radius: 18px; padding: 24px;
    box-shadow: var(--card-shadow); border: 1px solid var(--glass-border);
}

/* 按钮 */
.lz-btn {
    background: var(--brand-blue); color: #fff; border: none;
    padding: 10px 22px; border-radius: 980px; font-weight: 600;
    cursor: pointer; text-decoration: none; display: inline-block;
    font-size: 14px; text-align: center; transition: opacity 0.2s ease, transform 0.2s ease;
}
.lz-btn:hover { opacity: 0.9; transform: scale(1.02); }
.lz-btn-sub { background: transparent; color: var(--text-color); border: 1px solid var(--glass-border); }

/* 表单 */
.lz-input, .lz-textarea, .lz-select {
    width: 100%; padding: 12px 16px; margin: 8px 0;
    border: 1px solid var(--glass-border); border-radius: 12px;
    background: var(--bg-color); color: var(--text-color);
    font-size: 16px; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lz-input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(0,102,204,0.1); }

/* Feather 图标对齐 — 消除 291 处内联 vertical-align */
svg[width="1em"] { vertical-align: -2px; margin-right: 4px; }

/* Admin 紧凑表单样式 */
.lz-admin-input {
    width: 100%; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--glass-border); background: var(--bg-color);
    color: var(--text-color); font-size: 13px; box-sizing: border-box;
}
.lz-admin-input:focus { border-color: var(--brand-blue); outline: none; }
.lz-admin-label {
    font-size: 12px; font-weight: 600; color: var(--text-color);
    display: block; margin-bottom: 6px;
}

/* 文本工具类 */
.text-secondary { color: var(--text-secondary); }
.text-danger { color: #ff3b30; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-13 { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mono { font-family: monospace; }
.font-semibold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.d-inline { display: inline; }

/* 布局工具类 */
.hidden { display: none; }
.flex-1 { flex: 1; min-width: 0; }
.w-full { width: 100%; }
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ============================================================
   全站统一文件上传按钮 (Apple-style pill, brand-blue primary)
   ------------------------------------------------------------
   原生 <input type="file"> 的 "Choose File" 与品牌风格不一致，
   这里通过 ::file-selector-button 和 ::-webkit-file-upload-button
   两个伪元素一次性接管所有可见的 file input（含动态生成）。
   隐藏的 (display:none) 用作触发器的不受影响。
   ============================================================ */
input[type="file"] {
    font-family: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 8px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--card-bg);
    max-width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease;
    line-height: 1.4;
}
input[type="file"]:hover { border-color: var(--brand-blue); }
input[type="file"]:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--brand-blue);
    border: none;
    padding: 7px 16px;
    border-radius: 980px;
    margin-right: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover { opacity: 0.88; transform: scale(1.02); }
input[type="file"]::file-selector-button:active,
input[type="file"]::-webkit-file-upload-button:active { opacity: 0.78; transform: scale(0.98); }
input[type="file"]:disabled,
input[type="file"][disabled] { opacity: 0.55; cursor: not-allowed; }
input[type="file"]:disabled::file-selector-button,
input[type="file"][disabled]::file-selector-button,
input[type="file"]:disabled::-webkit-file-upload-button,
input[type="file"][disabled]::-webkit-file-upload-button {
    background: var(--glass-border); color: var(--text-secondary); cursor: not-allowed; transform: none;
}
/* 数字输入框 — 全站统一隐藏原生 spinner（设计规范 §7.6 衍生：input[type=number] 默认 spinner 与玻璃风格不协调） */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* 表格 */
.lz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lz-table th { text-align: left; padding: 12px; border-bottom: 2px solid var(--glass-border); color: var(--text-secondary); font-weight: 600; }
.lz-table td { padding: 12px; border-bottom: 1px solid var(--glass-border); }

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.lz-fade-in { animation: fadeInUp 0.6s ease forwards; }

/* 局域网提示条 */
.lz-lan-banner {
    position: fixed; top: 60px; left: 0; right: 0; z-index: 9999;
    background: rgba(255, 193, 7, 0.15); border-bottom: 1px solid rgba(255, 193, 7, 0.3);
    padding: 8px 20px; font-size: 13px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lz-lan-banner a { color: var(--brand-blue); font-weight: 600; text-decoration: underline; }
.lz-lan-banner button { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* 管理后台齿轮按钮 */
.lz-admin-gear {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--card-bg, rgba(255,255,255,0.1));
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-color);
    transition: background 0.3s ease, transform 0.3s ease; flex-shrink: 0;
}
.lz-admin-gear:hover {
    background: rgba(100, 149, 237, 0.15);
    transform: rotate(90deg);
}

/* 主题切换按钮 */
.theme-toggle {
    cursor: pointer; border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    outline: none; color: var(--text-color);
    border: 1px solid var(--glass-border);
    transition: background 0.3s ease, transform 0.3s ease; flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(100, 149, 237, 0.2);
    transform: rotate(15deg) scale(1.1);
}
[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.08);
}

/* 弹窗公告 */
.lz-popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lz-popup-overlay.show { opacity: 1; pointer-events: auto; }
.lz-popup-box { background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 28px; max-width: 480px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); transform: translateY(20px); transition: transform 0.3s; }
.lz-popup-overlay.show .lz-popup-box { transform: translateY(0); }
.lz-popup-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.lz-popup-time { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }
.lz-popup-content { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }
.lz-popup-btn { background: var(--accent); color: #fff; border: none; padding: 10px 24px; border-radius: 980px; font-weight: 600; cursor: pointer; font-size: 14px; }

/* 移动端 */
@media (max-width: 768px) {
    .lz-header { height: 52px; }
    .lz-nav-wrap { padding: 0 12px; }
    .lz-main { padding-top: calc(64px + env(safe-area-inset-top)); padding-left: 12px; padding-right: 12px; }
    .lz-card { padding: 16px; border-radius: 18px; }
    .lz-lan-banner { font-size: 12px; padding: 6px 12px; top: 52px; }
    .lz-logo { font-size: 17px; }
    .lz-backhome { font-size: 13px; padding: 8px 14px; }
    .lz-backhome svg { width: 14px; height: 14px; }
    .lz-user-area { gap: 8px; }
    .lz-user-area a { font-size: 12px; }
    .lz-user-capsule { padding: 4px 8px 4px 6px; }
    .lz-user-capsule > span:last-child { display: none; }
    .lz-avatar, .lz-avatar-preset { width: 24px; height: 24px; }
    .lz-avatar-preset .preset-avatar-art { width: 100%; height: 100%; }
    .lz-btn { padding: 10px 18px; font-size: 14px; border-radius: 12px; }
    .lz-input, .lz-textarea, .lz-select { padding: 10px 14px; font-size: 16px; border-radius: 10px; }
    .lz-table th, .lz-table td { padding: 10px 8px; font-size: 13px; }
    /* 弹窗公告 */
    .lz-popup-box { width: 92%; padding: 22px 18px; border-radius: 16px; }
    .lz-popup-title { font-size: 16px; }
    .lz-popup-content { font-size: 14px; }
    .theme-toggle, .lz-admin-gear { min-width: 44px; min-height: 44px; }
    .lz-user-area a { min-height: 44px; display: inline-flex; align-items: center; }
    .lz-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 430px) {
    .lz-header { height: 48px; }
    .lz-main { padding-top: calc(58px + env(safe-area-inset-top)); padding-left: 10px; padding-right: 10px; }
    .lz-card { padding: 14px; border-radius: 12px; }
    .lz-lan-banner { top: 48px; padding: 5px 10px; font-size: 11px; }
    .lz-logo { font-size: 16px; }
    .lz-nav-wrap { padding: 0 10px; }
}

/* 触屏防 sticky-hover:装饰性 hover 仅在真 hover 设备生效 */
@media (hover: none) {
    .lz-btn:hover { filter: none; transform: none; }
    .lz-nav-link:hover { background: transparent; }
    .lz-card:hover { transform: none; box-shadow: none; }
}
