

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

body{
    background:#f5f6f7;
    font-family:"Microsoft YaHei",sans-serif;
    color:#333;
}



.container{
    width:1500px;
    max-width:95%;
    margin:20px auto;
}

/* 顶部 */

.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;
    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;
    }
}

.header-btn{
    padding:12px 24px;
    border-radius:30px;
    background:#00d2b3;
    color:white;
    cursor:pointer;
    font-weight:bold;
    white-space:nowrap;
    transition:.3s;
}

.header-btn:hover{
    opacity:.9;
}

.game-link{
    color:#000;
    text-decoration:none;
}

.game-link:link{
    color:#000;
    text-decoration:none;
}

.game-link:visited{
    color:#000;
    text-decoration:none;
}

.game-link:hover{
    color:#000;
    text-decoration:none;
}

.game-link:active{
    color:#000;
    text-decoration:none;
}



/* 主体 */

.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;
    transition:.3s;
}

.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:25px;
}

.tabs{
    display:flex;
    gap:30px;
    font-size:22px;
    font-weight:bold;
}

.tabs .active{
    color:#00d2b3;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
}

.card{
    background:white;
    border-radius:24px;
    overflow:hidden;
    transition:.3s;
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.card img{
    width:100%;
    display:block;
    height:260px; 
    object-fit:cover;
}

.card-body{
    padding:20px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    flex: 1; 
}

/* 让 card-body 内的主内容区占满可用宽度，以便内部子项靠右对齐 */
.card-content {
    flex: 1;
}

.game-title{
    font-size:16px; 
    font-weight:bold;
    margin-bottom:10px;
    line-height: 1.4;
}

/* ==================== 新增/修改：使简介与浏览量在同一排两端对齐 ==================== */
.game-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.game-desc{
    color:#777;
    font-size: 14px;
    flex: 1;
    /* 防止文本过长挤压右侧浏览量，可按需加省略号 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-desc a {
    color: inherit;
    text-decoration: none;
}

.views {
    color: #999;
    font-size: 13px;
    white-space: nowrap; /* 确保不换行 */
}

.score{
    font-size:40px; 
    color:#00d2b3;
    font-weight:bold;
    margin-left: 15px;
}

/* 右侧 */

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

.right h2{
    margin-bottom:18px;
}

.hot-item{
    display:flex;
    margin-bottom:18px;
    cursor:pointer;
    transition:.3s;
}

.hot-item:hover{
    opacity:.8;
}

.hot-item img{
    width:72px;
    height:72px;
    border-radius:16px;
    object-fit:cover;
    margin-right:15px;
}

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

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

.hot-desc{
    color:#999;
    font-size:13px;
    margin-top:4px;
}

/* 平板 */

@media(max-width:1200px){

.layout{
    display:flex;
    flex-direction:column;
}

.sidebar{
    display:none;
}

.center{
    order:1;
}

.right{
    order:2;
    margin-top:20px;
}

}

/* 手机 */

@media(max-width:768px){

.container{
    max-width:100%;
    padding:0 12px;
}

.header{
    height:auto;
    flex-wrap:wrap;
    gap:12px;
}

.logo{
    font-size:32px;
    min-width:auto;
}

.search{
    width:100%;
    order:3;
}

.search input{
    height:46px;
    font-size:14px;
}

.header-btn{
    padding:10px 16px;
    font-size:14px;
}

.tabs{
    gap:18px;
    font-size:16px;
    overflow-x:auto;
    white-space:nowrap;
    scrollbar-width:none;
}

.tabs::-webkit-scrollbar{
    display:none;
}

.card-grid {
    grid-template-columns: 1fr; 
    gap: 15px;
}

.card{
    border-radius:18px;
}

.card img{
    height:200px; 
}

.card-body{
    padding:15px;
}

.game-title{
    font-size:16px;
}

.game-desc{
    font-size:13px;
}

.score{
    font-size:32px;
}

.hot-item img{
    width:60px;
    height:60px;
}

.hot-title{
    font-size:16px;
}

.hot-desc{
    font-size:12px;
}

.right{
    margin-bottom:20px;
}

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

/* ==================== 动态分页组件样式 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none; /* 移除ul默认的圆点 */
    padding: 0;
    margin: 30px 0 10px 0;
    gap: 8px; /* 按钮之间的间距 */
}

/* 每一个分页项的包裹基础样式 */
.page-item {
    display: inline-block;
}

/* 按钮的初始默认样式 */
.page-item .page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px; /* 左右内边距，让“首页/上一页”文字能撑开成胶囊状 */
    font-size: 14px;
    font-weight: bold;
    color: #555;
    text-decoration: none;
    background: white;
    border-radius: 21px; /* 纯圆角胶囊风格，如果要方正一点可以改写成 8px */
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
    transition: all .2s ease;
    cursor: pointer;
    user-select: none;
}

/* 鼠标悬浮非当前页的效果 */
.page-item .page-link:hover {
    background: #e6fbf8;
    color: #00d2b3;
    transform: translateY(-1px);
}

/* 当前激活/高亮页面的样式（给含有 active 类的 li 里面的 span 生效） */
.page-item.active .page-link {
    background: #00d2b3;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 210, 179, 0.3);
    cursor: default; /* 已经是当前页，鼠标指针恢复默认 */
}

/* 手机端响应式优化 */
@media(max-width:768px){
    .pagination {
        gap: 5px; /* 手机端缩窄间距 */
    }
    .page-item .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

