@charset "utf-8";

/*
Theme Name: W-Shangshan
Theme URI: https://haremu.com
Description: 继承H-Siren的子主题，做一些个人博客个人风格的改动
Author: 尚衫夏香
Author URI:
Template: H-Siren
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: w-shangshan
Tags: blog, entertainment, one-column, two-columns, left-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-image-header, featured-images, footer-widgets, theme-options, threaded-comments
*/

/* 导入像素字体 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* 导入现代字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

/*
 * 子主题样式区域
 * 父主题 (H-Siren) 的样式会自动继承
 * 在这里添加你想要覆盖的样式
 */

/* =========================================
   顶部 Banner 铺满全屏宽度
   ========================================= */
.pattern-center {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: none !important;
}

/* 确保 Banner 内的图片也铺满 */
.pattern-attachment-img {
    width: 100% !important;
    max-width: none !important;
}

/* =========================================
   CSS 变量
   ========================================= */
:root {
    --neon-green: #CCFF00;
    --neon-fuchsia: #FF00FF;
    --neon-cyan: #00FFFF;
}

/* 字体设置 */
.games-page-container {
    font-family: 'Inter', 'Courier New', monospace;
}

/* =========================================
   左右固定侧边栏样式
   ========================================= */

/* 左侧边栏 */
.sidebar-placeholder-left {
    position: fixed;
    top: 100px; /* 距离顶部距离，根据你的头部高度调整 */
    left: 20px;
    width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 999;
}

/* 右侧边栏 */
.sidebar-placeholder-right {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 250px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 999;
}

/* 小工具样式美化 */
.widget {
    background: rgba(255, 255, 255, 0.9); /* 半透明背景 */
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 1.1rem;
    color: #444;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 0;
}

/* 针对主内容区域，增加左右内边距，防止内容被侧边栏遮挡 */
/* 注意：移除了 .pattern-center 和 .pattern-attachment，让顶部 Banner 铺满宽度 */
.wrapper, .container {
    margin-left: 290px !important; /* 250px 侧边栏 + 40px 间距 */
    margin-right: 290px !important;
    max-width: none !important;
}

/* 移动端响应式：隐藏侧边栏，恢复原状 */
@media (max-width: 1200px) {
    .sidebar-placeholder-left,
    .sidebar-placeholder-right {
        display: none; /* 小屏幕隐藏侧边栏 */
    }

    .wrapper, .container {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 1000px !important; /* 恢复最大宽度 */
    }

    /* 排行榜响应式 */
    .ranking-layout {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }

    .ranking-featured {
        padding: 10px;
    }

    .featured-1,
    .featured-2,
    .featured-3 {
        align-self: center;
        width: 100%;
        transform: none;
        z-index: 1;
    }

    .ranking-list-container {
        max-height: 400px;
        order: 2;
    }

    .featured-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ranking-featured {
        min-height: 350px;
    }

    .ranking-list-container {
        max-height: 350px;
    }

    .featured-card {
        padding: 15px;
    }

    .featured-title {
        font-size: 1.2rem;
    }

    .featured-badge {
        width: 50px;
        height: 50px;
    }

    .badge-number {
        font-size: 1.5rem;
    }

    .list-item {
        padding: 10px;
    }

    .list-image {
        width: 45px;
        height: 45px;
    }

    .list-title {
        font-size: 0.9rem;
    }

    .list-desc {
        font-size: 0.7rem;
    }

    /* 移动端禁用CRT效果 */
    .games-page-container::before,
    .games-page-container::after {
        display: none;
    }
}

/* =========================================
   5. 游戏排行榜页面样式
   ========================================= */
.games-page-container,
.anime-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
}

.games-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

.games-section,
.anime-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 12px;
    color: #333;
    border-bottom: 3px solid #f0f0f0;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #3b82f6;
}

/* --- 排行榜样式（简洁现代风格）--- */
.ranking-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* ====== 左侧：前三名卡片 ====== */
.ranking-featured {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.featured-card {
    position: relative;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    background: #fff;
}

.featured-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 徽章 */
.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.badge-number {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: #3b82f6;
}

.featured-1 .badge-number { color: #f59e0b; }
.featured-2 .badge-number { color: #8b5cf6; }
.featured-3 .badge-number { color: #10b981; }

/* 图片区域 */
.featured-image {
    width: 140px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

/* 信息区域 */
.featured-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
}

.featured-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.featured-desc {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* 标签 */
.featured-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.featured-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
}

/* ====== 右侧：完整榜单列表 ====== */
.ranking-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 滚动条样式 */
.ranking-list-container::-webkit-scrollbar {
    width: 4px;
}

.ranking-list-container::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 2px;
}

.ranking-list-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.ranking-list-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.list-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
}

.list-item:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.list-number {
    font-size: 1.1rem;
    font-weight: 700;
    width: 40px;
    color: #9ca3af;
}

.list-item:hover .list-number {
    color: #3b82f6;
}

.list-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.list-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
    border: 1px solid #e9ecef;
}

.list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-info {
    flex: 1;
}

.list-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: #1f2937;
}

.list-desc {
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.4;
}

.list-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.list-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
}

/* --- T度榜单样式 --- */
.tier-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.tier-block {
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.tier-label {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
}

.tier-t0 .tier-label {
    background: #f59e0b;
}

.tier-t1 .tier-label {
    background: #8b5cf6;
}

.tier-t2 .tier-label {
    background: #6b7280;
}

.tier-t3 .tier-label {
    background: #9ca3af;
}

.tier-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.tier-game-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tier-game-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tier-game-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.tier-game-name {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}

/* --- 九宫格样式 --- */
.matrix-container {
    overflow-x: auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.matrix-wrapper {
    display: grid;
    grid-template-columns: 140px repeat(5, 1fr);
    gap: 12px;
    min-width: 900px;
}

.matrix-header-row {
    display: contents;
}

.matrix-corner {
    grid-column: 1 / 2;
    font-weight: 700;
    text-align: center;
    padding: 16px 8px;
    background: #3b82f6;
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
}

.matrix-col-label {
    background: #fff;
    color: #3b82f6;
    padding: 16px 12px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.matrix-row {
    display: contents;
}

.matrix-row-label {
    grid-column: 1 / 2;
    background: #fff;
    color: #3b82f6;
    padding: 16px 12px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.matrix-cell {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.matrix-cell:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.cell-game {
    text-align: center;
    width: 100%;
    padding: 12px;
}

.cell-game img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.cell-game-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
}

.cell-empty {
    color: #d1d5db;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
    .games-page-container,
    .anime-page-container {
        padding: 0 20px;
    }

    .ranking-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .ranking-list-container {
        max-height: 400px;
    }

    .featured-card {
        width: 100%;
    }

    .matrix-wrapper {
        grid-template-columns: 100px repeat(5, 1fr);
        gap: 8px;
    }

    .tier-games {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* =========================================
   针对游戏/动漫排行榜页面的全宽样式
   ========================================= */

/* 通过页面模板名称隐藏侧边栏 */
body.page-template-page-games .sidebar-placeholder-left,
body.page-template-page-games .sidebar-placeholder-right,
body.page-template-page-anime .sidebar-placeholder-left,
body.page-template-page-anime .sidebar-placeholder-right {
    display: none !important;
}

/* 修复 Banner 全屏显示 - 必须保持原有的全屏样式 */
body.page-template-page-games .pattern-center,
body.page-template-page-anime .pattern-center {
    position: relative !important;
    width: 100vw !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: none !important;
}

body.page-template-page-games .pattern-attachment-img,
body.page-template-page-anime .pattern-attachment-img {
    width: 100% !important;
    max-width: none !important;
}

/* 游戏页面主内容全宽 */
body.page-template-page-games .wrapper,
body.page-template-page-games .container,
body.page-template-page-anime .wrapper,
body.page-template-page-anime .container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* 游戏页面容器全宽 */
body.page-template-page-games .games-page-container,
body.page-template-page-anime .anime-page-container {
    max-width: 100% !important;
    padding: 0 40px !important;
    margin: 40px 0 !important;
}

/* 针对 H-Siren 主题的 .site-content 容器，移除宽度限制 */
body.page-template-page-games .site-content,
body.page-template-page-anime .site-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 针对 H-Siren 主题的 #primary 容器，全宽 */
body.page-template-page-games #primary,
body.page-template-page-anime #primary {
    width: 100% !important;
    max-width: 100% !important;
}

/* 针对 H-Siren 主题的 .site-main 容器，全宽 */
body.page-template-page-games .site-main,
body.page-template-page-anime .site-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 40px !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body.page-template-page-games .games-page-container,
    body.page-template-page-anime .anime-page-container {
        padding: 0 20px !important;
    }
}

