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

:root {
    --primary-bg: #f5f5f5;
    --secondary-bg: #ffffff;
    --card-bg: #ffffff;
    --accent-color: #4a90e2;
    --text-primary: #333333;
    --text-secondary: #666666;
    --gradient: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-bg);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(74, 144, 226, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(74, 144, 226, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 30px auto;
    position: relative;
    z-index: 1;
}

.ad-section {
    background: transparent !important;
    box-shadow: none !important;
    padding: 20px 30px !important;
    margin: 10px auto !important;
    max-height: none;
}

.ad-container {
    padding: 0 4px;
    margin: 20px auto;
    text-align: center;
    max-height: none;
    width: 100%;
    min-width: 300px;
    max-width: 1200px;
}

.ad-container ins {
    display: block !important;
    width: 100% !important;
    min-width: 300px !important;
    max-width: 1200px !important;
    max-height: 250px;
}

.ad-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.logo {
    height: 50px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 1px;
}

header {
    background: #ffffff;
    color: var(--text-primary);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid;
    border-image: var(--gradient) 1;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: var(--text-primary);
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher button {
    padding: 8px 16px;
    margin: 0 5px;
    border: 2px solid var(--accent-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-switcher button.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.language-switcher button:hover:not(.active) {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent-color);
    margin: 3px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--accent-color);
}

.mobile-menu-toggle:hover span {
    background: white;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-menu-content {
    padding: 15px 20px;
}

.mobile-language-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-lang-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--accent-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-lang-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.mobile-lang-btn:hover:not(.active) {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-categories .category-card {
    min-width: 80px;
    flex: 0 0 auto;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    margin: 0 0 30px;
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 800;
    position: relative;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    clear: both;
}

h2::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 35px;
    background: var(--gradient);
    border-radius: 4px;
}

.featured-container {
    margin-bottom: 60px;
}

.featured-title-section {
    margin-bottom: 30px;
}

.featured-title {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 800;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Featured Games 区域 - 独立样式 */
#featured-grid {
    margin-bottom: 60px;
    padding-left: 0;
    padding-right: 0;
}

/* Categories 标题样式 */
#categories-title {
    margin-top: 60px;
}

/* 确保 section 之间有足够的间距 */
section.container {
    margin-bottom: 60px;
}

section.container:last-of-type {
    margin-bottom: 0;
}

#featured-grid {
    display: block !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#featured-grid .featured-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-auto-rows: 140px;
    grid-auto-flow: dense;
    gap: 15px;
}

#featured-grid .featured-mini-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

#featured-grid .featured-mini-card:nth-child(1) { grid-column: 1; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(2) { grid-column: 2; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(3) { grid-column: 3; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(4) { grid-column: 4; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(5) { grid-column: 5; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(6) { grid-column: 6; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(7) { grid-column: 7; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(8) { grid-column: 8; grid-row: 1; }
#featured-grid .featured-mini-card:nth-child(9) { grid-column: 1; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(10) { grid-column: 2; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(11) { grid-column: 3; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(12) { grid-column: 4; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(13) { grid-column: 5; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(14) { grid-column: 6; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(15) { grid-column: 7; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(16) { grid-column: 8; grid-row: 2; }
#featured-grid .featured-mini-card:nth-child(17) { grid-column: 1; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(18) { grid-column: 2; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(19) { grid-column: 3; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(20) { grid-column: 4; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(21) { grid-column: 5; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(22) { grid-column: 6; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(23) { grid-column: 7; grid-row: 3; }
#featured-grid .featured-mini-card:nth-child(24) { grid-column: 8; grid-row: 3; }

#featured-grid .featured-large-card {
}

#featured-grid .card-2x2 {
}

#featured-grid .card-2x1 {
}

#featured-grid .card-2x1-second {
}

#featured-grid .featured-mini-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    display: block;
}

#featured-grid .featured-large-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    display: block;
}

#featured-grid .card-2x2 img {
    height: 255px;
}

#featured-grid .card-2x1 img,
#featured-grid .card-2x1-second img {
    height: 120px;
}

#featured-grid .mini-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 15px 8px 8px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    backdrop-filter: blur(3px);
    box-sizing: border-box;
}

.featured-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.featured-mini-card:hover {
    transform: translateY(-5px);
}

.featured-mini-card img {
    width: 115px;
    height: 115px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mini-card-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 保留旧的 Featured 样式以兼容其他地方 */

/* #featured-grid {
    margin-bottom: 60px;
} */

.featured-games-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.featured-game-card {
    min-width: calc(100% - 30px);
    height: 450px;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    margin: 0 15px;
    flex-shrink: 0;
}

.featured-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.featured-game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
}

.featured-game-card:hover img {
    transform: scale(1.1);
}

.featured-game-card .game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px;
    z-index: 2;
    max-width: 800px;
}

.featured-game-card .game-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
    white-space: normal;
    line-height: 1.2;
    position: relative;
    padding-bottom: 8px;
}

.featured-game-card .game-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0;
    display: block !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
    background: transparent;
}

.featured-game-card .game-category {
    margin-bottom: 20px;
    font-size: 0.9rem;
    padding: 8px 20px;
    position: static;
    background: var(--gradient);
    color: white;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.featured-game-card .play-btn {
    width: auto;
    padding: 16px 40px;
    font-size: 1rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.game-card.size-1x2 img,
.game-card.size-2x2 img {
    height: 100%;
}

.game-card.size-1x1 .game-info,
.game-card.size-2x1 .game-info,
.game-card.size-2x2 .game-info {
    display: none;
}

/* Featured 区域小卡片同样隐藏信息 */
.featured-games-grid .game-card.size-1x1 .game-info,
.featured-games-grid .game-card.size-2x1 .game-info {
    display: none;
}

/* 卡片标题在小卡片中显示为底部叠加 */
.game-card.size-1x1,
.game-card.size-2x1,
.game-card.size-2x2 {
    position: relative;
}

.game-card::after,
.game-card.size-1x1::after,
.game-card.size-2x1::after,
.game-card.size-2x2::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0 0 20px 20px;
}

.game-card:hover img {
    transform: scale(1.15);
}

.game-info {
    padding: 15px;
}

.game-card.size-2x1 .game-info,
.game-card.size-1x1 .game-info {
    padding: 12px;
}

.game-card.size-1x2 .game-info,
.game-card.size-2x2 .game-info {
    padding: 18px;
}

.game-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.game-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
    border-radius: 0;
    display: block !important;
    border-bottom: 1px dashed #e0e0e0;
    background: transparent;
}

.game-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.game-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.play-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(74, 144, 226, 0.4);
}

.play-btn:active {
    transform: translateY(-1px);
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--card-bg);
    justify-content: center;
    align-items: flex-end;
}

.categories-container::-webkit-scrollbar {
    height: 8px;
}

.categories-container::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.categories-container::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

.category-card {
    background: linear-gradient(135deg, var(--primary-bg), var(--primary-dark));
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* 移除所有伪元素效果 */

/* 移除所有伪元素效果 */

.category-card:hover {
    /* 移除所有悬停效果 */
}

.category-card:hover .category-name {
    color: var(--accent-color);
}

.category-name {
    font-weight: 800;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.category-games-container {
    margin-top: 30px;
    display: none;
}

.category-games-container.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-auto-rows: 140px;
    grid-auto-flow: dense;
    gap: 15px;
}

/* 瀑布流网格布局 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-auto-rows: 140px;
    grid-auto-flow: dense;
    gap: 15px;
}

/* 卡片尺寸类 */
.game-card.size-1x1 {
    grid-column: span 1;
    grid-row: span 1;
    min-width: 120px;
}

.game-card.size-2x1 {
    grid-column: span 2;
    grid-row: span 1;
    min-width: 240px;
}

.game-card.size-1x2 {
    grid-column: span 1;
    grid-row: span 2;
    min-width: 120px;
}

.game-card.size-2x2 {
    grid-column: span 2;
    grid-row: span 2;
    min-width: 240px;
}

/* 确保图片填满卡片 */
.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.back-button-container {
    margin-bottom: 25px;
}

footer {
    color: var(--text-secondary);
    padding: 20px 0;
    margin-top: 40px;
    background: white;
}

footer .container {
    background: white !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

footer p {
    text-align: center;
    font-size: 0.9rem;
}

/* 非index.html页面的main container移除卡片效果和内边距 */
body:not(.index-page) main > .container {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.game-detail {
    margin-top: 30px;
}

.back-button-container {
    margin-bottom: 25px;
}

.back-button {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid rgba(255, 140, 66, 0.3);
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-button:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(255, 140, 66, 0.5);
    transform: translateY(-2px);
}

.game-main-info {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 140, 66, 0.1);
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 20px 0;
    color: var(--text-secondary);
}

.game-main-info .game-info {
    display: block;
    flex-direction: column;
    padding: 40px;
}

.game-main-info .game-info h2 {
    display: block;
    margin-bottom: 10px;
}

.game-main-info .game-info span.game-category {
    display: inline-block;
    margin-bottom: 15px;
    position: static;
    background: var(--gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-details-section {
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 140, 66, 0.1);
}

.game-details-section h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-details-section h3::before {
    display: none;
}

.game-details-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
    border-radius: 0;
    display: block !important;
    border-bottom: 1px dashed #e0e0e0;
    background: transparent;
}

.game-instructions {
    line-height: 1.8;
    white-space: pre-line;
    color: var(--text-secondary);
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.game-tag {
    background: var(--secondary-bg);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 140, 66, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.game-tag:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(74, 144, 226, 0.1);
}

.no-related-games {
    text-align: center;
    color: var(--text-secondary);
    padding: 50px 20px;
    width: 100%;
    font-size: 1.1rem;
}

.error-container {
    text-align: center;
    padding: 100px 20px;
    margin-top: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 140, 66, 0.1);
}

.error-container h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
}

.error-container p {
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.skeleton {
    background: linear-gradient(90deg, var(--secondary-bg) 25%, var(--card-bg) 50%, var(--secondary-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton-img {
    height: 200px;
    border-radius: 20px 20px 0 0;
}

.skeleton-text {
    height: 16px;
    margin: 10px 0;
    border-radius: 4px;
    background: var(--secondary-bg);
}

.skeleton-text.small {
    width: 60%;
    height: 12px;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.large {
    width: 100%;
    height: 20px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    width: 100%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--secondary-bg);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 1024px) {
    .game-main-info {
        grid-template-columns: 1fr;
        margin-bottom: 25px;
    }

    .game-details-section {
        margin-bottom: 25px;
    }

    /* 游戏标题移动端优化 */
    .game-main-info .game-info h2 {
        font-size: 1.6rem;
        margin-bottom: 12px;
        padding-left: 0;
        text-align: center;
    }

    .game-main-info .game-info h2::before {
        display: none;
    }
}
    
    .game-cover img {
        height: 350px;
    }
}

@media (max-width: 1200px) {
    .game-grid,
    .category-games-container.active {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 992px) {
    .game-grid,
    .category-games-container.active {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header响应式 */
    header .container {
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 15px !important;
    }

    header .logo {
        height: 36px;
        width: auto;
    }

    .categories-container {
        display: none;
    }

    .header-right {
        margin-left: auto;
    }

    .language-switcher {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h2::before {
        left: 5px;
        width: 6px;
        height: 28px;
    }

    h2 {
        padding-left: 20px;
    }

    /* 广告区域移动端优化 */
    .ad-section {
        padding: 8px 15px !important;
        margin: 3px auto !important;
        max-height: 120px !important;
        overflow: hidden !important;
    }

    .ad-container {
        margin: 5px auto !important;
        max-height: 100px !important;
        overflow: hidden !important;
        padding: 0 2px !important;
        width: 100% !important;
        min-width: 300px !important;
    }

    .ad-container ins {
        max-height: 80px !important;
        width: 100% !important;
        min-width: 300px !important;
    }

    .ad-label {
        margin-bottom: 4px !important;
        font-size: 0.6rem !important;
    }

    /* 其他区域响应式 */
    .game-grid,
    .category-games-container.active {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        grid-auto-rows: 110px;
        gap: 8px;
    }

    .game-card.size-1x1 .game-info,
    .game-card.size-2x1 .game-info {
        display: none;
    }
    
    .category-games-container.active {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .featured-game-card {
        height: 350px;
        margin: 0 10px;
        min-width: calc(100% - 20px);
    }
    
    .featured-game-card .game-info {
        padding: 30px;
    }
    
    .featured-game-card .game-title {
        font-size: 1.8rem;
        position: relative;
        padding-bottom: 6px;
        margin-bottom: 12px;
    }
    
    .featured-game-card .game-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 0;
        display: block !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
        background: transparent;
    }
    
    .game-card img {
        height: 150px;
    }
    
    .game-info {
        padding: 18px;
    }
    
    .game-title {
        font-size: 1rem;
        position: relative;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }
    
    .game-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background: #e0e0e0;
        border-radius: 0;
        display: block !important;
        border-bottom: 1px dashed #e0e0e0;
        background: transparent;
    }
    
    .play-btn {
        padding: 14px;
        font-size: 0.9rem;
    }
    
    .game-details-section {
        padding: 25px;
        margin-bottom: 20px;
    }

    /* 游戏标题小屏幕进一步优化 */
    .game-main-info .game-info h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .logo {
        height: 40px;
    }
}

@media (max-width: 480px) {
    /* Header响应式 */
    header .container {
        flex-direction: row;
        gap: 10px;
        padding: 10px 15px !important;
    }

    header .logo {
        height: 35px;
    }

    .mobile-menu-toggle {
        width: 32px;
        height: 32px;
    }

    .mobile-menu-toggle span {
        width: 16px;
    }

    .mobile-categories .category-card {
        padding: 5px 12px;
        font-size: 0.75rem;
        height: 28px;
        border-radius: 14px;
        min-width: 70px;
    }

    /* 广告区域小屏幕进一步优化 */
    .ad-section {
        padding: 5px 12px !important;
        margin: 2px auto !important;
        max-height: 100px !important;
        overflow: hidden !important;
    }

    .ad-container {
        margin: 3px auto !important;
        max-height: 85px !important;
        overflow: hidden !important;
        padding: 0 1px !important;
        width: 100% !important;
        min-width: 300px !important;
    }

    .ad-container ins {
        max-height: 70px !important;
    }

    .ad-label {
        margin-bottom: 2px !important;
        font-size: 0.55rem !important;
    }

    /* 其他区域响应式 */
    .game-grid,
    .category-games-container.active {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 100px;
        gap: 6px;
    }

    .category-card {
        padding: 20px 25px;
        min-width: 120px;
    }
    
    .featured-game-card {
        height: 280px;
        margin: 0 8px;
        min-width: calc(100% - 16px);
    }
    
    .featured-game-card .game-info {
        padding: 20px;
    }
    
    .featured-game-card .game-title {
        font-size: 1.3rem;
        position: relative;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }
    
    .featured-game-card .game-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 0;
        display: block !important;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.6);
        background: transparent;
    }
    
    .featured-game-card .play-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    /* 返回按钮移动端样式优化 */
    .back-button-container {
        margin-bottom: 20px;
        padding: 0 5px;
    }

    .back-button {
        width: 100%;
        padding: 14px 20px;
        border-radius: 12px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
        font-weight: 700;
    }

    .back-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
        background: linear-gradient(135deg, #357abd 0%, #2a6398 100%);
    }

    .back-button:active {
        transform: translateY(0);
    }

    /* Section容器移动端间距优化 */
    section.container {
        margin-bottom: 30px !important;
        padding: 15px !important;
    }

    section.container:first-of-type {
        margin-top: 30px !important;
    }

    /* Footer移动端优化 */
    footer {
        padding: 15px 0;
        margin-top: 30px;
    }

    footer .container {
        padding: 0 15px !important;
    }

    footer p {
        font-size: 0.75rem;
        color: var(--text-secondary);
        line-height: 1.5;
    }

    /* Section容器小屏幕进一步优化 */
    section.container {
        margin-bottom: 20px !important;
        padding: 12px !important;
    }

    section.container:first-of-type {
        margin-top: 20px !important;
    }

    /* 标签移动端优化 */
    .game-tags {
        gap: 10px;
    }

    .game-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
        border: 2px solid rgba(74, 144, 226, 0.3);
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
        color: var(--accent-color);
    }

    .game-tag:hover {
        background: var(--gradient);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    }

    .game-tag:active {
        transform: translateY(0);
    }
}
