/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    /* 禁用页面过度滚动效果 */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
    /* 限制触摸操作，防止下拉刷新 */
    touch-action: pan-y;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/image.png') center center fixed;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.1) 0%, rgba(255, 0, 0, 0.1) 25%, rgba(255, 105, 180, 0.1) 50%, rgba(0, 255, 255, 0.1) 75%, rgba(3, 218, 198, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部导航栏 - 全新设计 ===== */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    border-image: linear-gradient(90deg, #ff1744, #ff0000, #ff69b4, #00ffff) 1;
}

.header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    gap: 40px;
    position: relative;
}

.nav-brand {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.nav-brand h1 {
    background: linear-gradient(135deg, #ff1744, #ff0000, #ff69b4, #00ffff);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 23, 68, 0.4);
    animation: gradientShift 3s ease-in-out infinite;
    letter-spacing: 1px;
    margin: 0;
    white-space: nowrap;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.search-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-box:hover::before {
    opacity: 1;
}

.search-box:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.search-box input {
    padding: 12px 20px;
    border: none;
    outline: none;
    width: 350px;
    font-size: 14px;
    background: transparent;
    color: #333;
    font-weight: 500;
    border-radius: 50px;
}

.search-box input::placeholder {
    color: #999;
    font-weight: 400;
}

/* ===== 语言切换器样式 ===== */
.language-selector {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    outline: none;
    min-width: 80px;
    justify-content: center;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.language-flag {
    font-size: 16px;
    line-height: 1;
}

.language-code {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #333;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    min-width: 200px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 14px;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(78, 205, 196, 0.1);
    color: #333;
}

.language-option.active {
    background: rgba(78, 205, 196, 0.15);
    color: #333;
    font-weight: 600;
}

.language-option .language-flag {
    font-size: 18px;
    flex-shrink: 0;
}

.language-option .language-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.language-option .language-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.language-option .language-native {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.language-option.active .language-name {
    color: #4ecdc4;
}

/* 滚动条样式 */
.language-menu::-webkit-scrollbar {
    width: 6px;
}

.language-menu::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.language-menu::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 3px;
}

.language-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.7);
}

/* ===== RTL语言支持 ===== */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .header .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-brand {
    left: auto;
    right: 20px;
}

html[dir="rtl"] .language-selector {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .content-wrapper {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sidebar {
    margin-left: 0;
    margin-right: -20px;
}

html[dir="rtl"] .games-content {
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .game-layout {
    flex-direction: row-reverse;
}

html[dir="rtl"] .game-area {
    margin-left: 0;
    margin-right: 80px;
}

html[dir="rtl"] .language-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
}



/* ===== 主要内容区域 ===== */
.main-content {
    flex: 1;
    padding: 20px 0;
}

.page-container {
    display: none;
}

.page-container.active {
    display: block;
}

/* ===== 游戏列表页面 ===== */
.content-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 左侧分类导航（展开模式） ===== */
.sidebar {
    width: 200px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 20px 15px 10px 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 80px;
    height: fit-content;
    min-height: auto;
    max-height: calc(100vh - 100px);
    margin-left: -20px;
    overflow-y: auto;
    align-self: flex-start;
}

.category-list {
    list-style: none;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 170px;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    margin-bottom: 8px;
    white-space: nowrap;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateX(5px);
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateX(5px);
}

.category-icon {
    margin-right: 8px;
    font-size: 15px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 5px;
}

/* ===== 分类页面样式 ===== */
.category-header {
    text-align: center;
    margin: 40px 0;
    padding: 0 20px;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.category-icon {
    font-size: 1.8rem;
}

.category-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.category-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.category-info {
    margin: 80px 0 40px;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.category-info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

.category-info p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
}

.features h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    font-size: 1rem;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.features li:last-child {
    border-bottom: none;
}

/* ===== 左侧分类导航（收缩模式） ===== */
.sidebar-collapsed {
    width: 60px;
    padding: 15px 8px;
    position: fixed;
    left: 0;
    top: 120px;
    z-index: 999;
    margin-left: 0;
}

.category-list-collapsed {
    list-style: none;
}

.category-btn-collapsed {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: #666;
    margin-bottom: 8px;
    position: relative;
}

.category-btn-collapsed:hover {
    background: #f0f7ff;
    color: #333;
    transform: scale(1.1);
}

.category-btn-collapsed.active {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: scale(1.1);
}

.category-btn-collapsed[data-tooltip]:not([data-tooltip=""]):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    display: block;
}

/* ===== 游戏内容区域 ===== */
.games-content {
    flex: 1;
    min-width: 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.game-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1/1;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15), 0 0 0 2px rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.game-card-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease;
}

/* 懒加载相关样式 */
.game-card-image img.lazy-load {
    opacity: 0.6;
    filter: blur(2px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.game-card-image img.loaded {
    opacity: 1;
    filter: none;
}

/* 图片加载动画 */
@keyframes imageLoad {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-card-image img.loaded {
    animation: imageLoad 0.5s ease-out;
}

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

/* 游戏名称悬停显示 */
.game-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    color: white;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 3;
    pointer-events: none;
}

.game-card:hover .game-card-title {
    opacity: 1;
    transform: translateY(0);
}

/* 游戏卡片悬停覆盖层 - 已禁用 */
.game-card-overlay {
    display: none;
}

.game-card:hover .game-card-overlay {
    display: none;
}

/* 游戏信息标签 - 已禁用 */
.game-card-info {
    display: none;
}

.difficulty {
    display: none;
}

.difficulty.easy {
    display: none;
}

.difficulty.medium {
    display: none;
}

.difficulty.hard {
    display: none;
}

.play-time {
    display: none;
}

/* 游戏操作按钮 - 已禁用 */
.game-card-actions {
    display: none;
}

.btn-play, .btn-details {
    display: none;
}

.btn-play:hover {
    display: none;
}

.btn-details:hover {
    display: none;
}

.btn-play i, .btn-details i {
    display: none;
}

/* ===== 加载更多按钮 ===== */
.load-more-section {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: rgba(255, 23, 68, 0.5);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== 游戏页面布局 ===== */
.game-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 60px;
    padding: 0 10px;
    overflow-x: hidden;
    max-width: calc(100vw - 80px);
}

/* ===== 当前游戏标题区域 ===== */
.current-game-title-section {
    margin: 0 5px 10px 5px;
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 107, 107, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    backdrop-filter: blur(10px);
}

.current-game-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #4ecdc4, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(78, 205, 196, 0.3);
    letter-spacing: 0.3px;
}

/* ===== 游戏iframe区域 ===== */
.game-iframe-container {
    height: 70vh;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 0 auto 10px auto;
    aspect-ratio: 16/9;
    min-height: 500px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.game-iframe.loaded {
    display: block;
}

.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.game-loading p {
    font-size: 16px;
    margin: 0;
}

.game-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}

.game-error button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

/* ===== 推荐游戏区域 ===== */
.recommended-games-section {
    background: transparent;
    margin: 0 5px 10px 5px;
}

.recommended-games-container {
    padding: 5px 0;
}

.recommended-games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
    justify-content: start !important;
    gap: 5px !important;
    max-width: 100%;
    column-gap: 5px !important;
    row-gap: 5px !important;
    grid-gap: 5px !important; /* 兼容旧浏览器 */
    /* 确保能显示更多游戏 */
    max-height: none !important;
    overflow: visible !important;
}

/* 强制确保推荐游戏按钮间距为5px */
.recommended-games-section .recommended-games-container .recommended-games-grid {
    gap: 5px !important;
    column-gap: 5px !important;
    row-gap: 5px !important;
    grid-gap: 5px !important;
}

/* 所有屏幕尺寸下都强制使用5px间距和88px卡片尺寸 */
@media screen {
    .recommended-games-grid {
        gap: 5px !important;
        column-gap: 5px !important;
        row-gap: 5px !important;
        grid-gap: 5px !important;
        grid-template-columns: repeat(auto-fill, minmax(88px, 88px)) !important;
    }
    
    .recommended-game-card {
        width: 88px !important;
        height: 88px !important;
        min-width: 88px !important;
        min-height: 88px !important;
    }
}

/* 超强覆盖：确保游戏卡片尺寸为88px */
.recommended-games-section .recommended-games-container .recommended-games-grid .recommended-game-card {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    min-height: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
}

.recommended-games-section .recommended-games-container .recommended-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
    justify-content: start !important;
}

.recommended-game-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    position: relative;
    aspect-ratio: 1/1;
    border: 2px solid transparent;
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    min-height: 88px !important;
    max-width: 88px !important;
    max-height: 88px !important;
}

.recommended-game-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15), 0 0 0 2px rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.recommended-game-card-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

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

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

.recommended-game-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3), transparent);
    color: white;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.recommended-game-card:hover .recommended-game-card-title {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 游戏介绍区域 ===== */
.game-info-section {
    flex: 1;
    background: white;
    margin: 0 5px 20px 5px;
    border-radius: 10px;
    overflow: visible;
    min-height: auto;
}

.game-info-container {
    padding: 25px;
}

.game-header-info {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.game-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.game-category {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.game-rating, .game-plays {
    color: #666;
    font-size: 14px;
}

.game-description,
.game-controls-info,
.game-tags {
    margin-bottom: 25px;
}

.game-description h3,
.game-controls-info h3,
.game-tags h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.description-content,
.controls-content {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

.description-content p,
.controls-content p {
    margin-bottom: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-tag {
    background: #f0f7ff;
    color: #4ecdc4;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #e0f0ff;
}

/* ===== Toast通知样式 ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

.toast.warning {
    background: #ff9800;
}

/* ===== 游戏介绍内容区域 ===== */
.game-content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 40px 0 0 0;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 25px rgba(0,0,0,0.1);
}

.content-article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.7;
    color: #333;
}

.content-article h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ff1744, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
}

.content-article h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
    color: #2c3e50;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 10px;
    display: inline-block;
}

.content-article h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #34495e;
}

.content-article p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #555;
    text-align: justify;
}

.game-highlight {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.game-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: rgba(78, 205, 196, 0.4);
}

.game-highlight:hover::before {
    left: 100%;
}

.game-highlight h4 {
    color: #ff1744;
    margin-bottom: 15px;
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
}

.game-highlight p {
    color: #444;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* 游戏内容区域响应式设计 */
@media (max-width: 768px) {
    .game-content-section {
        padding: 40px 0;
    }
    
    .content-article h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .content-article h3 {
        font-size: 1.5rem;
        margin: 30px 0 15px 0;
    }
    
    .content-article h4 {
        font-size: 1.2rem;
    }
    
    .content-article p {
        font-size: 1rem;
        text-align: left;
    }
    
    .game-highlight {
        margin: 20px 0;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .game-content-section {
        padding: 30px 0;
    }
    
    .content-article {
        padding: 0 15px;
    }
    
    .content-article h2 {
        font-size: 1.8rem;
    }
    
    .content-article h3 {
        font-size: 1.3rem;
    }
    
    .game-highlight {
        padding: 15px;
    }
}

/* ===== 页脚样式 - 透明背景设计 ===== */
.footer {
    background: transparent;
    padding: 40px 0 20px;
    margin-top: 0;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

.footer-section p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ff1744;
}

/* 游戏分类 - 4列布局 */
.footer-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* 联系我们 - 3列布局（在一行） */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.footer-bottom-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff1744, #ff0000, #ff69b4, #00ffff);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .search-box input {
        width: 300px;
    }
    
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
    
    .game-area {
        margin-left: 70px;
        max-width: none;
    }
    
    .sidebar-collapsed {
        width: 70px;
    }
}

/* 专题页面推荐区域样式 */
.featured-pages-section {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 30px;
    background: transparent;
    border-radius: 20px;
}

.featured-pages-section .section-title {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.featured-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.featured-page-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.featured-page-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.card-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
}

.card-content p {
    margin: 0;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* 内链导航区域样式 */
.internal-links-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding: 0 15px;
}

.internal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.internal-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
}

.internal-link:hover {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.3);
}

.link-icon {
    font-size: 16px;
    margin-right: 10px;
    min-width: 20px;
}

.link-text {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        padding: 10px 15px;
        gap: 10px;
        justify-content: center;
    }
    
    .nav-brand {
        position: static;
        order: -1;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .brand-logo {
        height: 30px;
    }
    
    .search-box {
        order: 1;
        flex: 1;
        max-width: none;
    }
    
    .search-box input {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .language-selector {
        position: static;
        transform: none;
        order: 2;
    }
    
    .language-btn {
        padding: 8px 12px;
        min-width: 70px;
        font-size: 13px;
    }
    
    .language-flag {
        font-size: 14px;
    }
    
    .language-code {
        font-size: 11px;
    }
    
    .language-menu {
        right: 0;
        min-width: 180px;
    }
    
    .sidebar {
        top: 120px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-section {
        padding: 20px 15px;
    }
    
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        order: -1;
        margin-left: 0;
    }
    
    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .category-btn {
        width: auto;
        min-width: 120px;
        margin-bottom: 0;
    }
    
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .game-layout {
        flex-direction: column;
    }
    
    .game-area {
        margin-left: 0;
        max-width: 100%;
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    .sidebar-collapsed {
        position: relative;
        width: 100%;
        top: 0;
        order: -1;
    }
    
    .category-list-collapsed {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .category-btn-collapsed {
        position: relative;
    }
    
    .category-btn-collapsed:hover::after {
        display: none;
    }
    
    .game-iframe-container {
        height: 60vh;
        margin: 0 10px 8px 10px;
        min-height: 400px;
        width: calc(100% - 20px);
    }
    
    .recommended-games-section {
        margin: 0 5px 10px 5px;
    }
    
    .recommended-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
        justify-content: start !important;
        gap: 5px !important;
        column-gap: 5px !important;
        row-gap: 5px !important;
        grid-gap: 5px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .game-info-section {
        margin: 0 5px 15px 5px;
    }
    
    .game-info-container {
        padding: 20px;
    }
    
    .game-title {
        font-size: 15px;
    }
    
    .game-meta {
        gap: 15px;
    }
    
    /* 移动端游戏标题样式调整 */
    .current-game-title-section {
        margin: 0 2px 6px 2px;
        padding: 6px 12px;
    }
    
    .current-game-title {
        font-size: 14px;
        letter-spacing: 0.2px;
    }
    
    /* 移动端分类页面标题样式调整 */
    .category-header {
        margin: 20px 0;
        padding: 0 15px;
    }
    
    .category-title {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .category-title .category-icon {
        font-size: 1.4rem;
    }
    
    .category-title h1 {
        font-size: 1.8rem;
    }
    
    .category-description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .category-info {
        margin: 40px 0 20px;
        padding: 25px 15px;
    }
    
    .category-info h2 {
        font-size: 1.5rem;
    }
    
    .category-info p {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .featured-pages-section {
        margin-bottom: 30px;
        padding: 20px;
    }
    
    .featured-pages-section .section-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .featured-pages-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .featured-page-card {
        padding: 15px;
        gap: 12px;
    }
    
    .card-icon {
        font-size: 2em;
        width: 50px;
        height: 50px;
    }
    
    .card-content h3 {
        font-size: 1.1em;
    }
    
    .card-content p {
        font-size: 0.85em;
    }
    
    .internal-links-section {
        margin-top: 20px;
    }
    
    .internal-link {
        padding: 10px 12px;
    }
    
    .link-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-box input {
        width: 200px;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .game-iframe-container {
        height: 50vh;
        margin: 0 10px 5px 10px;
        min-height: 300px;
        width: calc(100% - 20px);
    }
    
    .recommended-games-section {
        margin: 0 5px 8px 5px;
    }
    
    .recommended-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        justify-content: start !important;
        gap: 5px !important;
        column-gap: 5px !important;
        row-gap: 5px !important;
        grid-gap: 5px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .game-info-section {
        margin: 0 5px 10px 5px;
    }
    
    .game-info-container {
        padding: 15px;
    }
    
    .game-title {
        font-size: 20px;
    }
    
    /* 小屏幕游戏标题样式调整 */
    .current-game-title-section {
        margin: 0 2px 4px 2px;
        padding: 5px 10px;
    }
    
    .current-game-title {
        font-size: 13px;
        letter-spacing: 0.1px;
    }
    
    .featured-pages-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-page-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .card-icon {
        margin: 0 auto;
    }
    
    /* 小屏幕分类页面标题样式调整 */
    .category-header {
        margin: 15px 0;
        padding: 0 10px;
    }
    
    .category-title .category-icon {
        font-size: 1.2rem;
    }
    
    .category-title h1 {
        font-size: 1.5rem;
    }
    
    .category-description {
        font-size: 0.95rem;
    }
    
    .category-info {
        margin: 30px 0 15px;
        padding: 20px 12px;
    }
}


/* ===== 图片懒加载样式 ===== */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

img.loaded {
    opacity: 1;
}

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

/* ===== 性能优化样式 ===== */
.game-card {
    contain: layout style paint;
    will-change: transform;
}

/* ===== 错误页面样式 ===== */
.error-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff1744, #ff69b4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #666;
}

.error-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ff1744, #ff69b4);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    border: 2px solid #ddd;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .error-code {
        font-size: 4rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .error-page {
        padding: 1rem;
    }
    
    .error-code {
        font-size: 3rem;
    }
    
    .error-message {
        font-size: 1.2rem;
    }
}