/* 蓝紫主题 — 与旧版 style.css 一致 */

:root,
[data-theme="light"] {
    --vgm-bg: #f8fafc;
    --vgm-sidebar: #ffffff;
    --vgm-surface: #ffffff;
    --vgm-surface-2: #f1f5f9;
    --vgm-border: #e2e8f0;
    --vgm-text: #0f172a;
    --vgm-text-secondary: #334155;
    --vgm-muted: #64748b;
    --vgm-accent: #2563eb;
    --vgm-accent-hover: #1d4ed8;
    --vgm-accent-soft: rgba(37, 99, 235, 0.08);
    --vgm-accent-contrast: #ffffff;
    --vgm-hero-overlay: rgba(37, 99, 235, 0.06);
    --vgm-card-shadow: rgba(15, 23, 42, 0.08);
    --vgm-cover-bg: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    --vgm-cover-fallback: linear-gradient(135deg, #eff6ff, #e2e8f0);
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 76px;
}

[data-theme="dark"] {
    --vgm-bg: #0f172a;
    --vgm-sidebar: #1e293b;
    --vgm-surface: #1e293b;
    --vgm-surface-2: #334155;
    --vgm-border: #334155;
    --vgm-text: #f8fafc;
    --vgm-text-secondary: #cbd5e1;
    --vgm-muted: #94a3b8;
    --vgm-accent: #3b82f6;
    --vgm-accent-hover: #2563eb;
    --vgm-accent-soft: rgba(59, 130, 246, 0.15);
    --vgm-accent-contrast: #ffffff;
    --vgm-hero-overlay: rgba(59, 130, 246, 0.12);
    --vgm-card-shadow: rgba(0, 0, 0, 0.35);
    --vgm-cover-bg: linear-gradient(135deg, #1e293b, #334155);
    --vgm-cover-fallback: linear-gradient(135deg, #0f172a, #1e293b);
}

.vgm-body {
    background: var(--vgm-bg);
    color: var(--vgm-text);
    font-family: var(--site-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif);
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

.vgm-app { display: flex; min-height: 100vh; }

.vgm-sidebar {
    width: var(--sidebar-width);
    background: var(--vgm-sidebar);
    border-right: 1px solid var(--vgm-border);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.25s ease, transform 0.25s ease;
}

.vgm-sidebar-brand { margin-bottom: 20px; padding: 0 4px; }
.vgm-sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
}
.vgm-sidebar-brand-logo { flex: 1; min-width: 0; overflow: hidden; }
.vgm-sidebar-brand .logo { color: var(--vgm-text); font-size: 1.05rem; white-space: nowrap; }
.vgm-sidebar-brand .logo-icon {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    min-width: 32px;
    height: 32px;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.vgm-sidebar-brand .logo-img { height: 32px; flex-shrink: 0; }

.vgm-sidebar-collapse {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 6px;
    color: var(--vgm-muted);
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.15s;
}
.vgm-sidebar-collapse:hover {
    border-color: var(--vgm-text);
    color: var(--vgm-text);
}

.vgm-nav-text { white-space: nowrap; overflow: hidden; transition: opacity 0.2s ease; }
.vgm-sidebar-hideable { overflow: hidden; transition: opacity 0.2s ease; }

html[data-sidebar="collapsed"] {
    --sidebar-width: var(--sidebar-width-collapsed);
}
html[data-sidebar="collapsed"] .vgm-sidebar { padding: 20px 10px; }
html[data-sidebar="collapsed"] .vgm-sidebar-brand-row { justify-content: center; }
html[data-sidebar="collapsed"] .vgm-sidebar-brand-logo { display: none; }
html[data-sidebar="collapsed"] .vgm-collapse-icon { transform: rotate(180deg); }
html[data-sidebar="collapsed"] .vgm-sidebar-collapse {
    width: 36px;
    height: 36px;
    margin: 0 auto 4px;
}
html[data-sidebar="collapsed"] .vgm-nav-text,
html[data-sidebar="collapsed"] .vgm-sidebar-hideable,
html[data-sidebar="collapsed"] .vgm-sidebar-label { display: none; }
html[data-sidebar="collapsed"] .vgm-nav-item { justify-content: center; padding: 10px 8px; gap: 0; }
html[data-sidebar="collapsed"] .vgm-nav-icon { width: auto; font-size: 1.15rem; }
html[data-sidebar="collapsed"] .vgm-game-badge { justify-content: center; padding: 10px 8px; }
html[data-sidebar="collapsed"] .vgm-sidebar-divider { margin: 12px 4px; }
html[data-sidebar="collapsed"] .vgm-theme-btn { justify-content: center; }

.vgm-main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; transition: margin-left 0.25s ease; }

.vgm-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.vgm-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    color: var(--vgm-muted); font-size: 0.92rem; font-weight: 500;
    transition: all 0.15s;
}
.vgm-nav-item:hover, .vgm-nav-item.active { background: var(--vgm-accent-soft); color: var(--vgm-accent); }
.vgm-nav-highlight { color: var(--vgm-accent) !important; font-weight: 600; }
.vgm-nav-icon { width: 20px; text-align: center; }

.vgm-sidebar-divider { height: 1px; background: var(--vgm-border); margin: 16px 8px; }
.vgm-sidebar-label { display: block; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--vgm-muted); padding: 0 12px 8px; font-weight: 600; }

.vgm-theme-toggle,
.vgm-theme-btn {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    color: var(--vgm-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.vgm-theme-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; font-size: 1rem;
}
.vgm-theme-toggle:hover, .vgm-theme-btn:hover { border-color: var(--vgm-accent); color: var(--vgm-accent); }
.vgm-theme-btn { width: 100%; text-align: left; border: none; font: inherit; }

.vgm-game-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: var(--vgm-surface);
    border: 1px solid var(--vgm-border); border-radius: 10px; margin: 0 4px 6px;
}
.vgm-game-badge-link {
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.vgm-game-badge-link:hover,
.vgm-game-badge-link.active {
    border-color: var(--vgm-accent);
    background: var(--vgm-accent-soft);
}
.vgm-game-badge-icon { font-size: 1.4rem; flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; }
.vgm-game-icon-img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.vgm-game-icon-emoji { font-size: 1.4rem; line-height: 1; }
.vgm-game-badge strong { display: block; font-size: 0.88rem; }
.vgm-game-badge small { color: var(--vgm-muted); font-size: 0.75rem; }

.vgm-account-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 6px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.vgm-account-avatar-wrap {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}
.vgm-account-body {
    min-width: 0;
    flex: 1;
}
.vgm-account-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.vgm-account-name-row .vgm-account-name {
    flex: 1;
    min-width: 0;
}
.vgm-account-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--vgm-text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vgm-account-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.vgm-account-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: var(--vgm-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.vgm-account-level-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
    color: var(--vgm-text);
}
.vgm-account-level-chip--icon-only {
    padding: 2px;
    border-radius: 10px;
    background: transparent;
    border-color: transparent;
}
.vgm-account-level-chip--icon-only:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.12);
}
.vgm-account-level-chip--topbar {
    pointer-events: none;
}
.vgm-user-level-icon--chip {
    height: 24px;
    width: auto;
    max-width: none;
}
.vgm-account-level-chip--topbar .vgm-user-level-icon--chip {
    height: 22px;
}
.vgm-user-level-icon {
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    image-rendering: auto;
}
.vgm-account-role-badge {
    flex-shrink: 0;
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
    line-height: 1.35;
}
.vgm-topbar-user-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(240px, 42vw);
    text-decoration: none;
    color: var(--vgm-muted);
}
.vgm-topbar-user-link:hover { color: var(--vgm-accent); }
.vgm-topbar-user-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vgm-account-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid var(--vgm-surface);
    box-shadow: 0 0 0 1px var(--vgm-border);
}
.vgm-account-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
}
.vgm-topbar-user-link { text-decoration: none; color: var(--vgm-muted); }
.vgm-topbar-user-link:hover { color: var(--vgm-accent); }

.vgm-topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 24px; background: var(--vgm-sidebar);
    border-bottom: 1px solid var(--vgm-border);
    position: sticky; top: 0; z-index: 100;
}
.vgm-sidebar-toggle {
    display: none; background: var(--vgm-surface);
    border: 1px solid var(--vgm-border); color: var(--vgm-text);
    border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 1.1rem;
}
.vgm-topbar-title { flex: 1; font-weight: 600; font-size: 0.95rem; color: var(--vgm-muted); }
.vgm-topbar-actions { display: flex; gap: 8px; align-items: center; position: relative; }
.vgm-topbar-user { color: var(--vgm-muted); font-size: 0.88rem; }

.vgm-notify-wrap { position: relative; }
.vgm-notify-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--vgm-border);
    border-radius: 8px;
    background: var(--vgm-surface);
    color: var(--vgm-text);
    cursor: pointer;
    transition: all 0.15s;
}
.vgm-notify-btn:hover,
.vgm-notify-btn[aria-expanded="true"] {
    border-color: var(--vgm-accent);
    color: var(--vgm-accent);
}
.vgm-notify-icon { font-size: 1rem; line-height: 1; }
.vgm-notify-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--vgm-sidebar);
}
.vgm-notify-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 96px));
    display: flex;
    flex-direction: column;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px var(--vgm-card-shadow);
    z-index: 500;
    overflow: hidden;
}
.vgm-notify-panel.hidden { display: none !important; }
.vgm-notify-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--vgm-border);
}
.vgm-notify-panel-head strong { font-size: 0.92rem; }
.vgm-notify-read-all {
    border: none;
    background: none;
    color: var(--vgm-accent);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
}
.vgm-notify-read-all:hover { text-decoration: underline; }
.vgm-notify-list {
    overflow-y: auto;
    padding: 8px;
}
.vgm-notify-empty {
    margin: 0;
    padding: 28px 16px;
    text-align: center;
    color: var(--vgm-muted);
    font-size: 0.88rem;
}
.vgm-notify-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.vgm-notify-item:hover { background: var(--vgm-accent-soft); }
.vgm-notify-item.is-unread { background: var(--vgm-surface-2); }
.vgm-notify-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.vgm-notify-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.vgm-notify-item-body strong {
    font-size: 0.88rem;
    line-height: 1.3;
}
.vgm-notify-item-body span {
    font-size: 0.82rem;
    color: var(--vgm-muted);
    line-height: 1.45;
}
.vgm-notify-item-body small {
    font-size: 0.75rem;
    color: var(--vgm-muted);
}

.vgm-flash-wrap { padding: 12px 24px 0; }
.vgm-content { flex: 1; padding: 0; }
.vgm-content--home { background: var(--vgm-bg); }

/* ── 首页 VGM 风格 ── */
.vgm-home { padding: 24px 32px 48px; }
.vgm-home-wrap { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

.vgm-home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    justify-content: flex-end;
    padding-bottom: 4px;
}
.vgm-home-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vgm-muted);
    font-size: 0.88rem;
}
.vgm-home-stat-icon { font-size: 1.1rem; opacity: 0.85; }
.vgm-home-stat-value { font-weight: 700; color: var(--vgm-text); font-size: 0.95rem; }
.vgm-home-stat-label { white-space: nowrap; }

.vgm-home-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: stretch;
}

.vgm-home-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.vgm-home-intro {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 16px;
    padding: 28px 32px;
}

.vgm-home-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.vgm-home-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.vgm-home-brand-logo:has(img) {
    background: transparent;
    border-radius: 0;
}
.vgm-home-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.vgm-home-brand-logo span { font-size: 1.25rem; color: #fff; font-weight: 800; }
.vgm-home-brand strong { display: block; font-size: 1rem; }
.vgm-home-brand small { color: var(--vgm-muted); font-size: 0.82rem; }

.vgm-home-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.vgm-home-desc {
    color: var(--vgm-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 24px;
    max-width: 520px;
}
.vgm-home-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.vgm-home-notice {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
.vgm-home-notice-head,
.vgm-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.vgm-home-notice-title,
.vgm-home-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vgm-home-notice-title h3,
.vgm-home-section-title h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.vgm-home-view-all {
    color: var(--vgm-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}
.vgm-home-view-all:hover { color: var(--vgm-accent); }

.vgm-home-scroll-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--vgm-border);
    background: var(--vgm-surface-2);
    color: var(--vgm-text);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s, background 0.15s;
}
.vgm-home-scroll-btn:hover {
    border-color: var(--vgm-accent);
    background: var(--vgm-accent-soft);
}

.vgm-home-carousel {
    flex: 1;
    min-width: 0;
}
.vgm-home-carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.vgm-home-carousel-track::-webkit-scrollbar { display: none; }

.vgm-home-notice-card {
    flex: 0 0 calc(50% - 7px);
    min-width: 180px;
    scroll-snap-align: start;
    background: var(--vgm-surface-2);
    border: 1px solid var(--vgm-border);
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, transform 0.15s;
}
.vgm-home-notice-card:hover,
.vgm-home-notice-card:focus-visible {
    border-color: var(--vgm-accent);
    transform: translateY(-2px);
}
.vgm-home-notice-card:focus-visible {
    outline: none;
}
.vgm-home-notice-cover {
    height: 88px;
    background: var(--vgm-cover-fallback);
    display: flex;
    align-items: center;
    justify-content: center;
}
.vgm-home-notice-cover-text { font-size: 2rem; opacity: 0.7; }
.vgm-home-notice-body { padding: 12px 14px; }
.vgm-home-notice-body h4 {
    font-size: 0.88rem;
    margin-bottom: 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vgm-home-notice-body p {
    font-size: 0.78rem;
    color: var(--vgm-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vgm-home-notice-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vgm-muted);
    font-size: 0.9rem;
    background: var(--vgm-surface-2);
    border-radius: 12px;
    border: 1px dashed var(--vgm-border);
}

.vgm-home-section { margin-top: 4px; }

/* Chat room page */
.vgm-content--chat {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
}
.vgm-chat-page {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 28px 28px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.vgm-chat-room {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.vgm-chat-room--page {
    min-height: calc(100vh - 120px);
    max-height: none;
}
.vgm-chat-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--vgm-border);
}
.vgm-chat-room-head h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.vgm-chat-room-badge {
    font-size: 0.75rem;
    color: var(--vgm-muted);
    background: var(--vgm-surface-2);
    border: 1px solid var(--vgm-border);
    border-radius: 999px;
    padding: 2px 10px;
}
.vgm-chat-room-login {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: var(--vgm-muted);
    font-size: 0.95rem;
    background: var(--vgm-surface-2);
    border: 1px dashed var(--vgm-border);
    border-radius: 12px;
    padding: 48px 24px;
    min-height: 280px;
}
.vgm-chat-room-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 420px;
    padding: 8px 4px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}
.vgm-chat-room-empty {
    text-align: center;
    color: var(--vgm-muted);
    font-size: 0.9rem;
    padding: 48px 8px;
    align-self: center;
    width: 100%;
}
.vgm-chat-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: min(72%, 640px);
}
.vgm-chat-msg.is-self {
    flex-direction: row-reverse;
    align-self: flex-end;
    margin-left: auto;
}
.vgm-chat-msg:not(.is-self) {
    align-self: flex-start;
    margin-right: auto;
}
.vgm-chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
}
.vgm-chat-msg-avatar:has(img) { background: var(--vgm-cover-fallback); }
.vgm-chat-msg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vgm-chat-msg-avatar-fallback {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}
.vgm-chat-mention {
    color: var(--vgm-accent);
    font-weight: 600;
}
.vgm-chat-msg-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.vgm-chat-msg.is-self .vgm-chat-msg-body {
    align-items: flex-end;
}
.vgm-chat-msg-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.vgm-chat-msg.is-self .vgm-chat-msg-meta {
    flex-direction: row-reverse;
}
.vgm-chat-msg-name {
    font-size: 0.85rem;
    font-weight: 700;
}
.vgm-chat-msg-name.is-admin { color: #dc2626; }
.vgm-chat-msg-name.is-mod { color: #2563eb; }
.vgm-chat-msg-time {
    font-size: 0.72rem;
    color: var(--vgm-muted);
}
.vgm-chat-msg-bubble {
    background: var(--vgm-surface-2);
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    padding: 10px 14px;
    max-width: 100%;
}
.vgm-chat-msg.is-self .vgm-chat-msg-bubble {
    background: var(--vgm-accent-soft);
    border-color: rgba(37, 99, 235, 0.25);
    border-bottom-right-radius: 4px;
}
.vgm-chat-msg:not(.is-self) .vgm-chat-msg-bubble {
    border-bottom-left-radius: 4px;
}
.vgm-chat-msg-text {
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: break-word;
    margin: 0;
}
.vgm-chat-resource-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 10px;
    color: inherit;
    max-width: 100%;
    transition: border-color 0.15s;
}
.vgm-chat-msg.is-self .vgm-chat-resource-card {
    background: rgba(255, 255, 255, 0.6);
}
.vgm-chat-resource-card:hover { border-color: var(--vgm-accent); }
.vgm-chat-resource-cover {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--vgm-cover-fallback);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}
.vgm-chat-resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vgm-chat-resource-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vgm-chat-room-emoji-panel.hidden,
.vgm-chat-room-share-panel.hidden { display: none !important; }
.vgm-chat-room-emoji-panel,
.vgm-chat-room-share-panel {
    border: 1px solid var(--vgm-border);
    border-radius: 10px;
    background: var(--vgm-surface-2);
    padding: 8px;
    margin-bottom: 8px;
}
.vgm-chat-room-emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 110px;
    overflow-y: auto;
}
.vgm-chat-room-emoji-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}
.vgm-chat-room-emoji-btn:hover { background: var(--vgm-accent-soft); }
.vgm-chat-room-share-search { margin-bottom: 8px; }
.vgm-chat-room-share-search .form-input {
    width: 100%;
    font-size: 0.88rem;
    padding: 8px 10px;
}
.vgm-chat-room-share-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vgm-chat-room-share-empty {
    text-align: center;
    color: var(--vgm-muted);
    font-size: 0.85rem;
    padding: 12px 8px;
    margin: 0;
}
.vgm-chat-room-share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.vgm-chat-room-share-item:hover {
    background: var(--vgm-surface);
    border-color: var(--vgm-border);
}
.vgm-chat-room-share-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--vgm-cover-fallback);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vgm-chat-room-share-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vgm-chat-room-share-title {
    font-size: 0.85rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vgm-chat-room-form {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--vgm-border);
}
.vgm-chat-room-form.hidden { display: none !important; }
.vgm-chat-room-muted {
    margin-top: auto;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.9rem;
    line-height: 1.55;
}
.vgm-chat-room-muted.hidden { display: none !important; }
.vgm-chat-room-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.vgm-chat-room-tool-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--vgm-border);
    border-radius: 8px;
    background: var(--vgm-surface-2);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    transition: border-color 0.15s, background 0.15s;
}
.vgm-chat-room-tool-btn:hover {
    border-color: var(--vgm-accent);
    background: var(--vgm-accent-soft);
}
.vgm-chat-room-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.vgm-chat-room-mention-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    max-height: 220px;
    overflow-y: auto;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 20;
}
.vgm-chat-room-mention-panel.hidden { display: none !important; }
.vgm-chat-room-mention-empty {
    text-align: center;
    color: var(--vgm-muted);
    font-size: 0.85rem;
    padding: 14px 8px;
    margin: 0;
}
.vgm-chat-room-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.vgm-chat-room-mention-item:hover,
.vgm-chat-room-mention-item.is-active {
    background: var(--vgm-accent-soft);
    border-color: rgba(37, 99, 235, 0.2);
}
.vgm-chat-room-mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}
.vgm-chat-room-mention-avatar:has(img) { background: var(--vgm-cover-fallback); }
.vgm-chat-room-mention-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vgm-chat-room-mention-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.vgm-chat-room-mention-text strong {
    font-size: 0.88rem;
    line-height: 1.3;
}
.vgm-chat-room-mention-text small {
    font-size: 0.75rem;
    color: var(--vgm-muted);
}
.vgm-chat-room-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.vgm-chat-room-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--vgm-border);
    border-radius: 10px;
    background: var(--vgm-surface-2);
    color: var(--vgm-text);
    font-size: 0.92rem;
}
.vgm-chat-room-input:focus {
    outline: none;
    border-color: var(--vgm-accent);
}
.vgm-chat-room-send { flex-shrink: 0; }

.vgm-home-game-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vgm-home-game-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--vgm-cover-bg);
    border: 1px solid var(--vgm-border);
    transition: border-color 0.15s, transform 0.15s;
}
.vgm-home-game-card:hover .vgm-home-game-cover {
    border-color: var(--vgm-accent);
    transform: translateY(-3px);
}
.vgm-home-game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vgm-home-game-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--vgm-cover-fallback);
}
.vgm-home-game-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.vgm-home-game-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vgm-home-game-sub {
    font-size: 0.72rem;
    color: var(--vgm-muted);
    margin-top: -4px;
}

.vgm-hero { position: relative; padding: 48px 32px 56px; overflow: hidden; border-bottom: 1px solid var(--vgm-border); }
.vgm-hero--standalone {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: none;
    min-height: calc(100vh - 140px);
    padding: 56px 32px 64px;
}
.vgm-content--home-only {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.vgm-main:has(.vgm-content--home-only) {
    min-height: 100vh;
}
.vgm-hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--vgm-hero-overlay) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 20%, var(--vgm-hero-overlay), transparent 60%);
    pointer-events: none;
}
.vgm-hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }

.vgm-hero-game { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.vgm-hero-logo {
    width: 72px; height: 72px; border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25); overflow: hidden;
}
.vgm-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.vgm-hero-logo-text { font-size: 1.5rem; font-weight: 800; color: var(--vgm-accent-contrast); }
.vgm-hero-game-info h2 { font-size: 1.5rem; margin-bottom: 2px; }
.vgm-hero-game-info p { color: var(--vgm-muted); font-size: 0.9rem; }

.vgm-stats-row { display: flex; gap: 32px; margin-bottom: 36px; flex-wrap: wrap; }
.vgm-stat-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--vgm-text); line-height: 1.2; }
.vgm-stat-label { font-size: 0.82rem; color: var(--vgm-muted); letter-spacing: 0.04em; }

.vgm-hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.03em; }
.vgm-hero-text p { color: var(--vgm-muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 24px; line-height: 1.7; }
.vgm-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.vgm-section { padding: 36px 32px; max-width: 1164px; margin: 0 auto; }
.vgm-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.vgm-section-head h3 { font-size: 1.15rem; font-weight: 700; }
.vgm-section-head a { color: var(--vgm-muted); font-size: 0.88rem; }
.vgm-section-head a:hover { color: var(--vgm-accent); }
.vgm-section-hint { color: var(--vgm-muted); font-size: 0.82rem; }

.vgm-section-games { padding-top: 28px; }

.vgm-home-game-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.vgm-home-game-tab {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 12px;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.vgm-home-game-tab:hover {
    border-color: var(--vgm-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--vgm-card-shadow);
}

.vgm-home-game-tab.active {
    border-color: var(--vgm-accent);
    background: var(--vgm-accent-soft, rgba(99, 102, 241, 0.08));
    box-shadow: 0 0 0 1px var(--vgm-accent);
}

.vgm-home-game-tab-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.vgm-home-game-tab-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vgm-home-game-tab-body strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.vgm-home-game-tab-body small {
    color: var(--vgm-muted);
    font-size: 0.78rem;
}

.vgm-home-game-tab-body em {
    margin-top: 4px;
    font-style: normal;
    font-size: 0.75rem;
    color: var(--vgm-muted);
    font-weight: 600;
}

.vgm-announce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vgm-announce-card { background: var(--vgm-surface); border: 1px solid var(--vgm-border); border-radius: 12px; padding: 20px; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.vgm-announce-card:hover { border-color: var(--vgm-accent); transform: translateY(-2px); }
.vgm-announce-card h4 { font-size: 0.95rem; margin-bottom: 8px; }
.vgm-announce-card p { color: var(--vgm-muted); font-size: 0.85rem; line-height: 1.5; }

.vgm-announce-list { display: flex; flex-direction: column; gap: 12px; max-width: 800px; padding: 0 32px 48px; margin: 0 auto; }
.vgm-announce-list-item { background: var(--vgm-surface); border: 1px solid var(--vgm-border); border-radius: 12px; padding: 20px; color: inherit; display: block; }
.vgm-announce-list-item:hover { border-color: var(--vgm-accent); }
.vgm-announce-list-item h4 { margin-bottom: 8px; }
.vgm-announce-list-item p { color: var(--vgm-muted); font-size: 0.88rem; margin-bottom: 8px; }
.vgm-announce-list-item time { font-size: 0.78rem; color: var(--vgm-muted); }

.vgm-announce-article { max-width: 800px; margin: 0 auto; padding: 0 32px 48px; line-height: 1.85; color: var(--vgm-text-secondary); }
.vgm-announce-date { color: var(--vgm-muted); font-size: 0.88rem; }
.vgm-back-link { display: inline-block; margin-bottom: 12px; color: var(--vgm-muted); font-size: 0.88rem; }
.vgm-back-link:hover { color: var(--vgm-accent); }

.vgm-game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.vgm-game-grid-lg { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vgm-game-card { background: var(--vgm-surface); border: 1px solid var(--vgm-border); border-radius: 12px; overflow: hidden; color: inherit; transition: all 0.2s; }
.vgm-game-card:hover { border-color: var(--vgm-accent); transform: translateY(-3px); box-shadow: 0 8px 24px var(--vgm-card-shadow); }
.vgm-game-card-cover { height: 100px; background: var(--vgm-cover-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vgm-game-card-img { width: 100%; height: 100%; object-fit: cover; }
.vgm-game-card-icon { font-size: 2rem; opacity: 0.8; }
.vgm-game-card-body { padding: 14px; }
.vgm-game-card-body h4 { font-size: 0.92rem; margin-bottom: 4px; }
.vgm-game-card-body p { color: var(--vgm-muted); font-size: 0.78rem; margin-bottom: 8px; }
.vgm-game-card-count { font-size: 0.78rem; color: var(--vgm-muted); font-weight: 600; }

.vgm-mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0 32px 32px; max-width: 1228px; margin: 0 auto; }
.vgm-mod-card { background: var(--vgm-surface); border: 1px solid var(--vgm-border); border-radius: 12px; overflow: hidden; color: inherit; transition: all 0.2s; display: block; }
.vgm-mod-card:hover { border-color: var(--vgm-accent); transform: translateY(-3px); box-shadow: 0 8px 24px var(--vgm-card-shadow); }
.vgm-mod-cover { position: relative; height: 140px; background: var(--vgm-surface-2); }
.vgm-mod-cover img { width: 100%; height: 100%; object-fit: cover; }
.vgm-mod-cover-fallback { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; color: var(--vgm-muted); background: var(--vgm-cover-fallback); }
.vgm-mod-category { position: absolute; top: 10px; left: 10px; background: var(--vgm-accent); color: var(--vgm-accent-contrast); padding: 3px 8px; border-radius: 6px; font-size: 0.68rem; font-weight: 600; }
.vgm-mod-body { padding: 14px; }
.vgm-mod-body h4 { font-size: 0.92rem; margin-bottom: 6px; }
.vgm-mod-body p { color: var(--vgm-muted); font-size: 0.8rem; margin-bottom: 10px; line-height: 1.4; }
.vgm-mod-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--vgm-muted); padding-top: 10px; border-top: 1px solid var(--vgm-border); }

.vgm-page-header { padding: 32px 32px 20px; max-width: 1164px; margin: 0 auto; }
.vgm-page-header h1 { font-size: 1.75rem; margin-bottom: 6px; }
.vgm-page-header p { color: var(--vgm-muted); }

.vgm-filter-wrap { padding: 0 32px 24px; max-width: 1164px; margin: 0 auto; }
.vgm-filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vgm-filter-bar .form-input { flex: 1; min-width: 180px; background: var(--vgm-surface); border-color: var(--vgm-border); color: var(--vgm-text); }
.vgm-category-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.vgm-category-btn {
    display: inline-flex; align-items: center; padding: 7px 14px;
    border-radius: 999px; border: 1px solid var(--vgm-border);
    background: var(--vgm-surface); color: var(--vgm-text-secondary);
    font-size: 0.82rem; font-weight: 500; text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.vgm-category-btn:hover {
    border-color: var(--vgm-accent); color: var(--vgm-accent); background: var(--vgm-accent-soft);
    text-decoration: none;
}
.vgm-category-btn.active {
    border-color: var(--vgm-accent); background: var(--vgm-accent); color: #fff;
}
.vgm-category-btn.active:hover { color: #fff; background: var(--vgm-accent-hover, var(--vgm-accent)); }

.vgm-mod-detail { max-width: 1164px; margin: 0 auto; padding: 0 32px 48px; }
.vgm-mod-detail-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--vgm-muted); font-size: 0.85rem; }
.vgm-mod-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.vgm-mod-detail-main { min-width: 0; }
.vgm-mod-detail-aside { position: sticky; top: 20px; }
.vgm-mod-detail-cover { border-radius: 12px; overflow: hidden; margin-bottom: 24px; border: 1px solid var(--vgm-border); }
.vgm-mod-detail-cover img { width: 100%; max-height: 480px; object-fit: cover; display: block; }

.vgm-media-carousel { margin-bottom: 24px; }
.vgm-media-carousel-viewport {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--vgm-border);
    background: #000;
}
.vgm-media-carousel-track { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.vgm-media-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.vgm-media-slide.is-active { opacity: 1; pointer-events: auto; }
.vgm-media-zoom-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
}
.vgm-media-slide img,
.vgm-media-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}
.vgm-media-embed,
.vgm-media-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.vgm-media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.vgm-media-nav:hover { background: rgba(0, 0, 0, 0.75); }
.vgm-media-nav-prev { left: 12px; }
.vgm-media-nav-next { right: 12px; }
.vgm-media-carousel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
.vgm-media-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.vgm-media-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: var(--vgm-border);
    cursor: pointer;
    padding: 0;
}
.vgm-media-dot.is-active { background: var(--vgm-accent); width: 22px; }
.vgm-media-counter { color: var(--vgm-muted); font-size: 0.85rem; }

.vgm-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    box-sizing: border-box;
}
.vgm-media-lightbox.hidden { display: none !important; }
body.vgm-lightbox-open { overflow: hidden; }
.vgm-media-lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
}
.vgm-media-lightbox-body img {
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}
.vgm-media-lightbox-caption {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-align: center;
    max-width: 720px;
}
.vgm-media-lightbox-close,
.vgm-media-lightbox-prev,
.vgm-media-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
}
.vgm-media-lightbox-close:hover,
.vgm-media-lightbox-prev:hover,
.vgm-media-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.22);
}
.vgm-media-lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
}
.vgm-media-lightbox-prev,
.vgm-media-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 1.8rem;
    line-height: 1;
}
.vgm-media-lightbox-prev { left: 16px; }
.vgm-media-lightbox-next { right: 16px; }
.vgm-media-lightbox-prev.hidden,
.vgm-media-lightbox-next.hidden { display: none; }

.vgm-mod-detail-lead { font-size: 1.05rem; color: var(--vgm-text-secondary); margin-bottom: 24px; line-height: 1.7; }
.vgm-mod-detail-content { line-height: 1.85; color: var(--vgm-muted); }
.vgm-download-box { background: var(--vgm-surface); border: 1px solid var(--vgm-border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.vgm-download-box-title { font-size: 1rem; margin: 0; letter-spacing: 0.02em; }
.vgm-download-file { padding: 14px 16px; background: var(--vgm-surface-2, var(--vgm-bg)); border: 1px solid var(--vgm-border); border-radius: 10px; word-break: break-all; }
.vgm-download-file strong { display: block; margin-bottom: 6px; font-size: 0.92rem; line-height: 1.4; }
.vgm-download-file span { color: var(--vgm-muted); font-size: 0.85rem; }
.vgm-download-meta { margin: 0; color: var(--vgm-muted); font-size: 0.82rem; text-align: center; }

.vgm-login-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.vgm-login-modal.hidden { display: none !important; }
body.vgm-login-modal-open { overflow: hidden; }
.vgm-login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}
.vgm-login-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 380px);
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    padding: 24px 22px 20px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.vgm-login-modal-dialog h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}
.vgm-login-modal-dialog p {
    margin: 0 0 20px;
    color: var(--vgm-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}
.vgm-login-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.vgm-cta-banner {
    margin: 20px auto 40px; max-width: 1100px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border); border-radius: 16px;
    padding: 40px; text-align: center;
}
.vgm-cta-inner h3 { font-size: 1.35rem; margin-bottom: 10px; }
.vgm-cta-inner p { color: var(--vgm-muted); margin-bottom: 20px; max-width: 520px; margin-left: auto; margin-right: auto; }

.vgm-footer { background: var(--vgm-sidebar); border-top: 1px solid var(--vgm-border); padding: 40px 32px 24px; margin-top: auto; }
.vgm-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; max-width: 1164px; margin: 0 auto 32px; }
.vgm-footer-brand p { color: var(--vgm-muted); font-size: 0.85rem; margin-top: 12px; line-height: 1.6; }
.vgm-footer h4 { font-size: 0.85rem; margin-bottom: 14px; letter-spacing: 0.04em; color: var(--vgm-muted); }
.vgm-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vgm-footer a { color: var(--vgm-muted); font-size: 0.88rem; text-decoration: none; }
.vgm-footer a:hover { color: var(--vgm-text); }
.vgm-footer-plain { color: var(--vgm-muted); font-size: 0.88rem; }
.vgm-footer-support { color: var(--vgm-muted); font-size: 0.85rem; line-height: 1.6; }
.vgm-footer-bottom { max-width: 1164px; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--vgm-border); color: var(--vgm-muted); font-size: 0.82rem; text-align: center; }

.vgm-body a { color: var(--vgm-accent); text-decoration: none; }
.vgm-body a:hover { color: var(--vgm-accent-hover); }
.vgm-body .btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    text-decoration: none;
}
.vgm-body .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.vgm-body .btn-outline { background: transparent; border: 1px solid var(--vgm-border); color: var(--vgm-text-secondary); text-decoration: none; }
.vgm-body .btn-outline:hover { border-color: var(--vgm-accent); color: var(--vgm-accent); background: var(--vgm-accent-soft); }
.vgm-body .btn-ghost { color: var(--vgm-muted); text-decoration: none; }
.vgm-body .btn-ghost:hover { background: var(--vgm-surface-2); color: var(--vgm-text); }
.vgm-body .empty-state { background: var(--vgm-surface); border-color: var(--vgm-border); color: var(--vgm-muted); margin: 0 32px 32px; max-width: 1100px; margin-left: auto; margin-right: auto; }
.vgm-body .pagination { padding: 0 32px 40px; justify-content: center; display: flex; gap: 6px; }
.vgm-body .page-link { background: var(--vgm-surface); border-color: var(--vgm-border); color: var(--vgm-muted); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--vgm-border); text-decoration: none; }
.vgm-body .page-link.active, .vgm-body .page-link:hover { background: var(--vgm-accent); border-color: var(--vgm-accent); color: #fff; }
.vgm-body .alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; padding: 14px; border-radius: 8px; }
.vgm-body .alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; padding: 14px; border-radius: 8px; }
.vgm-body .badge-user { background: #dbeafe; color: #1d4ed8; }
.vgm-body .badge-mod { background: #fef3c7; color: #b45309; }
.vgm-body .badge-admin { background: #fee2e2; color: #b91c1c; }

.vgm-body .auth-section { background: transparent; padding: 40px 32px; min-height: auto; }
.vgm-body .auth-wrapper { border-color: var(--vgm-border); background: var(--vgm-surface); }
.vgm-body .auth-brand { background: linear-gradient(145deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%); }
.vgm-body .auth-card { background: var(--vgm-surface); }
.vgm-body .auth-card h1 { color: var(--vgm-text); }
.vgm-body .form-input, .vgm-body .form-select, .vgm-body .form-textarea { background: var(--vgm-bg); border-color: var(--vgm-border); color: var(--vgm-text); }
.vgm-body .form-input:focus, .vgm-body .form-select:focus, .vgm-body .form-textarea:focus {
    border-color: var(--vgm-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .vgm-sidebar.open { box-shadow: 4px 0 24px var(--vgm-card-shadow); }
[data-theme="light"] .vgm-mod-category { background: var(--vgm-accent); color: #fff; }
[data-theme="dark"] .vgm-mod-category { background: var(--vgm-accent); color: #fff; }
[data-theme="dark"] .vgm-body .auth-brand { background: linear-gradient(145deg, #1d4ed8 0%, #4338ca 50%, #6d28d9 100%); }
[data-theme="dark"] .vgm-sidebar-brand .logo-icon,
[data-theme="dark"] .vgm-hero-logo { background: linear-gradient(135deg, #3b82f6, #6366f1); }

[data-theme="dark"] .vgm-sidebar-brand .logo-icon,
[data-theme="dark"] .vgm-hero-logo { background: linear-gradient(135deg, #3b82f6, #6366f1); }

.upload-mod-page { max-width: 900px; }
.upload-mod-form-card { padding: 28px; }
.upload-mod-form-card .form-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.upload-mod-form-card .upload-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.upload-mod-form-card .upload-file-label { cursor: pointer; display: inline-block; margin-right: 10px; }
.upload-mod-form-card .upload-file-name { font-size: 0.88rem; color: var(--vgm-muted); }

.upload-mod-form-card { padding: 28px; }
.upload-mod-form-card .form-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

.account-page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; }
.account-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }

.account-sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }

.account-hero {
    position: relative;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.account-hero-bg {
    height: 72px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
}
.account-hero-body {
    text-align: center;
    padding: 0 20px 22px;
    margin-top: -40px;
}
.account-hero-avatar { margin-bottom: 10px; }
.account-avatar-img, .account-avatar-fallback {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
    display: block;
    border: 3px solid var(--vgm-surface);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}
.account-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
}
.account-hero-name { font-size: 1.05rem; margin-bottom: 2px; word-break: break-word; }
.account-hero-username { color: var(--vgm-muted); font-size: 0.82rem; margin-bottom: 10px; }
.account-hero-badge { font-size: 0.75rem; }

.account-sidebar-card {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    padding: 18px 16px 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.account-nav-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vgm-muted);
    margin: 0 0 12px 4px;
    letter-spacing: 0.02em;
}
.account-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.account-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--vgm-text-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
    font: inherit;
    text-align: center;
}
.account-nav-item:hover {
    background: var(--vgm-surface-2);
    color: var(--vgm-text);
}
.account-nav-item.is-active {
    background: var(--vgm-surface-2);
    border-color: var(--vgm-accent);
    color: var(--vgm-text);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.account-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: color-mix(in srgb, var(--nav-icon-color, #64748b) 14%, transparent);
}
.account-nav-label {
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 500;
}
.account-sidebar-links { padding-bottom: 14px; }
.account-quick-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.86rem;
    color: var(--vgm-text-secondary);
    text-decoration: none;
    background: var(--vgm-surface-2);
    transition: background 0.15s, color 0.15s;
}
.account-quick-link:hover { background: var(--vgm-border); color: var(--vgm-text); }

.account-content { min-width: 0; }
.account-panel { display: none; }
.account-panel.is-active { display: block; }
.account-card {
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.account-panel-header { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--vgm-border); }
.account-panel-header h1 { font-size: 1.35rem; margin-bottom: 6px; }
.account-panel-header p { color: var(--vgm-muted); font-size: 0.9rem; line-height: 1.55; margin: 0; }

.account-section-title { font-size: 1.05rem; margin-bottom: 6px; }
.account-section-desc { color: var(--vgm-muted); font-size: 0.875rem; margin-bottom: 18px; line-height: 1.6; }
.account-notice {
    padding: 12px 14px;
    background: var(--vgm-surface-2);
    border: 1px solid var(--vgm-border);
    border-radius: 10px;
}
.account-form .form-group { margin-bottom: 16px; }
.account-form .form-group label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }
.form-actions-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.account-remove-avatar-form { margin-top: 10px; }
.account-info-list { display: grid; gap: 14px; }
.account-info-list div { display: grid; gap: 4px; }
.account-info-list dt { font-size: 0.78rem; color: var(--vgm-muted); font-weight: 600; }
.account-info-list dd { font-size: 0.92rem; color: var(--vgm-text); }
.account-info-list dd small { color: var(--vgm-muted); font-weight: 400; }

.account-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.account-level-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--vgm-text);
}
.account-level-pill--icon-only {
    padding: 0;
    background: transparent;
    border: none;
    line-height: 0;
}
.account-level-pill-icon {
    height: 32px;
    width: auto;
    max-width: none;
    object-fit: contain;
    border-radius: 6px;
}

.account-level-card {
    padding: 22px;
    border: 1px solid var(--vgm-border);
    border-radius: 14px;
    background: var(--vgm-surface-2);
    margin-bottom: 24px;
}
.account-level-main {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}
.account-level-icon-wrap {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.account-level-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.account-level-info { flex: 1; min-width: 0; }
.account-level-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}
.account-level-num {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.account-level-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vgm-text);
}
.account-level-xp-text {
    font-size: 0.84rem;
    color: var(--vgm-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}
.account-level-progress {
    height: 10px;
    border-radius: 999px;
    background: var(--vgm-border);
    overflow: hidden;
}
.account-level-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    transition: width 0.35s ease;
}
.account-level-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.account-level-stat {
    text-align: center;
    padding: 12px 8px;
    border-radius: 12px;
    background: var(--vgm-surface);
    border: 1px solid var(--vgm-border);
}
.account-level-stat strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--vgm-text);
}
.account-level-stat span {
    font-size: 0.74rem;
    color: var(--vgm-muted);
}
.account-level-actions { text-align: center; }
.account-checkin-btn { min-width: 200px; }
.account-checkin-btn.is-done {
    opacity: 0.72;
    cursor: not-allowed;
}
.account-level-checkin-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--vgm-muted);
    line-height: 1.5;
}
.account-level-checkin-msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.5;
}
.account-level-checkin-msg--success {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}
.account-level-checkin-msg--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.account-level-rules { margin-bottom: 24px; }
.account-level-rules h3,
.account-level-recent h3 {
    font-size: 0.95rem;
    margin: 0 0 12px;
}
.account-level-rule-list {
    margin: 0 0 14px;
    padding-left: 1.2rem;
    color: var(--vgm-muted);
    font-size: 0.84rem;
    line-height: 1.7;
}
.account-level-table-wrap { overflow-x: auto; }
.account-level-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.account-level-table th,
.account-level-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--vgm-border);
    text-align: left;
}
.account-level-table th {
    color: var(--vgm-muted);
    font-weight: 600;
    font-size: 0.78rem;
}
.account-level-table tr.is-current {
    background: rgba(37, 99, 235, 0.06);
}
.account-level-table tr.is-current td:first-child {
    font-weight: 700;
    color: #2563eb;
}
.account-level-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.account-level-recent-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--vgm-surface-2);
    border: 1px solid var(--vgm-border);
    font-size: 0.84rem;
}
.account-level-recent-date { color: var(--vgm-text); font-weight: 600; }
.account-level-recent-xp { color: #2563eb; }
.account-level-recent-streak { color: var(--vgm-muted); margin-left: auto; }

@media (max-width: 520px) {
    .account-level-main { flex-direction: column; text-align: center; }
    .account-level-title-row { justify-content: center; }
    .account-level-stats { grid-template-columns: 1fr; }
    .account-level-recent-streak { margin-left: 0; width: 100%; }
}

.account-notify-form { display: grid; gap: 14px; max-width: 520px; }
.account-toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.account-toggle.is-disabled { opacity: 0.55; cursor: not-allowed; }
.account-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.account-toggle-ui {
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    margin-top: 2px;
    border-radius: 999px;
    background: var(--vgm-border);
    position: relative;
    transition: background 0.15s;
}
.account-toggle-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.account-toggle input:checked + .account-toggle-ui {
    background: var(--vgm-accent);
}
.account-toggle input:checked + .account-toggle-ui::after {
    transform: translateX(18px);
}
.account-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.account-toggle-text strong { font-size: 0.86rem; }
.account-toggle-text small {
    color: var(--vgm-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}
.account-notify-save { margin-top: 6px; align-self: flex-start; }
.account-notify-permission { align-self: flex-start; margin-top: -4px; }
.account-notify-status {
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 8px 10px;
    border-radius: 8px;
}
.account-notify-status--info {
    color: var(--vgm-muted);
    background: var(--vgm-surface-2);
}
.account-notify-status--error {
    color: #b91c1c;
    background: #fef2f2;
}

@media (max-width: 900px) {
    html[data-sidebar="collapsed"] { --sidebar-width: 260px; }
    html[data-sidebar="collapsed"] .vgm-sidebar-brand-logo { display: block; }
    html[data-sidebar="collapsed"] .vgm-nav-text,
    html[data-sidebar="collapsed"] .vgm-sidebar-hideable,
    html[data-sidebar="collapsed"] .vgm-sidebar-label { display: block; }
    html[data-sidebar="collapsed"] .vgm-nav-item { justify-content: flex-start; gap: 10px; padding: 10px 12px; }
    html[data-sidebar="collapsed"] .vgm-sidebar-collapse { display: none; }
    .vgm-sidebar { transform: translateX(-100%); width: 260px !important; padding: 20px 14px !important; }
    .vgm-sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
    .vgm-main { margin-left: 0; }
    .vgm-sidebar-toggle { display: block; }
    .vgm-footer-grid { grid-template-columns: 1fr 1fr; }
    .vgm-hero { padding: 32px 20px; }
    .vgm-section { padding: 28px 20px; }
    .account-layout { grid-template-columns: 1fr; }
    .account-sidebar { position: static; }
    .account-nav-grid { grid-template-columns: repeat(4, 1fr); }
    .account-page { padding: 24px 16px 40px; }
    .vgm-page-header, .vgm-filter-wrap, .vgm-mod-grid, .vgm-mod-detail, .vgm-announce-list { padding-left: 20px; padding-right: 20px; }
    .vgm-mod-detail-grid { grid-template-columns: 1fr; gap: 20px; }
    .vgm-mod-detail-aside { position: static; }
    .vgm-home { padding: 20px 16px 36px; }
    .vgm-home-banner { grid-template-columns: 1fr; }
    .vgm-home-stats { justify-content: flex-start; }
    .vgm-home-notice-card { flex: 0 0 85%; }
    .vgm-chat-page { padding: 16px 16px 24px; }
    .vgm-chat-room--page { min-height: calc(100vh - 160px); }
    .vgm-chat-msg { max-width: 88%; }
}
@media (max-width: 520px) {
    .vgm-footer-grid { grid-template-columns: 1fr; }
    .account-nav-grid { grid-template-columns: repeat(2, 1fr); }
    .account-card { padding: 20px 18px; }
    .vgm-stats-row { gap: 20px; }
    .vgm-home-intro { padding: 22px 20px; }
    .vgm-home-notice-card { flex: 0 0 92%; }
    .vgm-home-game-card { flex: 0 0 140px; }
}
