/* =========================================
   GameDawa Core Style (Inven-like) v3.0
   ========================================= */

/* 1. 字体与基础重置 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/static/pretendard.css");

:root {
    --gd-blue: #1f75fe;  /* 核心蓝 */
    --gd-dark: #333333;  /* 深灰 */
    --gd-gray: #f2f2f2;  /* 背景灰 */
    --gd-border: #e1e1e1; /* 细边框 */
    --gd-red: #e42e2e;   /* 强调红 */
}

* { box-sizing: border-box; }

body {
    font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif;
    background-color: var(--gd-gray);
    color: var(--gd-dark);
    font-size: 13px;
    margin: 0; padding: 0;
    line-height: 1.5;
}

a { text-decoration: none; color: var(--gd-dark); }
a:hover { color: var(--gd-blue); }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }

.container { width: 1200px; margin: 0 auto; position: relative; padding: 0 10px; }
.gd-box { background: #fff; border: 1px solid var(--gd-border); }
.text-red { color: var(--gd-red) !important; }
.text-blue { color: var(--gd-blue) !important; }

/* Badge */
.badge { display: inline-block; padding: 2px 6px; font-size: 11px; font-weight: bold; color: #fff; border-radius: 2px; vertical-align: text-top; }
.badge-red { background: var(--gd-red); }
.badge-blue { background: var(--gd-blue); }

/* ================= Header ================= */
header { background: #fff; border-bottom: 1px solid #ddd; }
.header-top { height: 90px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 34px; font-weight: 900; color: var(--gd-blue); letter-spacing: -1.5px; text-transform: uppercase; font-family: sans-serif; }
.logo span { font-size: 14px; color: #888; font-weight: normal; margin-left: 5px; letter-spacing: 0; }
.search-bar { flex: 1; margin: 0 40px; max-width: 600px; }
.search-form { display: flex; border: 3px solid var(--gd-blue); height: 46px; background: #fff; }
.search-form input { flex: 1; border: none; padding: 0 15px; font-size: 15px; outline: none; font-weight: bold; }
.search-form button { width: 50px; background: #fff; border: none; color: var(--gd-blue); font-size: 18px; cursor: pointer; }
.user-tools { font-size: 12px; color: #888; white-space: nowrap; }

/* GNB */
.gnb { border-top: 1px solid #eee; background: #fff; }
.gnb ul { display: flex; height: 46px; align-items: center; }
.gnb li { margin-right: 25px; }
.gnb a { font-size: 15px; font-weight: bold; padding: 10px 0; display: block; }
.gnb a:hover, .gnb a.active { color: var(--gd-blue); border-bottom: 2px solid var(--gd-blue); }

/* ================= Layout ================= */
.main-layout { display: flex; gap: 20px; margin-top: 20px; align-items: flex-start; }
.content-area { width: 840px; flex-shrink: 0; }
.sidebar-area { width: 340px; flex-shrink: 0; }

/* ================= Hero Section (含动画与Tab) ================= */
.hero-box {
    display: flex;
    height: 380px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--gd-border);
}
.hero-left {
    flex: 1.8;
    position: relative;
    overflow: hidden; 
    border-right: 1px solid #eee;
    background: #000;
}
.hero-left img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1; transform: translateX(0);
}
.hero-overlay {
    position: absolute; bottom: 40px; left: 0; right: 0; padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff; pointer-events: none;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1; transform: translateY(0);
}
.hero-tabs {
    position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: rgba(0,0,0,0.8); display: flex; z-index: 10;
}
.hero-tab-item {
    flex: 1; color: #aaa; font-size: 13px; font-weight: bold; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-right: 1px solid rgba(255,255,255,0.1); transition: all 0.2s;
    text-align: center; padding: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-tab-item:hover { color: #fff; background: rgba(255,255,255,0.1); }
.hero-tab-item.active { background: var(--gd-red); color: #fff; }

/* Hero Animations */
.anim-out img { transform: translateX(-50px) scale(0.95); opacity: 0; }
.anim-out .hero-overlay { transform: translateY(20px); opacity: 0; }
.anim-ready img { transition: none !important; transform: translateX(50px) scale(1.05); opacity: 0; }
.anim-ready .hero-overlay { transition: none !important; transform: translateY(-20px); opacity: 0; }

.hero-right { flex: 1; padding: 20px; display: flex; flex-direction: column; }
.hero-title { font-size: 15px; font-weight: bold; border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 10px; }
.hero-list li { padding: 9px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.hero-list li a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================= [New] Mid-Tab Section (Inven 风格升级版) ================= */

/* 导航条容器：加顶线、底线、背景色 */
.mid-tab-nav {
    display: flex;
    /* 核心修改：顶部加粗蓝线，底部加细灰线，形成“夹心”感 */
    border-top: 2px solid var(--gd-blue);
    border-bottom: 1px solid #e1e1e1;
    background-color: #f7f9fa; /* 浅灰色背景，区分度更高 */
    margin-top: 30px;
    margin-bottom: 20px;
    padding-left: 0; /* 对齐左边 */
}

/* 单个选项卡 */
.mid-tab-item {
    padding: 12px 25px; /* 增加内边距，让点击范围更大 */
    font-size: 14px;
    font-weight: bold;
    color: #666; /* 默认深灰 */
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid #eee; /* 可选：给每个选项中间加个淡分割线 */
    position: relative;
    top: 1px; /* 微调位置，盖住底线 */
}

/* 鼠标悬停 */
.mid-tab-item:hover {
    color: #000;
    background-color: #fff;
}

/* 激活状态 (Active) */
.mid-tab-item.active {
    color: var(--gd-blue); /* 文字变蓝 */
    background-color: #fff; /* 背景变白，与下方内容融为一体 */
    border-bottom: 1px solid #fff; /* 【关键】用白线盖住父容器的灰底线，制造“连通”感 */
    /* 如果想更像 Inven，还可以给 active 加左右边框，这里先保持简洁 */
}

/* 内容容器 */
.mid-content-group {
    display: none; /* 默认隐藏 */
}
.mid-content-group.active {
    display: grid; /* 激活时显示网格 */
    grid-template-columns: 1.6fr 1fr 1fr 1fr; /* 第1个宽一点(1.6倍)，后3个等宽 */
    gap: 15px;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0.8; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 游戏卡片样式 */
.mid-card {
    background: #fff;
    border: 1px solid var(--gd-border);
    overflow: hidden;
}
.mid-card:hover { border-color: var(--gd-blue); }

/* 图片容器 */
.mid-thumb-box {
    width: 100%;
    position: relative;
    overflow: hidden;
}
.mid-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：自动裁剪填充 */
    transition: transform 0.3s;
}
.mid-card:hover img { transform: scale(1.05); }

/* 第1个：长方形完整图 */
.mid-card.full-view .mid-thumb-box {
    aspect-ratio: 16 / 9; /* 宽屏比例 */
}
/* 后3个：正方形方块图 */
.mid-card.square-view .mid-thumb-box {
    aspect-ratio: 1 / 1; /* 正方形 */
    object-position: center top; /* 焦点偏上一点点 */
}

/* 卡片文字 */
.mid-info { padding: 10px; }
.mid-title {
    font-weight: bold; font-size: 13px; line-height: 1.4;
    display: block; margin-bottom: 5px;
    height: 36px; overflow: hidden; /* 限制2行 */
}
.mid-meta { font-size: 12px; color: #888; }


/* ================= Footer & Other ================= */
.list-item { display: flex; background: #fff; border-bottom: 1px solid #eee; padding: 15px 0; }
.list-thumb { width: 160px; height: 90px; object-fit: cover; margin-right: 20px; border: 1px solid #eee; flex-shrink: 0; }
.list-content { flex: 1; }
.list-title { font-size: 16px; font-weight: bold; margin-bottom: 6px; display: block; }
.list-desc { font-size: 13px; color: #666; margin-bottom: 8px; line-height: 1.5; height: 40px; overflow: hidden; }
.reaction-bar { display: flex; gap: 15px; font-size: 12px; color: #999; }

.login-box { padding: 25px 20px; text-align: center; margin-bottom: 20px; background: #fff; border: 1px solid var(--gd-border); }
.btn-login { display: block; background-color: var(--gd-blue) !important; color: #ffffff !important; padding: 12px 0; font-weight: bold; font-size: 16px; margin: 15px 0; text-transform: uppercase; text-align: center;border-radius: 2px; /* 稍微加一点圆角更有质感 */}
.btn-login:hover {background-color: #0056b3 !important; color: #ffffff !important; text-decoration: none !important;}
.rank-widget { margin-bottom: 20px; border: 1px solid var(--gd-border); background: #fff; }
.rank-head { padding: 12px 15px; border-bottom: 1px solid #eee; background: #f9f9f9; font-weight: bold; font-size: 14px; }
.rank-item { padding: 10px 15px; border-bottom: 1px solid #eee; display: flex; align-items: center; font-size: 13px; }
.rank-num { width: 20px; height: 20px; background: #ccc; color: #fff; text-align: center; line-height: 20px; border-radius: 3px; margin-right: 10px; font-size: 11px; font-weight: bold; }
.rank-num.top { background: var(--gd-red); }
footer { margin-top: 50px; padding: 40px 0; background: #2b2b2b; color: #888; text-align: center; font-size: 12px; }

/* =========================================
   [2026-01-23 最终修正] 标题与线条位置调整D
   ========================================= */

/* 1. 标题栏容器：负责最上方的细灰线和整体边距 */
.section-header {
    display: flex !important;
    flex-direction: column !important;
    border-top: 1px solid #e1e1e1 !important; /* 顶部分割线 */
    margin-top: 40px !important;
    padding-top: 20px !important;
    position: relative !important; /* 为蓝线绝对定位提供参考 */
    margin-bottom: 20px !important;
}

/* 2. 标题文字：确保它在蓝线之上，并留出空隙 */
.section-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    padding-bottom: 12px !important; /* 给下面的蓝线留出位置 */
    display: inline-block !important;
    background: transparent !important;
}

/* 3. 【核心修正】蓝线：使用绝对定位，横跨全宽，卡在文字和列表之间 */
.section-header::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important; /* 贴在 section-header 的最底部 */
    left: 0 !important;
    width: 100% !important;
    height: 2px !important; /* 蓝线厚度 */
    background-color: var(--gd-blue) !important;
    z-index: 1 !important;
}

/* 4. 列表项：紧贴蓝线，不再设置顶部边框 */
.list-item {
    display: flex !important;
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
    padding: 20px !important;
    border-top: none !important; /* 确保不产生双重线 */
}