/**
 * WG Main 模板样式 - 完全匹配主站风格
 * 设计理念：简约、专业、商务化
 * 特点：白色背景、蓝色主色调、克制的交互效果
 */

/* ==================== CSS 变量系统 ==================== */
:root {
    /* 品牌�?- 主站�?*/
    --primary: #0066FF;
    --primary-hover: #0052CC;
    --primary-light: #E6F0FF;
    --primary-dark: #0047B3;
    
    /* 功能�?*/
    --success: #22C55E;
    --info: #3B82F6;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* 诚邀合作卡片渐变�?*/
    --green-gradient-start: #E8F8F0;
    --green-gradient-end: #D1F2E6;
    --blue-gradient-start: #E3F2FD;
    --blue-gradient-end: #BBDEFB;
    --pink-gradient-start: #FCE4EC;
    --pink-gradient-end: #F8BBD0;
    
    /* 中性色 - 灰阶系统 */
    --gray-0: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E5E5E5;
    --gray-400: #D4D4D4;
    --gray-500: #CCCCCC;
    --gray-600: #999999;
    --gray-700: #666666;
    --gray-800: #333333;
    --gray-900: #1A1A1A;
    
    /* 文字颜色 */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-placeholder: #CCCCCC;
    
    /* 背景�?*/
    --bg-white: #FFFFFF;
    --bg-light: #f0f4f8;
    --bg-gray: #F5F5F5;
    
    /* 边框 */
    --border-light: #F0F0F0;
    --border-normal: #E5E5E5;
    --border-dark: #D4D4D4;
    
    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 4px 12px rgba(0, 102, 255, 0.3);
    --shadow-card-hover: 0 8px 24px rgba(0, 102, 255, 0.1);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* 布局 */
    --container-width: 1400px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ==================== 容器 ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ==================== 顶部导航�?==================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: auto;
    width: auto;
}

.logo > a > img {
    height: 55px;
}

.logo > img {
    height: 45px;
    margin-left: 15px;
    opacity: 0.95;
}

/* 主导�?*/
.main-nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    position: relative;
    padding: 24px 0;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: var(--bg-white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    margin: -10px 0;
}

/* === 语言切换下拉菜单 === */
.lang-dropdown {
    position: relative;
    z-index: 1001;
    user-select: none;
}
.lang-selected {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid #e0e6ed; border-radius: 8px;
    font-size: 14px; color: var(--text-secondary); background: var(--bg-white);
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.06); white-space: nowrap;
    transition: var(--transition-base);
}
.lang-selected:hover { border-color: var(--primary); color: var(--primary); }
.lang-dropdown.open .lang-selected {
    border-color: var(--primary); color: var(--primary);
    border-radius: 8px 8px 0 0; box-shadow: 0 2px 12px rgba(0,102,255,0.1);
}
.lang-arrow { transition: transform 0.3s ease; color: var(--text-muted); flex-shrink: 0; }
.lang-dropdown.open .lang-arrow { transform: rotate(180deg); color: var(--primary); }
.lang-text { font-weight: 500; }

.lang-options {
    position: absolute; top: 100%; right: 0; min-width: 100%;
    background: var(--bg-white); border: 1px solid #e0e6ed; border-top: none;
    border-radius: 0 0 8px 8px; -webkit-border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); -webkit-box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden; z-index: 1002;
    opacity: 0; visibility: hidden; transform: translateY(-5px);
    transition: all 0.25s ease;
}
.lang-dropdown.open .lang-options {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.lang-option {
    padding: 12px 20px; font-size: 15px; color: var(--text-secondary);
    cursor: pointer; white-space: nowrap; position: relative;
    text-align: center;
    transition: all 0.15s ease;
}
.lang-option:hover { background: var(--primary-light); color: var(--primary); }
.lang-option.active { color: var(--primary); font-weight: 600; background: rgba(0,102,255,0.05); }
.lang-option + .lang-option { border-top: 1px solid var(--border-light); }

/* === 翻译 Loading 遮罩 === */
.wgt-translating {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 16px;
}
.wgt-translating.fade-out { opacity: 0; pointer-events: none; }
.wgt-spinner {
    width: 36px; height: 36px; border: 3px solid var(--border-normal);
    border-top-color: var(--primary); border-radius: 50%;
    animation: wgt-spin 0.8s linear infinite;
}
@keyframes wgt-spin { to { transform: rotate(360deg); } }

/* 移动端菜�?*/
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ==================== Hero Banner - 宇宙星空风格 ==================== */
.hero-banner {
    background: linear-gradient(135deg, #0a1e3d 0%, #1a4d7a 30%, #2563a8 60%, #ec4899 100%);
    position: relative;
    padding: 80px 0;
    text-align: center;
    color: var(--bg-white);
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.4) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 80px rgba(255, 255, 255, 0.3);
}

.hero-logo img {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.hero-title {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 16px;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ==================== 主体内容 ==================== */
.main {
    padding: 60px 0;
    min-height: calc(100vh - var(--header-height) - 300px);
}

/* ==================== 区块标题 ==================== */
.section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 15px;
}

.section-more {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: 13px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-normal);
    transition: var(--transition-base);
}

.section-more:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ==================== 游戏 API Tab 导航 ==================== */
.game-api-nav {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-normal);
    margin-bottom: 30px;
}

.game-api-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
}

.game-tabs {
    display: flex;
    gap: 30px;
}

.game-tab {
    position: relative;
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
}

.game-tab:hover {
    color: var(--primary);
}

.game-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.game-tab.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

/* ==================== 游戏卡片网格 ==================== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition-base);
    will-change: transform;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.game-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--gray-100);
}

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

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

.game-info {
    padding: 15px;
    background: var(--bg-white);
}

.game-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.game-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-normal);
    flex-shrink: 0;
}

.game-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.platform-icons {
    display: flex;
    gap: 8px;
}

.platform-icons img {
    width: 22px;
    height: 22px;
}

/* ==================== 诚邀合作卡片 ==================== */
.cooperation-section {
    margin-bottom: 60px;
}

.cooperation-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.coop-card {
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: var(--transition-base);
}

.coop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.coop-card-green {
    background: linear-gradient(135deg, var(--green-gradient-start) 0%, var(--green-gradient-end) 100%);
}

.coop-card-blue {
    background: linear-gradient(135deg, var(--blue-gradient-start) 0%, var(--blue-gradient-end) 100%);
}

.coop-card-pink {
    background: linear-gradient(135deg, var(--pink-gradient-start) 0%, var(--pink-gradient-end) 100%);
}

.coop-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coop-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.coop-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.coop-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 官方商务联系卡片 ==================== */
.contact-section {
    margin-bottom: 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.contact-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition-base);
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-5px);
}

.contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gray-100);
    margin: 0 auto 16px;
    overflow: hidden;
    border: 2px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
}

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

.contact-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-value {
    font-size: 13px;
    color: var(--primary);
    word-break: break-all;
}

.contact-value:hover {
    text-decoration: underline;
}

/* ==================== 合作平台 Logo 网格 ==================== */
.partner-section {
    margin-bottom: 60px;
}

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

.partner-logo {
    background: var(--bg-white);
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    transition: var(--transition-base);
}

.partner-logo:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.partner-logo img {
    max-width: 80%;
    max-height: 60px;
    opacity: 0.9;
}

.partner-logo:hover img {
    opacity: 1;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.page-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-base);
}

.page-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-white);
}

.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 文章列表 ==================== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.article-item:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.article-image {
    flex-shrink: 0;
    width: 220px;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.article-title a {
    color: inherit;
}

.article-title a:hover {
    color: var(--primary);
}

.article-desc {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==================== 文章详情�?==================== */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.detail-wrap {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
    min-width: 0;
}

.detail-header {
    padding: 40px;
    border-bottom: 1px solid var(--border-normal);
}

.detail-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-meta a {
    color: var(--primary);
}

.detail-content {
    padding: 40px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.detail-content p {
    margin-bottom: 1.5em;
}

/* === 富文本内容排版恢复 === */
.detail-content ul,
.detail-content ol {
    list-style: revert;
    padding-left: 2em;
    margin-bottom: 1.5em;
}
.detail-content ul {
    list-style-type: disc;
}
.detail-content ol {
    list-style-type: decimal;
}
.detail-content ul ul {
    list-style-type: circle;
}
.detail-content li {
    margin-bottom: 0.5em;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
.detail-content h1 {
    font-size: 2em;
    margin: 1.5em 0 0.8em;
    font-weight: 700;
    color: var(--text-primary);
}
.detail-content h2 {
    font-size: 1.5em;
}
.detail-content h3 {
    font-size: 1.25em;
}
.detail-content h4,
.detail-content h5,
.detail-content h6 {
    font-size: 1.1em;
    margin: 1.5em 0 0.8em;
    font-weight: 600;
    color: var(--text-primary);
}
.detail-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-light);
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}
/* 表格响应式滚动容器 */
.detail-content .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
    border: 1px solid var(--border-normal);
    border-radius: var(--radius-sm);
}
.detail-content .table-responsive::-webkit-scrollbar {
    height: 6px;
}
.detail-content .table-responsive::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}
.detail-content .table-responsive table {
    margin: 0;
    border: none;
}
.detail-content .table-responsive table th:first-child,
.detail-content .table-responsive table td:first-child {
    border-left: none;
}
.detail-content .table-responsive table th:last-child,
.detail-content .table-responsive table td:last-child {
    border-right: none;
}
.detail-content .table-responsive table tr:first-child th,
.detail-content .table-responsive table tr:first-child td {
    border-top: none;
}
.detail-content .table-responsive table tr:last-child th,
.detail-content .table-responsive table tr:last-child td {
    border-bottom: none;
}

.detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    min-width: 480px;
}
.detail-content table th,
.detail-content table td {
    border: 1px solid var(--border-normal);
    padding: 10px 14px;
    text-align: left;
    word-break: normal;
}
.detail-content table th {
    background: var(--bg-light);
    font-weight: 600;
    white-space: nowrap;
}
.detail-content pre,
.detail-content code {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
}
.detail-content pre {
    padding: 16px 20px;
    margin: 1.5em 0;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.detail-content code {
    padding: 2px 6px;
    font-size: 0.9em;
}
.detail-content hr {
    border: none;
    border-top: 1px solid var(--border-normal);
    margin: 2em 0;
}
.detail-content a {
    color: var(--primary);
    text-decoration: underline;
}
.detail-content a:hover {
    color: var(--primary-hover);
}
.detail-content strong,
.detail-content b {
    font-weight: 700;
    color: var(--text-primary);
}

/* === 修复编辑器粘贴内容的 nowrap 问题 === */
.detail-content span[style*="nowrap"],
.detail-content p[style*="nowrap"],
.detail-content div[style*="nowrap"] {
    text-wrap-mode: wrap !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* === 修复编辑器给元素添加固定宽度导致手机端溢出 === */
.detail-content ul[style*="width"],
.detail-content ol[style*="width"],
.detail-content li[style*="width"],
.detail-content div[style*="width"],
.detail-content p[style*="width"],
.detail-content span[style*="width"],
.detail-content h1[style*="width"],
.detail-content h2[style*="width"],
.detail-content h3[style*="width"],
.detail-content h4[style*="width"],
.detail-content h5[style*="width"],
.detail-content h6[style*="width"] {
    max-width: 100% !important;
    width: auto !important;
}

/* === 修复 UEditor 编辑器列表缩进 === */
.detail-content .list-paddingleft-2 {
    padding-left: 2em;
}
.detail-content .list-paddingleft-3 {
    padding-left: 3em;
}

.detail-content img {
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.detail-content h2,
.detail-content h3 {
    color: var(--text-primary);
    margin: 1.8em 0 1em;
    font-weight: 600;
}

.detail-tags {
    padding: 24px 40px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-tags-label {
    font-size: 14px;
    color: var(--text-muted);
}

.detail-tags a {
    padding: 6px 14px;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-normal);
    transition: var(--transition-base);
}

.detail-tags a:hover {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-normal);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 20px 0;
}

/* ==================== 按钮系统 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

/* ==================== 工具�?==================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ==================== 滚动条样�?==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-500);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* ==================== 选择样式 ==================== */
::selection {
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary);
}

::-moz-selection {
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary);
}

/* ==================== 焦点样式 ==================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ==================== 响应式设�?==================== */

/* 大屏 */
@media (max-width: 1399px) {
    .container {
        max-width: 1200px;
    }
}

/* 中等屏幕 */
@media (max-width: 1199px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .partner-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 平板 */
@media (max-width: 991px) {
    .container {
        padding: 0 30px;
    }
    
    .main-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .lang-dropdown { position: relative; margin-right: 10px; }
    .lang-selected { padding: 6px 10px; font-size: 13px; }
    .lang-option { padding: 10px 16px; font-size: 14px; }
    
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .partner-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cooperation-cards {
        grid-template-columns: 1fr;
    }
}

/* 手机横屏 */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
    
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
        height: 200px;
    }
    
    .detail-header,
    .detail-content,
    .detail-tags {
        padding: 24px;
    }
    
    .detail-title {
        font-size: 24px;
    }
}

/* 手机竖屏 */
@media (max-width: 575px) {
    .game-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .cooperation-cards {
        gap: 15px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
}
/* �ֻ��� Logo �Ż� */
@media (max-width: 768px) {
    .logo {
        flex-shrink: 0;
    }
    
    .logo > a > img {
        height: 40px;
    }
    
    .logo > img {
        height: 32px;
        margin-left: 10px;
    }
}

    /* �ƶ��˵�����ʾ */
    .main-nav.active {
        display: flex !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
        gap: 10px;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* ����ҳ˫������ */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding-top: 30px;
}

@media (max-width: 991px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

/* ��������?*/
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--bg-light);
}

.hot-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hot-item {
    display: flex;
    gap: 14px;
}

.hot-item-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.hot-item-rank.top {
    background: var(--primary);
    color: white;
}

.hot-item-content {
    flex: 1;
    min-width: 0;
}

.hot-item-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-item-title a {
    color: inherit;
}

.hot-item-title a:hover {
    color: var(--primary);
}

.hot-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}





/* ��������ͼƬ�Զ����� */
.detail-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
