

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:#f5f6f7;
    font-family:"Microsoft YaHei",sans-serif;
    color:#333;
    -webkit-tap-highlight-color: transparent; /* 清除移动端点击高亮阴影 */
}

/* 核心优化1：宽度改为自适应，配合 padding 防止手机端贴边 */
.container{
    width: 100%;
    max-width: 1500px;
    margin: 20px auto;
    padding: 0 15px;
}

/* 顶部 */
.header{
    height:80px;
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:20px;
}

.logo{
    font-size:46px;
    font-weight:900;
    color:#00d2b3;
    min-width:220px;
}

.search{
    flex:1;
}

.search input{
    width:100%;
    height:52px;
    border:none;
    border-radius:30px;
    padding:0 25px;
    font-size:16px;
    background:white;
    box-shadow:0 2px 10px rgba(0,0,0,.04);
}

.header-btn{
    padding:12px 24px;
    border-radius:30px;
    background:#00d2b3;
    color:white;
    cursor:pointer;
    font-weight:bold;
    white-space: nowrap; /* 防止按钮文字换行 */
}

/* 布局 */
.layout{
    display:grid;
    grid-template-columns:240px 1fr 330px;
    gap:20px;
}

/* 左侧 */
.sidebar{
    background:white;
    border-radius:20px;
    padding:20px;
    height:fit-content;
}

.menu{
    list-style:none;
}

.menu li{
    padding:14px 18px;
    margin-bottom:6px;
    border-radius:12px;
    cursor:pointer;
}

.menu li:hover{
    background:#f5f5f5;
}

.menu .active{
    background:#f1f1f1;
    font-weight:bold;
}

.line{
    height:1px;
    background:#eee;
    margin:20px 0;
}

/* 中间 */
.center{
    display:flex;
    flex-direction:column;
    gap:20px;
    min-width: 0; /* 配合 Flex/Grid 防止中文撑破布局 */
}

/* 游戏详情卡 */
.detail-card{
    background:white;
    border-radius:24px;
    overflow:hidden;
}

/* 顶部信息 */
.game-top{
    display:flex;
    gap:25px;
    padding:25px;
}

.cover{
    width:420px;
    height:240px;
    border-radius:16px;
    object-fit:cover;
    flex-shrink: 0; /* 保证 PC 端图片不被挤压 */
}

.info{
    flex:1;
    min-width: 0;
}

.info h1{
    font-size:18px;
    margin-bottom:10px;
    line-height: 1.2;
}

.tags{
    display:flex;
    gap:10px;
    margin-bottom:12px;
    flex-wrap: wrap; /* 标签过多自动换行 */
}

.tags span{
    background:#f0f0f0;
    padding:4px 12px;
    border-radius:10px;
    font-size:12px;
    color: #666;
}

.score{
    font-size:44px;
    color:#00d2b3;
    font-weight:bold;
    margin:5px 0 12px 0;
}

.info p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* 核心优化2：按钮组利用 flex-wrap 完美响应 */
.download-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
}

.download-group button{
    padding:12px 20px;
    border:none;
    border-radius:20px;
    cursor:pointer;
    background:#00d2b3;
    color:white;
    font-weight: bold;
    flex: 1; /* 手机端平分宽度 */
    min-width: 100px; /* 保证基本宽度 */
    transition: background 0.2s;
}

.download-group button:hover {
    background: #00bfa3;
}

/* 模块 */
.section{
    background:white;
    border-radius:20px;
    padding:25px;
}

.section h2{
    margin-bottom:18px;
    font-size: 20px;
}

.section p {
    line-height: 1.8;
    color: #444;
}

/* 截图 */
.screens{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

.screens img{
    width:100%;
    height: auto;
    border-radius:12px;
    display: block;
}

/* 评论 */
.comment{
    display:flex;
    gap:15px;
    margin-bottom:20px;
}
.comment:last-child {
    margin-bottom: 0;
}

.avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    background:#00d2b3;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight: bold;
    flex-shrink: 0;
}

.user{
    font-weight:bold;
    margin-bottom:6px;
    color: #111;
}

.comment-content {
    color: #555;
    line-height: 1.5;
}

/* 右侧 */
.right{
    background:white;
    border-radius:20px;
    padding:20px;
    height:fit-content;
}

.right h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.hot-item{
    display:flex;
    margin-bottom:18px;
    cursor:pointer;
}
.hot-item:last-child {
    margin-bottom: 0;
}

.hot-item img{
    width:60px;
    height:60px;
    border-radius:12px;
    margin-right:12px;
    object-fit: cover;
}

.hot-title{
    font-weight:bold;
    font-size: 15px;
}

.hot-score{
    color:#00d2b3;
    font-size:13px;
    margin-top:6px;
}


/* ===================================================
   💥 核心优化：针对移动端/窄屏电脑的媒体查询适配
====================================================== */

/* 1. 当屏幕小于 1200px（平板/小屏电脑） */
@media(max-width:1200px){
    .layout{
        grid-template-columns:1fr; /* 三栏变单栏 */
    }
    .sidebar{
        display:none; /* 隐藏侧边栏导航 */
    }
    .right{
        order: 1; /* 推荐位挪到主内容下方 */
    }
}

/* 2. 当屏幕小于 768px（手机端极致优化） */
@media(max-width:768px){
    .container {
        margin: 10px auto;
    }
    
    /* 顶部导航折行适配 */
    .header {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 12px;
    }
    .logo {
        font-size: 32px;
        min-width: auto;
    }
    .header-btn {
        display: none; /* 手机端隐藏顶部的多余按钮 */
    }

    /* 游戏卡片由“横向”改为“纵向” */
    .game-top{
        flex-direction:column;
        padding: 15px;
        gap: 15px;
    }
    
    .cover{
        width:100%; /* 封面图宽度拉满 */
        height: 200px; /* 固定高度，防止崩塌 */
    }
    
    .info h1 {
        font-size: 18px; /* 减小标题字号 */
    }
    
    /* 游戏截图由“两列”改为“单列”垂直排列，看得更清 */
    .screens{
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .section {
        padding: 15px; /* 适当减小内边距增加可用空间 */
    }
    
    /* 手机端按钮向下纵向撑满，方便手指点击 */
    .download-group button {
        flex: 1 1 100%; 
        padding: 14px;
    }
}



.cta{
  display:block;
  width:max-content;      /* 或固定宽度 */
  margin:15px auto;       /* 关键 */
  background:#0066ff;
  color:#fff;
  padding:14px 36px;
  border-radius:30px;
  font-weight:700;
}


.section img{display:block;max-width:100%;height:auto;margin:20px auto;border-radius:10px}

@media screen and (min-width:768px){
img{
width:500px;
}
}
@media screen and (max-width:768px){
img{
width:90%;
}
}


.footer{
    background:#111;
    color:#aaa;
    margin-top:10px;
    padding:20px 20px;
}

/* ==================== 搜索框整体美化 ==================== */
.search {
    flex: 1;
    max-width: 90%; /* 限制最大宽度，防止在大屏上拉得太长 */
}

/* 让表单变成一个整体的容器 */
.search form {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 4px 6px 4px 20px; /* 左边留出空间给文字，右边紧凑留给按钮 */
    box-shadow: 0 4px 16px rgba(0,0,0,.04); /* 柔和的阴影 */
    transition: all .3s ease;
    border: 1px solid transparent; 
}

/* 当用户点击输入框，或者整个表单聚焦时，外框变色 */
.search form:focus-within {
    border-color: #00d2b3;
    box-shadow: 0 4px 20px rgba(0, 210, 179, 0.15);
}

/* 输入框原生样式重置与美化 */
.search input[type="search"] {
    flex: 1;
    height: 44px;
    border: none !important; /* 去除 Bootstrap 的默认边框 */
    background: transparent !important; /* 融合进父级白色背景 */
    padding: 0;
    font-size: 15px;
    color: #333;
    box-shadow: none !important; /* 去除 Bootstrap 聚焦时的蓝色阴影 */
}

/* 占位符颜色调整 */
.search input::placeholder {
    color: #bbb;
}

/* 搜索按钮美化 */
.search button[type="submit"] {
    height: 44px;
    width: 52px;
    border: none !important; /* 去除 Bootstrap 默认边框 */
    background: #00d2b3 !important; /* 换成你站点的标志性青色 */
    color: white !important;
    font-size: 16px;
    border-radius: 22px !important; /* 完美圆形按钮 */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(0, 210, 179, 0.2);
}

/* 按钮悬浮和点击效果 */
.search button[type="submit"]:hover {
    background: #00be9b !important;
    transform: scale(1.03);
}

.search button[type="submit"]:active {
    transform: scale(0.97);
}

/* 手机端自适应微调 */
@media(max-width:768px){
    .search form {
        padding: 2px 4px 2px 15px;
    }
    .search input[type="search"] {
        height: 38px;
        font-size: 14px;
    }
    .search button[type="submit"] {
        height: 38px;
        width: 46px;
        font-size: 14px;
    }
}

.related-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 核心：强制一行两个，平分空间 */
    gap: 15px !important; /* 卡片之间的间距 */
    margin-top: 15px !important;
}

.related-item {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important; /* 纯白底色 */
    padding: 14px !important;
    border-radius: 16px !important; /* 柔和圆角 */
    text-decoration: none !important;
    color: #333 !important;
    transition: .3s !important;
    border: 1px solid #eee !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.02) !important;
}

.related-item:hover {
    border-color: #00d2b3 !important; /* 悬浮时变站点的青色 */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.06) !important;
}

.related-img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    margin-right: 14px !important;
    flex-shrink: 0 !important;
}

.related-info {
    flex: 1 !important;
    min-width: 0 !important; /* 防止标题太长撑开变形 */
}

.related-title {
    font-size: 14px !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important; /* 超出字数自动变省略号 */
}

.related-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #999 !important;
}

.related-tag {
    color: #00d2b3 !important;
    background: #e6fbf8 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
}

/* 手机端自适应：屏幕太小时自动变成一排一个，防止挤压 */
@media(max-width: 576px) {
    .related-grid {
        grid-template-columns: 1fr !important;
    }
}