/* =====================================================
   VK - Valorant Box · 全透明毛玻璃主题 (Glassmorphism)
   原则：body 透明露出全屏背景图；所有面板仅用 rgba + backdrop-filter
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --red: #ff4655;
    --red-h: #ff6b78;
    --glass: rgba(255,255,255,0.06);
    --glass-2: rgba(255,255,255,0.10);
    --line: rgba(255,255,255,0.12);
    --line-h: rgba(255,70,85,0.5);
    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.6);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: transparent !important;   /* 关键：透出全屏背景图 */
    color: var(--text);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============ 全屏背景图 ============ */
#siteBg {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    z-index: -999 !important;
    overflow: hidden;
}
#siteBg img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    user-select: none !important;
}
/* 暗色遮罩：让背景不过曝、文字可读；想更透就把 0.40 调小 */
.bg-overlay { position: absolute; inset: 0; background: rgba(8,8,14,0.40); }

/* ============ 通用玻璃面板 ============ */
.card, .box, .panel, .login-box, .drop-zone {
    background: var(--glass) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
}

/* ============ 顶部导航 ============ */
.navbar, .site-header {
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(24px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.3) !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 14px 0;
}
.header-inner, .nav-links {
    max-width: 1400px; margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo, .logo-text {
    font-size: 24px; font-weight: 900; color: #fff; letter-spacing: 3px;
}
.logo.glitch { position: relative; display: inline-block; }
.nav-links a, .nav-link {
    color: var(--text); text-decoration: none; font-size: 14px; margin-left: 18px; transition: color .2s;
}
.nav-links a:hover, .nav-link:hover { color: #fff; }
.btn-small, .view-site {
    padding: 6px 14px; border: 1px solid rgba(255,70,85,0.6); border-radius: 6px;
    color: #fff !important; font-size: 13px;
}

/* ============ Hero ============ */
.hero { text-align: center; padding: 56px 20px 40px; background: transparent !important; }
.hero-title {
    font-size: 48px; font-weight: 900; color: #fff; letter-spacing: 6px; margin-bottom: 12px;
    text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.hero-desc { font-size: 15px; color: var(--muted); }

/* ============ 公告横条 ============ */
.update-banner, .announcement-bar {
    max-width: 1400px; margin: 0 auto 16px; padding: 12px 20px;
    background: rgba(255,70,85,0.18) !important;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,70,85,0.3); border-radius: 10px;
    display: flex; align-items: center; gap: 14px; color: #fff !important; font-size: 14px;
}
.badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 6px; font-weight: 700; }
.badge.update { background: rgba(255,70,85,0.85); color: #fff; }
.badge.notice { background: var(--glass-2); color: #fff; }
.ub-more { color: var(--muted) !important; font-size: 13px; text-decoration: none; margin-left: auto; }

/* ============ 公告区 ============ */
.announce-section .container, .files-section .container { max-width: 1400px; margin: 0 auto; padding: 0 28px; }
.notice-card {
    background: var(--glass) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; transition: all .3s;
}
.notice-card:hover { border-color: var(--line-h) !important; }
.notice-card h3 { color: #fff; font-size: 16px; margin: 8px 0 6px; }
.notice-card p { color: var(--muted) !important; font-size: 14px; line-height: 1.6; }
.notice-card.empty { text-align: center; color: var(--muted) !important; }

/* ============ 区块标题 + 筛选 ============ */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 18px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { color: #fff; font-size: 20px; }
.filter-form { display: flex; gap: 10px; }
.filter-form input, .filter-form select,
input[type=text], input[type=password], input[type=number], select, textarea {
    padding: 9px 14px; border-radius: 8px; font-size: 14px; outline: none;
    background: var(--glass) !important;
    border: 1px solid var(--line) !important; color: #fff !important;
    font-family: inherit;
}
select option { background: #1a1a2e; }
textarea { width: 100%; resize: vertical; }

/* ============ 分类标签 ============ */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip {
    padding: 7px 16px; border-radius: 20px; font-size: 13px;
    background: var(--glass); border: 1px solid var(--line);
    color: var(--text); text-decoration: none; transition: all .2s;
}
.chip:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.chip.active { background: rgba(255,70,85,0.25) !important; border-color: var(--line-h) !important; color: #fff !important; }

/* ============ 商品卡片网格 ============ */
.store-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.product-card {
    background: var(--glass) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    transition: all .3s ease !important;
}
.product-card:hover {
    background: var(--glass-2) !important;
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3) !important;
    border-color: var(--line-h) !important;
}
.card-cover { position: relative; height: 160px; background: rgba(255,255,255,0.04) !important; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cover-placeholder i { font-size: 56px; color: rgba(255,70,85,0.35); }
.card-category {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    padding: 4px 10px; border-radius: 6px; font-size: 11px; color: #fff;
}
.card-version {
    position: absolute; top: 10px; right: 10px;
    background: var(--red); padding: 4px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700; color: #fff;
}
.card-body { padding: 18px; }
.card-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { font-size: 12px; color: var(--muted); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 14px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-download {
    display: block; width: 100%; padding: 10px; text-align: center;
    text-decoration: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    background: rgba(255,70,85,0.75) !important;
    border: 1px solid rgba(255,255,255,0.2); color: #fff !important; transition: all .2s;
}
.card-download:hover { background: rgba(255,70,85,0.95) !important; }

/* ============ 按钮 ============ */
button, .primary, .btn-mini {
    background: rgba(255,70,85,0.8) !important;
    border: 1px solid rgba(255,255,255,0.2); color: #fff !important;
    border-radius: 8px; padding: 9px 20px; font-size: 14px; cursor: pointer; transition: all .2s;
    font-family: inherit;
}
button:hover, .primary:hover { background: var(--red) !important; }
.btn-mini { padding: 5px 12px; font-size: 12px; background: var(--glass-2) !important; }
.btn-mini.danger { background: rgba(255,50,50,0.55) !important; }
.btn-mini.danger:hover { background: rgba(255,50,50,0.85) !important; }

/* ============ 空状态 / 页脚 ============ */
.empty-state { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state i { font-size: 48px; margin-bottom: 16px; }
.site-footer {
    text-align: center; padding: 28px; font-size: 12px; margin-top: 40px;
    color: var(--muted) !important;
    background: rgba(255,255,255,0.03) !important;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}

/* ============ 数据表格 ============ */
.data-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.data-table, .data-table th, .data-table td { background: transparent !important; }
.data-table th {
    background: var(--glass) !important; padding: 12px 14px; text-align: left;
    font-weight: 600; color: #fff; border-bottom: 1px solid var(--line);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text); }
.data-table tr:hover td { background: var(--glass) !important; }
.data-table .empty { text-align: center; color: var(--muted); }
.on { color: #4caf50; } .off { color: var(--muted); }

/* ============ 表单 ============ */
form label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
form .form-row { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
form select, form input, form textarea { flex: 1; min-width: 140px; }

/* ============ 拖拽上传区 ============ */
.drop-zone {
    padding: 32px; text-align: center; cursor: pointer;
    border-style: dashed !important; border-width: 2px !important;
    transition: all .3s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--red) !important; background: rgba(255,70,85,0.06) !important; }
.drop-zone p { color: var(--text); margin-bottom: 6px; }
.drop-zone small { color: var(--muted); }

/* ============ 提示 ============ */
.muted { color: var(--muted) !important; font-size: 13px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 14px; }
.alert.success { background: rgba(76,175,80,0.15) !important; border: 1px solid rgba(76,175,80,0.4); color: #a5d6a7; }
.alert.error   { background: rgba(255,70,85,0.15) !important; border: 1px solid rgba(255,70,85,0.4); color: #ffabab; }

/* ============ 后台布局 ============ */
body.admin-body { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; flex-shrink: 0;
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(24px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.3) !important;
    border-right: 1px solid var(--line) !important;
    display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100;
}
.sidebar .logo { padding: 26px 20px 18px; font-size: 26px; border-bottom: 1px solid var(--line); }
.sidebar nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar nav a {
    display: block; padding: 11px 14px; color: var(--muted); text-decoration: none;
    font-size: 14px; border-radius: 8px; transition: all .2s;
}
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,70,85,0.15); }
.sidebar .logout {
    margin: 14px; padding: 10px 14px; color: var(--red); text-decoration: none;
    border: 1px solid rgba(255,70,85,0.4); border-radius: 8px; text-align: center; font-size: 14px;
}
.sidebar .logout:hover { background: rgba(255,70,85,0.15); }

.main { margin-left: 220px; flex: 1; padding: 0 28px 40px; min-width: 0; }
.topbar {
    height: 56px; margin: 0 -28px 22px; padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.04) !important;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.topbar h2 { color: #fff; font-size: 16px; font-weight: 600; }
.topbar span { font-size: 13px; color: var(--muted); }
.topbar b { color: #fff; }
.main .card { padding: 22px; margin-bottom: 22px; }
.main .card > h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }

/* 仪表盘统计 */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 16px; }
.dstat {
    background: var(--glass) !important; border: 1px solid var(--line) !important;
    border-radius: 12px; padding: 18px; text-align: center;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.dstat b { display: block; font-size: 26px; color: #fff; }
.dstat span { font-size: 12px; color: var(--muted); }

/* 缩略图网格（网盘图片） */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; margin-top: 16px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.thumb:hover img { transform: scale(1.06); }
.thumb-bar {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,.85), transparent);
    display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.thumb-name { font-size: 11px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 全屏灯箱 */
.lightbox {
    position: fixed; inset: 0; background: rgba(5,5,8,.96); backdrop-filter: blur(8px);
    z-index: 9999; display: none; align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lb-stage { position: relative; max-width: 92vw; max-height: 86vh; }
.lb-stage img { max-width: 100%; max-height: 86vh; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.lb-btn {
    position: absolute; width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    color: #fff; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 30px; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #ccc; font-size: 14px; }
.lb-watermark {
    position: absolute; inset: 0; display: flex; flex-wrap: wrap;
    align-content: space-between; justify-content: space-between; padding: 24px;
    pointer-events: none; overflow: hidden;
}
.lb-watermark span { font-size: 15px; color: rgba(255,255,255,.14); transform: rotate(-28deg); white-space: nowrap; }

/* 背景/图标预览 */
.bg-preview {
    position: relative; width: 100%; max-width: 640px; aspect-ratio: 16/9;
    border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px;
}
.bg-preview img { width: 100%; height: 100%; object-fit: cover; }
.fav-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.fav-preview img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); padding: 8px; }
.bg-path { position: absolute; left: 10px; bottom: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 4px; }

/* ============ 登录页 ============ */
body.login-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px;
}
.login-box { width: 100%; max-width: 380px; padding: 40px 32px; text-align: center; }
.login-box h1 { font-size: 34px; font-weight: 900; color: #fff; letter-spacing: 4px; margin-bottom: 28px; }
.login-box input { width: 100%; margin-bottom: 14px; }
.login-box button { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.login-box .back { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 13px; text-decoration: none; }
.login-box .back:hover { color: var(--red); }

/* ============ 分类表单 ============ */
.cat-form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.cat-form input { flex: 1; min-width: 140px; }

/* ============ 文字提亮 ============ */
h1, h2, h3, h4, h5, h6 { color: #fff !important; }
p, span, div, a, li, td, th, label { color: var(--text); }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    body.admin-body { flex-direction: column; }
    .sidebar { position: relative; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .sidebar .logout { margin: 8px; }
    .main { margin-left: 0; padding: 0 16px 40px; }
    .topbar { margin: 0 -16px 18px; padding: 0 16px; }
    .hero-title { font-size: 32px; letter-spacing: 3px; }
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}
