
:root {
    --c-canvas-dark: #1f1a24;        /* 页面主背景: 深紫罗兰/黑 */
    --c-element-bg: #322b3b;         /* 卡片/侧边栏/菜单背景: 浅紫罗兰/灰 */
    --c-text-main: #ffffff;          /* 主要文字: 白色 */
    --c-text-light: #c0b9c9;         /* 辅助文字/侧边栏图标: 浅紫灰 */
    --c-accent-violet: #bb86fc;      /* 评分/高亮强调色: 亮紫罗兰 */
    --c-logo-pink: #ff4081;          /* Logo 上的粉色 */
    --c-status-red: #cf6679;         /* 收藏/爱心红色 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Arial', sans-serif;
    background-color: var(--c-canvas-dark);
    color: var(--c-text-main);
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* --- 2. PC 结构布局 (侧边栏 + 内容区) --- */
.desktop-layout {
    display: flex;
    min-height: 100vh;
}
.primary-content-area {
    flex-grow: 1;
    padding: 15px 20px;
    margin-left: 60px; /* 留出侧边栏的位置 */
}

/* --- PC 顶部栏 --- */
.header-main-pc {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.brand-search-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
}
.site-brand {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.site-brand i {
    color: var(--c-logo-pink);
    font-size: 24px;
    margin-right: 5px;
}
.search-input-box {
    flex-grow: 1;
    margin: 0 20px;
    max-width: 500px;
    position: relative;
}
.search-input-box input {
    width: 100%;
    padding: 8px 15px;
    padding-right: 40px;
    border-radius: 20px;
    border: none;
    background-color: var(--c-element-bg);
    color: white;
    font-size: 14px;
}
.search-input-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-light);
}
.user-action-links {
    display: flex;
    gap: 15px;
    font-size: 14px;
    white-space: nowrap;
}
.user-action-links a {
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}
.user-action-links .leaderboard-btn { background-color: #555; }
.user-action-links .login-btn i { color: var(--c-status-red); }

/* --- PC 侧边栏 --- */
.main-navigation-panel {
    width: 60px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--c-canvas-dark);
    padding-top: 55px;
    border-right: 1px solid #444;
    z-index: 90;
    transition: width 0.3s;
    overflow: hidden;
}
.nav-panel-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    color: var(--c-text-light);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-size: 11px;
    flex-direction: column;
    text-align: center;
}
.nav-panel-item:hover {
    background-color: var(--c-element-bg);
    color: var(--c-text-main);
}
.nav-panel-item i {
    font-size: 18px;
    margin-bottom: 3px;
}
/* 侧边栏图标的颜色，保留原配色 */
.nav-panel-item:nth-child(1) i { color: #f06292; } /* New */
.nav-panel-item:nth-child(2) i { color: #81c784; } /* Trending */
.nav-panel-item:nth-child(3) i { color: #4fc3f7; } /* Picked */
.nav-panel-item:nth-child(4) i { color: #ff8a65; } /* All Categories */

.category-drawer {
    position: fixed;
    left: 60px;
    top: 0;
    width: 200px;
    height: 100vh;
    background-color: var(--c-element-bg);
    padding: 10px 0;
    display: none;
    z-index: 90;
    overflow-y: auto;
}
/* 模拟 PC 侧边栏展开效果 */
.main-navigation-panel:hover + .category-drawer { display: block; }
.drawer-link-entry {
    padding: 8px 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--c-text-light);
}
.drawer-link-entry:hover {
    background-color: #444;
    color: white;
}

/* --- 3. 内容区样式 --- */
.content-heading {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 900;
}
.content-heading i { color: var(--c-accent-violet); margin-right: 5px; } /* 强调色为紫罗兰 */

.section-layout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.action-link-more {
    font-size: 14px;
    color: var(--c-accent-violet);
    font-weight: bold;
}

/* 顶部横向滚动 (Most Played Games) */
.carousel-track {
    display: flex;
    overflow-x: scroll;
    gap: 10px;
    padding-bottom: 15px;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* 底部大卡片网格 (Recommended Games) */
.content-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* --- 4. 游戏卡片 (Card Styles) --- */
.media-tile-item {
    display: block;
    overflow: hidden;
    background-color: var(--c-element-bg);
    border-radius: 8px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.media-tile-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
}

.media-image-display {
    width: 100%;
    aspect-ratio: 16 / 9;
}
.carousel-track .media-tile-item .media-image-display {
    aspect-ratio: 1 / 1;
}
.media-image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.metadata-detail {
    padding: 8px;
    font-size: 13px;
}
.item-title-label {
    font-weight: bold;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-stats-info {
    color: var(--c-text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}
.item-stats-info i {
    color: var(--c-accent-violet);
    margin-right: 2px;
}

/* --- 5. Footer --- */
.page-footer-content {
    padding: 20px;
    background-color: #2b2331; /* 稍微比 main-bg 浅一点 */
    color: var(--c-text-light);
    border-top: 1px solid #444;
}
.page-footer-content h3 { color: white; font-size: 18px; margin-bottom: 10px; }
.page-footer-content h4 { color: var(--c-accent-violet); font-size: 16px; margin-bottom: 5px;}
.page-footer-content p { font-size: 13px; line-height: 1.6; margin-bottom: 15px; }


/* --- 6. 移动端 Header & Menu --- */
.mobile-header-bar {
    display: none;
    background-color: var(--c-canvas-dark);
    padding: 10px 15px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #444;
}
.mobile-logo-search-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* 移动端侧边栏 (Drawer Menu) */
.mobile-menu-drawer-panel {
    position: fixed; top: 0; left: 0; width: 75%; max-width: 300px; height: 100%;
    background-color: var(--c-element-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 300;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}
.mobile-menu-drawer-panel.open { transform: translateX(0); }
.mobile-drawer-header {
    padding: 20px 15px 10px;
    border-bottom: 2px solid #555;
    position: relative;
}
.mobile-drawer-header input {
    width: 100%;
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    background-color: var(--c-canvas-dark);
    color: white;
}
.mobile-drawer-link {
    padding: 12px 15px; border-bottom: 1px solid #444; display: flex;
    align-items: center; gap: 10px;
    color: white;
    font-size: 15px;
}
.mobile-drawer-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: var(--c-accent-violet); /* 强调色 */
}
#backdrop-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 290;
    display: none;
}


/* --- 7. 响应式布局 (Mobile < 992px) --- */
@media (max-width: 992px) {
    /* 结构重置 */
    .main-navigation-panel { display: none; }
    .primary-content-area { margin-left: 0; padding: 0 10px; }
    .header-main-pc { display: none; }
    .mobile-header-bar { display: flex; }
    .desktop-layout { display: block; }

    /* 卡片布局调整 */
    .carousel-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        overflow-x: hidden;
        padding: 0 5px 15px;
    }
    .carousel-track .media-tile-item {
        width: auto;
        flex-shrink: unset;
        aspect-ratio: unset;
    }
    .carousel-track .media-tile-item .media-image-display {
        aspect-ratio: 1/1;
    }

    .content-grid-large {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }

    /* 其他移动端优化 */
    .page-footer-content {
        padding: 15px;
    }
    .primary-content-area .content-heading {
        padding: 0 5px;
    }
}