
:root {
    --vg-bg-main: #350f58; /* 主背景深紫色 */
    --vg-bg-gradient: linear-gradient(180deg, #350f58 0%, #5a2789 100%);
    --vg-sidebar-bg: #1a0b2e; /* 侧边栏深色背景 */
    --vg-text-white: #ffffff;
    --vg-text-gray: rgba(255, 255, 255, 0.6);
    --vg-accent-green: #73b33a; /* 激活状态的绿色 */
    --vg-accent-purple: #a29bfe; /* Logo 高亮紫色 */
    --vg-card-bg: #442a6c;
    --vg-footer-bg: #130824;
    --vg-sidebar-width: 260px; /* PC侧边栏宽度 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Arial', sans-serif;
    background: var(--vg-bg-gradient);
    color: var(--vg-text-white);
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- 2. 布局框架 --- */
.vg-wrapper { display: flex; width: 100%; }

/* --- 3. 左侧导航栏 (Sidebar) --- */
.vg-sidebar {
    background-color: var(--vg-sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    width: var(--vg-sidebar-width); /* PC 默认宽度 */
}

/* 移动端默认隐藏 */
@media (max-width: 1023px) {
    .vg-sidebar { transform: translateX(-100%); }
    .vg-sidebar.open { transform: translateX(0); }
}

/* 侧边栏头部 */
.vg-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vg-sidebar-header h3 { font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }
.vg-close-btn { font-size: 24px; cursor: pointer; display: none; }
@media (max-width: 1023px) { .vg-close-btn { display: block; } }

/* 菜单列表样式 */
.vg-menu a {
    display: flex; align-items: center; padding: 12px 20px;
    color: var(--vg-text-gray); font-size: 14px; border-left: 4px solid transparent;
    transition: all 0.2s;
}
.vg-menu a:hover { background: rgba(255,255,255,0.05); color: var(--vg-text-white); }
.vg-menu a.active {
    border-left-color: var(--vg-accent-green);
    color: var(--vg-text-white);
    background: rgba(115, 179, 58, 0.1);
}
.vg-menu a i { width: 25px; font-size: 18px; margin-right: 10px; text-align: center; }
.vg-group-title { padding: 15px 20px 5px; font-size: 12px; color: var(--vg-text-gray); opacity: 0.7; }

/* --- 4. 主内容区 (Main) --- */
.vg-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: var(--vg-sidebar-width); /* PC 视图占位 */
    transition: margin-left 0.3s ease;
}
/* 移动端 Main 区域全宽 */
@media (max-width: 1023px) {
    .vg-main { margin-left: 0; }
}

/* --- 5. 顶部 Header (PC: Image 4 / Mobile: Image 2) --- */
.vg-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: transparent;
}
.vg-header-left { display: flex; align-items: center; gap: 20px; }
.vg-logo { font-size: 22px; font-weight: 700; }
.vg-logo img { height: 36px; margin-right: 10px; }
.vg-logo span { color: var(--vg-accent-purple); }

/* 元素可见性控制 */
.vg-search, .vg-get-app, .vg-lang { display: flex; } /* PC 默认显示 */
.vg-hamburger, .vg-mobile-search-icon { display: none; } /* PC 默认隐藏 */

/* PC 搜索框 */
.vg-search { max-width: 400px; position: relative; margin: 0 20px; }
.vg-search input {
    width: 100%; height: 40px; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    padding: 0 40px 0 20px; color: white; outline: none;
}
.vg-search i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--vg-text-gray); }
.vg-header-right { display: flex; align-items: center; gap: 20px; }
.vg-get-app { background: #f39c12; color: white; padding: 8px 20px; border-radius: 20px; font-size: 12px; font-weight: bold; border: 1px solid #e67e22; }

/* 移动端 Header 适配 */
@media (max-width: 1023px) {
    .vg-header { padding: 0 20px; height: 60px; }
    .vg-search, .vg-get-app, .vg-lang { display: none; }
    .vg-hamburger, .vg-mobile-search-icon { display: block; }
    .vg-logo { font-size: 18px; }
}

/* --- 6. 内容区块 --- */
.vg-content { padding: 20px 30px; }
@media (max-width: 1023px) { .vg-content { padding: 15px; } }

.vg-scroll-box {
    display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px;
    -webkit-overflow-scrolling: touch; /* 提升 iOS 滚动体验 */
}
.vg-scroll-item { flex: 0 0 220px; position: relative; border-radius: 10px; overflow: hidden; }
.vg-scroll-item img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; }
@media (max-width: 1023px) { .vg-scroll-item { flex: 0 0 160px; } }

/* 网格 */
.vg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* PC 视图 */
    gap: 15px;
}
@media (max-width: 1023px) {
    .vg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } /* Mobile 视图 */
}
.vg-card { background: var(--vg-card-bg); border-radius: 10px; overflow: hidden; position: relative; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.vg-card img { width: 100%; display: block; aspect-ratio: 1/1; object-fit: cover; }
.vg-card-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 30px 10px 10px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    text-align: center;
}
.vg-card-overlay h4 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 移动端搜索栏 (默认隐藏) */
.vg-mobile-search-bar { display: none; padding: 10px 20px; background: rgba(0,0,0,0.2); }
.vg-mobile-search-bar input { width: 91%; padding: 10px; background: rgba(255,255,255,0.1); border: none; border-radius: 5px; color: white; }

/* --- 7. Footer (Image 1 & 4) --- */
.vg-footer {
    margin-top: auto; background: var(--vg-footer-bg); padding: 40px 30px;
    font-size: 13px; line-height: 1.6; color: var(--vg-text-gray); border-top: 1px solid rgba(255,255,255,0.05);
}
.vg-footer p { text-align: justify; }
.vg-social { text-align: center; margin: 20px 0; }
.vg-copyright { text-align: center; font-size: 12px; opacity: 0.6; margin-bottom: 15px; }
.vg-footer-nav { text-align: center; }

/* 遮罩层 */
.vg-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 900; display: none; }
.vg-overlay.active { display: block; }
