body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
}
.navbar {
    display: flex;
    align-items: center;
    background: #222;
    color: #fff;
    padding: 0 32px;
    height: 56px;
}
.navbar .logo {
    font-size: 1.6em;
    font-weight: bold;
    color: #1976d2;
    margin-right: 32px;
    display: flex;
    align-items: center;
}
.navbar nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 24px;
    font-size: 1em;
}
.navbar .search {
    margin-left: auto;
    display: flex;
    align-items: center;
}
.navbar input[type="text"] {
    padding: 6px 12px;
    border-radius: 16px;
    border: none;
    outline: none;
    font-size: 1em;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    height: 40px;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    margin-right: 16px;
    z-index: 1001;
}
.nav-toggle .bar {
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}
.main-left {
    width: 900px;
    max-width: 938px;
    margin: 0 auto;
}
.container {
    display: flex;
    margin: 28px auto;
    max-width: 1456px;
    gap: 32px;
}
.main-content {
    flex: 2;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 16px #0001;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.main-content img {
    width: 100%;
    max-width: 700px;
    border-radius: 16px;
    margin-bottom: 24px;
}
.main-content h1 {
    margin: 0 0 12px 0;
    font-size: 2.2em;
}
.main-content p {
    margin: 0 0 24px 0;
    color: #555;
    font-size: 1.1em;
}
.main-content .play-btn {
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 14px 36px;
    font-size: 1.2em;
    cursor: pointer;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar {
    flex: 1;
    border-radius: 24px;
    padding: 24px;
    min-width: 320px;
}
.sidebar h2 {
    color: #e53935;
    margin-top: 0;
    font-size: 1.3em;
}
.featured-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.featured-game {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 9px;
    width: 140px;
    box-sizing: border-box;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.featured-game img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 6px;
}
.featured-game .tag {
    background: #e53935;
    color: #fff;
    font-size: 0.8em;
    border-radius: 8px;
    padding: 2px 8px;
    margin-bottom: 4px;
}
.featured-game .title {
    font-weight: bold;
    font-size: 1em;
    color: #222;
}
.games-section {
    margin: 48px auto 0 auto;
    max-width: 1458px;
    padding: 0 24px 32px 24px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}
.section-header h2 {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    color: #222;
}
.section-header .new-title {
    color: #a259f7;
}
.section-desc {
    margin: 4px 0 0 0;
    color: #8a94a6;
    font-size: 1em;
}
.view-all-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    transition: color 0.2s;
}
.view-all-link:hover {
    color: #0d47a1;
}
.new-link {
    color: #a259f7;
}
.games-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.game-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 16px #0001;
    width: 192px;              /* 调整为228px */
    padding: 10px 10px 10px 10px; /* 适当缩小内边距 */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}
.game-card:hover {
    box-shadow: 0 6px 24px #0002;
    transform: translateY(-4px) scale(1.03);
    border-color: #a259f7;
}
.game-card img {
    width: 184px;
    height: 103px;             /* 可适当微调图片高度 */
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 9px;
    background: #f3f3f3;
}
.game-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.game-title {
    font-size: 0.9em;
    font-weight: 450;
    color: #222;
    margin-bottom: 6px;
    overflow: hidden;            /* 超出隐藏 */
    text-overflow: ellipsis;     /* 超出显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;      /* 最多两行 */
    -webkit-box-orient: vertical;
    white-space: normal;
    max-height: 2.8em;          /* 控制两行高度 */
    max-width: 170px;
    cursor: pointer;
}
.game-card:hover .game-title {
    box-shadow: none;
    position: static;
    z-index: auto;
    left: auto;
    top: auto;
    padding: 0;
    border-radius: 0;
    max-width: 170px;
    max-height: unset;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    display: block;           /* 关键：改为 block，去掉 -webkit-box 多行截断 */
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}
.game-meta {
    font-size: 0.98em;
    color: #8a94a6;
    display: flex;
    gap: 16px;
}
.icon-star::before {
    content: "\f005";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ebe45fe8;
    margin-right: 4px;
}
.icon-users::before {
    content: "\f500";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #8a94a6;
    margin-right: 4px;
}
.bloodmoney-section {
    max-width: 1200px !important;
    margin: 48px auto 0 auto;
}
.bloodmoney-section .bm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.bloodmoney-section .bm-icon {
    flex-shrink: 0;
}
.bm-feature-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 2em;
}
.bm-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #e3d7fa;
    border-radius: 14px;
    padding: 16px 18px;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 2px 8px #a259f71a;
    font-size: 1em;
    flex: 1 1 220px;
}
.bm-feature-icon {
    font-size: 1.5em;
    margin-top: 2px;
    display: flex;
    align-items: center;
}
.bm-feature-title {
    font-weight: 600;
    font-size: 1.08em;
    margin-bottom: 2px;
    color: #222;
}
.bm-feature-desc {
    color: #666;
    font-size: 0.98em;
}
.bm-details {
    background: #faf7ff;
    border-radius: 18px;
    padding: 28px 24px 18px 24px;
    box-shadow: 0 2px 16px #a259f71a;
    margin-top: 1.5em;
}
.bm-list {
    margin: 0.5em 0 0.5em 1.2em;
    padding: 0;
    color: #444;
    font-size: 1em;
}
.bm-list li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
a:hover {
    color: #a259f7;
    text-decoration: none;
}
/* 评分星星动画 */
@keyframes star-bounce {
    0% { transform: scale(1) rotate(-8deg);}
    50% { transform: scale(1.15) rotate(8deg);}
    100% { transform: scale(1) rotate(-8deg);}
}

/* 更自然的评分星星动画：轻微缩放呼吸效果 */
@keyframes star-breath {
    0% { transform: scale(1);}
    50% { transform: scale(1.13);}
    100% { transform: scale(1);}
}
.star-animate {
    display: inline-block;
    animation: star-breath 1.6s ease-in-out infinite;
}

/* 标签动效 */
.tag-animate {
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}
.tag-animate:hover {
    box-shadow: 0 4px 16px #a259f755;
    transform: translateY(-3px) scale(1.07);
}
/* How to Play 卡片整体 */
.how-to-play-card {
    max-width: 900px;
    margin: 36px auto 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 2px 16px #0001;
    padding: 32px 28px 28px 28px;
    position: relative;
    transition: box-shadow 0.2s;
}
.how-to-play-card:hover {
    box-shadow: 0 6px 32px #a259f722;
}

/* 标题 */
.how-to-play-header {
    font-size: 1.28em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    color: #222;
}
.how-to-play-header .fa-gamepad {
    color: #a259f7;
    font-size: 1.2em;
}

/* 内容区布局 */
.how-to-play-content {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.how-to-controls {
    flex: 1 1 320px;
    min-width: 220px;
}
.control-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.control-key {
    font-weight: 600;
    background: #f6f8fa;
    padding: 10px 18px;
    border-radius: 10px;
    min-width: 160px;
    text-align: center;
    color: #222;
    box-shadow: 0 1px 4px #a259f70a;
    font-size: 1em;
    margin-right: 8px;
    flex-shrink: 0;
}
.control-desc {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
    flex: 1;
}

/* 说明区 */
.how-to-instructions {
    flex: 1 1 220px;
    min-width: 180px;
}
.instructions-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #222;
    font-size: 1.08em;
}
.how-to-instructions ul {
    color: #444;
    font-size: 1em;
    line-height: 1.7;
    padding-left: 20px;
    margin: 0;
}

/* 移动端提示 */
.how-to-mobile-tip {
    margin-top: 28px;
    background: #f6f8fa;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c6f7a;
    font-size: 1em;
}
.how-to-mobile-tip .fa-undo {
    font-size: 1.2em;
    color: #a259f7;
}

/* 游戏描述区样式 */
.game-desc-section {
    max-width: 1200px;
    margin: 48px auto 0 auto;
    padding-bottom: 32px;
}
.game-desc-title {
    font-size: 1.45em;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.game-desc-lead {
    font-size: 1.12em;
    color: #4b4f5b;
    margin-bottom: 18px;
    font-weight: 500;
}
.game-desc-section p {
    color: #6c6f7a;
    font-size: 1.04em;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* 文件路径: /css/style.css */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff4d4f;
    color: #fff;
    font-size: 0.95em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    box-shadow: 0 2px 8px #ff4d4f33;
    z-index: 2;
    letter-spacing: 1px;
    display: block; 
}

/* 搜索下拉框样式 */
.search-dropdown {
    position: absolute;
    top: 48px;
    right: 0;              /* 从右侧对齐 */
    transform: none;        /* 去掉居中 */
    width: 420px;           /* 可根据实际调整 */
    max-width: 90vw;
    background: #fff;
    box-shadow: 0 4px 24px #0002;
    border-radius: 18px;
    z-index: 99;
    display: none;
    max-height: 420px;
    overflow: auto;
}

/* 响应式优化 */
@media (max-width: 700px) {
    .how-to-play-card {
        padding: 20px 8px 18px 8px;
    }
    .how-to-play-content {
        flex-direction: column;
        gap: 18px;
    }
    .how-to-controls, .how-to-instructions {
        min-width: 0;
    }
    .control-key {
        min-width: 110px;
        font-size: 0.98em;
        padding: 8px 10px;
    }
}
@media (max-width: 1100px) {
    .games-list {
        gap: 18px;
    }
    .game-card {
        width: 170px;
        padding: 10px 10px 8px 10px;
    }
    .game-card img {
        height: 80px;
    }
}
@media (max-width: 800px) {
    .games-section {
        padding: 0 4vw 24px 4vw;
    }
    .games-list {
        flex-wrap: wrap;
        gap: 12px;
    }
    .game-card {
        width: 46vw;
        min-width: 140px;
        max-width: 200px;
    }
    .navbar nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100vw;
        background: #222;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
        z-index: 1000;
    }
    .navbar nav.open {
        display: flex;
    }
    .nav-toggle {
        display: flex;
    }
    .navbar .search {
        display: none;
    }
}
@media (max-width: 900px) {
    .bm-feature-cards {
        flex-direction: column;
        gap: 12px;
    }
    .bm-feature-card {
        min-width: 0;
        max-width: 100%;
    }
}
/* 移动端 Featured Games 区域下移到主内容下方 */
@media (max-width: 700px) {
    .container {
        display: flex;
        flex-direction: column;
    }
    .main-content {
        order: 1;
        width: 100%;
    }
    .sidebar {
        order: 2;
        width: 100%;
        margin-top: 24px;
        padding: 0;
    }
    .featured-list {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
    .featured-game {
        width: 48%;
        min-width: 140px;
        box-sizing: border-box;
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 8px #a259f71a;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .featured-game img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 6px;
    }
    .featured-game .title {
        font-size: 0.98em;
        text-align: center;
        margin-top: 2px;
    }
    .featured-game .tag {
        font-size: 0.8em;
        margin-bottom: 4px;
        color: #a259f7;
        background: #f3eaff;
        border-radius: 6px;
        padding: 2px 8px;
    }
}

/* 超小屏幕一行一个卡片 */
@media (max-width: 420px) {
    .featured-game {
        width: 100%;
        min-width: 0;
    }
}