:root {
    /* 主色调 - 现代蓝紫色系 */
    --primary-color: #5B6FED;
    --primary-dark: #4A5FD9;
    --primary-light: #7B8FED;

    /* 背景色 */
    --main-bg-color: #F8FAFC;
    --card-bg-color: #FFFFFF;
    --header-bg-color: #2D3748;

    /* 文字颜色 */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --text-white: #FFFFFF;

    /* 强调色 */
    --accent-color: #667EEA;
    --hover-color: #805AD5;
    --success-color: #48BB78;

    /* 边框和分割线 */
    --border-color: #E2E8F0;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* 游戏卡片特定 */
    --game-card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --game-card-hover-shadow: 0 10px 25px rgba(102, 126, 234, 0.25);

    /* 兼容旧变量名 */
    --header-color: var(--text-white);
    --block-title-color: var(--text-primary);
    --block-title-bg-color: var(--card-bg-color);
    --block-title-border-color: var(--border-color);
    --footer-bg-color: var(--main-bg-color);
    --detail-bg-color: var(--card-bg-color);
    --detail-info-bg-color: #F7FAFC;
}

body, main {
    background-color: var(--main-bg-color);
}

i.score {
    width: 1rem;
    height: 1rem;
    margin-top: 5px;
    display: inline-block;
    background-image: url("/static/images/score.svg");
    background-size: cover; /* 背景图片大小覆盖整个容器 */
    background-position: center; /* 背景图片居中显示 */
    background-repeat: repeat-x; /* 防止背景图片重复 */
}

.navbar {
    color: var(--header-color);
    background-color: var(--header-bg-color);
}

.navbar-brand, .nav-link {
    color: var(--header-color);
}

.nav-link:focus, .nav-link:hover, .navbar-brand:hover {
    color: var(--accent-color);
    text-shadow: none;
}
.navbar .menuBtn{
    width: 1.5rem;
}

.container {
    max-width: 1200px;
}

.game-block {
    margin: 20px 0;
    color: var(--block-title-color);
}


/* 标题 */
.block-title {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 10px;
    justify-content: space-between;
}

.block-title:before, .block-title:after {
    content: '';
    height: 36px;
    background-color: var(--block-title-bg-color);
    border: 3px solid var(--block-title-border-color);
}

.block-title div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 6px;
    padding: 0 5px;
    font-size: 1.2rem;
    font-weight: 600;
    background-color: var(--block-title-bg-color);
    border: 1px solid var(--block-title-border-color);
}

/* 游戏区域 */
.game-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.game-card-big {
    width: 350px;
    display: inline-block;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-bg-color);
    cursor: pointer;
    overflow: hidden;
    margin: 8px 0;
    box-shadow: var(--game-card-shadow);
    transition: all 0.3s ease;
}

.game-card-big a {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    text-decoration: none;
}

.game-card-big .cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-card-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 图片显示在容器中心 */
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.game-card-big img:hover {
    transform: scale(1.1);
}

.game-card-big .game-name {
    bottom: 0;
    width: 100%;
    text-align: center;
    line-height: 1.5rem;
    color: var(--block-title-color);
    text-wrap: nowrap;
    text-overflow: ellipsis;
}

.game-card-big:hover {
    transform: translateY(-2px);
    box-shadow: var(--game-card-hover-shadow);
}

.game-card-big:hover .game-name {
    color: var(--hover-color);
}

@media (max-width: 476px) {
    .game-card-big {
        width: 49%;
    }

    .game-card-big .cover {
        height: 100px;
    }
}

/* 游戏方块 */
.game-card-middle {
    width: 125px;
    display: inline-block;
    position: relative;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    margin: 5px 0;
    background-color: var(--card-bg-color);
    box-shadow: var(--game-card-shadow);
    transition: all 0.3s ease;
}

.game-card-middle a {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    text-decoration: none;
}

.game-card-middle .cover {
    width: 100%;
    height: 100%;
    overflow: hidden;

}

.game-card-middle img {
    width: 100%;
    object-fit: cover;
    overflow: hidden;
    object-position: center; /* 图片显示在容器中心 */
    transition: transform 0.3s ease-in-out;
}

.game-card-middle img:hover {
    transform: scale(1.1);
}

.game-card-middle .game-name {
    width: 100%;
    margin-top: 5px;
    font-size: .8rem;
    text-align: center;
    color: var(--block-title-color);
    display: inline-block; /* 或使用 `block` 模式的布局方式 */
    white-space: normal; /* 允许文本换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 显示省略号 */
    max-height: 2em; /* 设置最大高度，根据字体大小以适应两行文本。2.2em 相当于两倍行高 */
    line-height: 1em; /* 设置行高 */
}

.game-card-middle:hover {
    transform: translateY(-2px);
    box-shadow: var(--game-card-hover-shadow);
}

.game-card-middle:hover .game-name {
    color: var(--hover-color);
}

@media (max-width: 476px) {
    .game-card-middle{
        width: 32%;
    }
}

/* 左右布局 */
.game-card-lr {
    width: 20%;
    padding-right: 5px;
    overflow: hidden;
    margin: 5px 0
}

.game-card-lr a {
    display: flex;
    flex-direction: row;
    text-decoration: none;
}

.game-card-lr img {
    width: 5rem;
    height: 5rem;
    overflow: hidden;
    margin-right: 10px;
    border-radius: 5px;
    transition: transform 0.3s ease-in-out;
}

.game-card-lr img:hover {
    transform: scale(1.1);
}

.game-card-lr .desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--text-primary);
}

.game-card-lr .game-name {
    white-space: wrap; /* 允许文本换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 显示省略号 */
    max-height: 2em; /* 设置最大高度，根据字体大小以适应两行文本。2.2em 相当于两倍行高 */
    line-height: 1em; /* 设置行高 */
}

@media (max-width: 476px) {
    .game-card-lr{
        width: 50%;
        font-size: .8rem;
    }
    .game-card-lr img{
        width: 4rem;
        height: 4rem;
    }
}

/* 小方块游戏 */
.game-card-small {
    width: 150px;
    height: 150px;
    display: inline-block;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    margin: 8px 0;
    box-shadow: var(--game-card-shadow);
    z-index: 100;
    background-color: var(--card-bg-color);
    transition: all 0.3s ease;
}

.game-card-small:hover {
    transform: translateY(-2px) scale(1.02);
    z-index: 1000;
    box-shadow: var(--game-card-hover-shadow);
}

.game-card-small a {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    text-decoration: none;
}

.game-card-small .cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-card-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 图片显示在容器中心 */
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.game-card-small .game-name {
    position: absolute;
    bottom: 0;
    height: 0;
    width: 100%;
    text-align: center;
    color: var(--text-primary);
    text-wrap: nowrap;
    text-overflow: ellipsis;
    transition: all 0.3s ease-out;
}

.game-card-small:hover .game-name {
    height: 1.5rem;
    background-color: var(--card-bg-color);
    color: var(--hover-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 476px) {
    .game-card-small {
        width: 30%;
    }
}


footer{
    padding-top: 3rem;
    background-color: var(--footer-bg-color);
}
footer .about{
    margin: 1rem;
    padding: 2rem;
    background-color: var(--main-bg-color);
    border-radius: 15px;
}
footer .about p{
    text-align: left;
    margin-top: 1rem;
}

footer .copyright{
    margin-top: 1rem;
    font-size: .8rem;
}