/* Basic Reset & Defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #7600d9; /* Light pinkish background */
    color: #333;
    line-height: 1.6;
}

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

.container-recommend {
    max-width: 1120px;
    margin: 0 auto;
}

a {
    color: #d9534f;
    text-decoration: none;
}

a:hover, a:active, a:focus {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    margin-bottom: 0.8em;
    color: #444;
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }

p { margin-bottom: 1em; }
ul { margin-bottom: 1em; padding-left: 20px; }
li { margin-bottom: 0.5em; }

button {
    cursor: pointer;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 1em;
}

input[type="search"]{
    padding: 18px 35px;
    min-width: 200px;
    border-radius: 4px;
    font-size: 1em;
    width: 100%; /* Default width, can be overridden */
    background-color: transparent;
}

input[type="text"],
input[type="email"],
textarea,
select {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 1em;
    width: 100%; /* Default width, can be overridden */
    border: 1px solid #ddd; /* 统一边框颜色为深灰色 */
    background-color: transparent;
    transition: border-color 0.2s ease;
}

input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: none;
}

/* 暗色主题适配 */
body.dark-mode input[type="search"],
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode textarea,
body.dark-mode select {
    background-color: #2d3edb;
    border-color: #666;
    color: #eee;
}

body.dark-mode input[type="search"]:focus,
body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="email"]:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #999;
}

/* 统一placeholder样式 */
input[type="search"]::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder,
select::placeholder {
    color: #999;
    font-size: 1em;
    font-family: Arial, sans-serif;
}

/* 暗色主题下的placeholder样式 */
body.dark-mode input[type="search"]::placeholder,
body.dark-mode input[type="text"]::placeholder,
body.dark-mode input[type="email"]::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode select::placeholder {
    color: #888;
}

body.dark-mode .rating-votes {
    color: #fff;
    font-size: 0.8em;
  }

/* 评论表单特定样式 */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    margin-bottom: 15px;
}

.comment-form textarea {
    resize: vertical; /* 只允许垂直调整大小 */
    min-height: 100px; /* 设置最小高度 */
}

/* Header */
.site-header {
    background-color: #5e10a2;
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.logo {
    flex: 0 0 auto;
}

.logo img { /* Adjust if using text */
    max-width: 330px;
    height: auto;
    padding-right: 60px;
}

/* 搜索框样式 */
.search-form {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    margin: 0 20px;
    background-color: #f8f7ef;
    transition: border-color 0.3s ease;
}

.search-form:focus-within {
    border-color: #fca94a;
}

.search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1.2em;
    text-transform: uppercase;
    background-color: transparent;
}

.search-button {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1.2em;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button i {
    font-size: 1.1em;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移除搜索按钮的悬浮效果 */
.search-button:hover {
    color: #555;
}

/* 暗色主题下的搜索框样式 */
body.dark-mode .search-form {
    background-color: #2d3edb !important;
    border-color: #333 !important;
}

body.dark-mode .search-form:focus-within {
    border-color: #64b5f6;
}

body.dark-mode .search-input {
    color: #eee;
}

body.dark-mode .search-button {
    color: #aaa;
}

/* 移除暗色主题下的搜索按钮悬浮效果 */
body.dark-mode .search-button:hover {
    color: #aaa;
}

/* Main Layout */
.main-container {
    display: flex;
    margin-top: 20px;
    gap: 20px; /* Space between sidebar and content */
    position: relative; /* 为 sticky 定位创建上下文 */
    min-height: 100vh; /* 确保有足够的滚动空间 */
}

/* Sidebar */
.sidebar {
    flex: 0 0 250px;
    background-color: #361c75;
    padding: 15px;
    border-radius: 8px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    max-height: none;
    display: flex;
    flex-direction: column;
}

/* 创建一个固定容器来包含所有导航元素 */
.sidebar-nav-container {
    position: sticky;
    top: 15px; /* 与sidebar的padding对应 */
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100vh - 30px); /* 减去sidebar的上下padding */
    overflow-y: auto;
}

/* 统一导航样式 */
.sidebar-nav,
.category-nav {
    flex: 0 0 auto;
    padding-right: 5px;
}

.sidebar-nav ul,
.category-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li,
.category-nav li {
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-nav li a,
.category-nav li a {
    display: block;
    padding: 10px 5px 10px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.sidebar-nav li:hover,
.category-nav li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav li.active,
.category-nav li.active {
    background-color: rgba(201, 48, 44, 0.1);
}

.sidebar-nav li.active::before,
.category-nav li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: #000;
    border-radius: 0 2px 2px 0;
    transition: all 0.2s ease;
}

.sidebar-nav li.active a,
.category-nav li.active a {
    padding-left: 25px;
    color: #fff;
    font-weight: bold;
}

/* 暗色主题下的样式 */
body.dark-mode .sidebar-nav li:hover,
body.dark-mode .category-nav li:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sidebar-nav li.active,
body.dark-mode .category-nav li.active {
    background-color: rgba(201, 48, 44, 0.2);
}

body.dark-mode .sidebar-nav li.active::before,
body.dark-mode .category-nav li.active::before {
    background-color: #fff;
}

body.dark-mode .share-modal-content {
    background-color: #607ce3;
}

.category-nav { margin-top: 20px; } /* Space after theme toggle */
.category-nav li a { font-weight: normal; }

.theme-toggle {
    display: flex;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}
.theme-toggle button {
    flex: 1;
    background-color: transparent;
    color: #fff;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    font-size: 0.9em;
    opacity: 0.7;
}
.theme-toggle button.active {
    background-color: #fff;
    color: #ccc;
    opacity: 1;
}

/* Content Area */
.content-area {
    flex: 1; /* Takes remaining space */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Game Player */
.game-player-section {
    margin-bottom: 20px;
    background-color: #f8f9fa; /* 浅灰色背景 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 暗色主题下的游戏播放器区域样式 */
body.dark-mode .game-player-section {
    background-color: #232323 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.game-player-placeholder {
    position: relative;
    background-color: #555; /* Placeholder color */
    background-image: url('game-preview.jpg'); /* Add actual preview image */
    background-size: cover;
    background-position: center;
    height: 450px; /* Adjust height as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* 全屏模式下的样式 */
.game-player-placeholder:fullscreen {
    background-color: #000;
    border-radius: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
}

.game-player-placeholder:fullscreen .play-now-btn {
    transform: scale(1.2);
}

.play-now-btn {
    background-color: #e91e63; /* Pinkish color */
    color: white;
    padding: 15px 35px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    transition: background-color 0.3s ease;
}
.play-now-btn:hover {
    background-color: #c2185b;
}

.game-actions {
    display: flex;
    gap: 14px; /* 增加按钮间距 */
    justify-content: flex-end;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    font-size: 1.2em; /* 整体放大1.2倍 */
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 1em;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn i {
    font-size: 1.1em; /* 图标稍微大一点 */
    width: 20px; /* 增加图标容器宽度 */
    height: 20px; /* 增加图标容器高度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 分享和评论按钮的特殊样式 */
.action-btn.share-btn,
.action-btn.comment-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 12px 24px;
}

.action-btn.share-btn span,
.action-btn.comment-btn span {
    font-size: 16px;
    font-weight: 600; /* 加粗文字 */
    letter-spacing: 0.5px; /* 稍微增加字间距 */
    text-transform: uppercase; /* 确保文字大写 */
}

/* 全屏按钮的过渡效果 */
.action-btn.fullscreen-btn {
    padding: 10px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: #de7efb;
    border: 1px solid #de7efb;
    color: #fff;
}

.action-btn.fullscreen-btn i {
    font-size: 1.2em; /* 全屏图标稍微大一点 */
    width: 24px; /* 增加图标容器宽度 */
    height: 24px; /* 增加图标容器高度 */
}

/* 悬停效果 */
.action-btn.share-btn:hover,
.action-btn.comment-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.action-btn.fullscreen-btn:hover {
    background-color: #333;
    transform: scale(1.1);
    border-color: #9370db;
    color: #fff;
}

/* 点击效果 */
.action-btn:active {
    transform: scale(0.98);
}

.action-btn.fullscreen-btn:active {
    transform: scale(0.95);
    background-color: #fff;
    color: #de7efb;
}

/* 暗色主题下的按钮样式 */
body.dark-mode .action-btn {
    background-color: #333;
    color: #fff;
    border-color: #444;
}

body.dark-mode .action-btn.share-btn,
body.dark-mode .action-btn.comment-btn {
    background-color: #000;
    border: none;
}

body.dark-mode .action-btn.share-btn:hover,
body.dark-mode .action-btn.comment-btn:hover {
    background-color: #1a1a1a;
}

body.dark-mode .action-btn i {
    color: #ccc;
}

body.dark-mode .action-btn.share-btn i,
body.dark-mode .action-btn.comment-btn i {
    color: #fff;
}

/* Game Info */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 改为顶部对齐 */
    margin-bottom: 30px;
    gap: 30px; /* 增加两列之间的间距 */
    padding: 30px 0;
    box-sizing: border-box;
}

.game-icon-big { 
    flex: 0 0 150px; /* 固定宽度，不伸缩 */
    height: 150px;
    width: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.game-info-content {
    flex: 1; /* 占据剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 内容左对齐 */
    align-items: flex-start; /* 内容左对齐 */
    gap: 15px;
}

.game-title-rating { 
    display: flex; 
    flex-direction: column; /* 改为纵向排列 */
    align-items: flex-start; /* 左对齐 */
    gap: 10px;
    width: 100%;
}

.game-info h1 { 
    margin: 0; 
    font-size: 2em;
    font-weight: bold;
    line-height: 1.2;
}

.rating { 
    color: #f0ad4e; 
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-tags { 
    display: flex; 
    gap: 8px;
    flex-wrap: wrap; /* 允许标签换行 */
    width: 100%;
}

.tag {
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 600; /* 字体加粗 */
    text-decoration: none;
    transition: all 0.2s ease; /* 添加过渡效果 */
}

.tag:hover { 
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加轻微阴影效果 */
}

/* 暗色主题下的标签样式 */
body.dark-mode .tag {
    background-color: #333;
    color: #fff;
}

body.dark-mode .tag:hover {
    background-color: #fff;
    color: #333;
}

/* Other Games / All Games Grid */
.other-games, .all-free-games {
    margin-top: 30px;
    margin-bottom: 30px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5列，可根据实际调整 */
    grid-auto-rows: 1fr;
    gap: 16px;
}
.other-games-grid, .all-games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

.game-thumb {
    display: block;
    text-decoration: none;
    color: #333;
    text-align: center;
    position: relative; /* 为悬浮效果添加定位上下文 */
    overflow: hidden; /* 确保内容不会溢出 */
    aspect-ratio: 1/1;
    width: 100%;
}
.game-thumb img {
    border-radius: 8px;
    margin-bottom: 0; /* 移除底部间距 */
    border: 1px solid #eee;
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    display: block;
}
.game-thumb span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px;
    font-size: 0.9em;
    font-weight: 600;
    transform: translateY(100%); /* 初始状态隐藏 */
    transition: transform 0.3s ease;
    opacity: 0;
}
.game-thumb:hover img {
    transform: scale(1.05);
}
.game-thumb:hover span {
    transform: translateY(0); /* 悬浮时显示 */
    opacity: 1;
}

.game-thumb.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1/1;
}

/* Game Details Article */
.game-details { margin-bottom: 30px; }
.breadcrumbs { font-weight: bold; font-size: 1em; color: #777; margin-bottom: 15px; }
.game-details strong { color: #333; } /* Highlight keywords */
.game-details ul ul { margin-top: 0.5em; margin-bottom: 0.5em; } /* Nested list spacing */

/* Comments Section */
.comments-section {
    flex: 0 0 270px;
    min-width: 0;
    background-color: #f8f7ef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-top: 0;
    height: auto; /* 自适应高度 */
    overflow: visible; /* 移除滚动条 */
}

.comments-header {
    padding: 15px;
    border-radius: 8px;
    margin: -25px -25px 20px -25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column; /* 改为纵向排列 */
    gap: 15px; /* 添加间距 */
}

.comments-header h2 {
    margin: 0; /* 移除标题默认外边距 */
    font-size: 1.5em;
}

.sort-by {
    display: flex;
    flex-direction: row; /* 改为横向排列 */
    align-items: center; /* 垂直居中对齐 */
    gap: 10px; /* 标签和选择框之间的间距 */
}

.sort-by label {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
    white-space: nowrap; /* 防止标签换行 */
}

.sort-by select {
    width: 120px; /* 设置固定宽度 */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sort-by select:hover {
    border-color: #999;
}

.sort-by select:focus {
    outline: none;
    border-color: #666;
}

/* 响应式布局调整 */
@media (max-width: 480px) {
    .sort-by {
        flex-direction: column; /* 在小屏幕上改为纵向排列 */
        align-items: flex-start;
    }
    
    .sort-by select {
        width: 100%; /* 在小屏幕上宽度占满 */
    }
}

/* 暗色主题适配 */
body.dark-mode .sort-by label {
    color: #aaa;
}

body.dark-mode .sort-by select {
    background-color: #333;
    border-color: #444;
    color: #eee;
}

body.dark-mode .sort-by select:hover {
    border-color: #666;
}

body.dark-mode .sort-by select:focus {
    border-color: #888;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.comment {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}
.comment:last-child { border-bottom: none; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.comment-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ccc;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2em;
}
.comment-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 44px;
}
.comment-author {
    font-weight: bold;
    color: #444;
    margin-bottom: 2px;
}
.comment-time {
    font-size: 0.95em;
    color: #888;
}
.comment-text {
    margin: 6px 0 0 0;
    font-size: 1.08em;
    color: #222;
    line-height: 1.7;
}
.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 2px;
}
.comment-actions button:first-child {
    font-weight: bold;
}
.comment-actions button {
    background: none;
    border: none;
    color: #777;
    padding: 2px 8px;
    font-size: 0.98em;
    margin-right: 0;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.comment-actions button:hover {
    color: #333;
    background: #f0f0f0;
}

.load-more-comments {
    display: block;
    width: 100%;
    margin: 20px auto;
    padding: 12px 20px;
    background-color: #2973da;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-comments:hover:not(:disabled) {
    background-color: #075dd7;
    transform: translateY(-1px);
}

.load-more-comments:active:not(:disabled) {
    transform: translateY(0);
}

.load-more-comments:disabled {
    background-color: #9e9e9e;
    cursor: default;
    opacity: 0.7;
}

/* 暗色主题适配 */
body.dark-mode .load-more-comments {
    background-color: #4682B4;
}

body.dark-mode .load-more-comments:hover:not(:disabled) {
    background-color: #5f9ea0;
}

body.dark-mode .load-more-comments:disabled {
    background-color: #666;
}

.comment-form { margin-top: 30px; }
.comment-form .form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.comment-form input[type="text"],
.comment-form input[type="email"] { flex: 1; }
.comment-form textarea { width: 100%; margin-bottom: 15px; }
.comment-form .checkbox-row { align-items: center; justify-content: flex-start; gap: 5px; margin-bottom: 15px; }
.comment-form input[type="checkbox"] { width: auto; margin-right: 5px; }
.comment-form label { font-size: 0.9em; }
.submit-comment {
    background-color: #2973da;
    color: white;
    padding: 10px 25px;
}
.submit-comment:hover { background-color: #0961dc; }

/* All Free Games Section */
.all-free-games .container {
     background-color: #fff;
     border-radius: 8px;
     margin-top: 20px; /* Add margin if needed */
}
.all-free-games .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #999;
    padding-bottom: 10px;
}
.view-all-btn {
    background-color: #777;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    text-decoration: none;
}
.view-all-btn:hover { background-color: #555; }

/* Footer */
.site-footer {
    background-color: #5e10a2; /* Match sidebar */
    color: #f8d7da; /* Light text on dark bg */
    padding: 20px 0;
    margin-top: 30px;
    font-size: 0.9em;
    text-align: center;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}
.disclaimer {
    margin: 0;
    flex: 1;
    text-align: left;
}
.footer-nav {
    flex: 1;
    text-align: right;
}
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-nav a {
    color: #f8d7da; /* Light text */
}
.footer-nav a:hover {
    color: #fff; /* Brighter on hover */
}

/* 响应式布局 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .disclaimer {
        text-align: center;
    }

    .footer-nav {
        text-align: center;
    }

    .footer-nav ul {
        justify-content: center;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #555;
    color: white;
    padding: 10px 12px;
    border-radius: 50%;
    display: none; /* Hidden by default */
    text-decoration: none;
    font-size: 1.2em;
    line-height: 1;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.back-to-top:hover {
    opacity: 1;
}

/* Dark Mode (Basic Example) */
body.dark-mode {
    background-color: #7600d9 !important;
    color: #ccc;
}
body.dark-mode .site-header {
    background-color: #5e10a2 !important;
    color: #333 !important;
}
body.dark-mode .content-area,
body.dark-mode .all-free-games .container {
    background-color: #607ce3;
    color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4,
body.dark-mode .comment-author {
    color: #eee;
}
body.dark-mode a { color: #d9534f; }
body.dark-mode .sidebar {
    background-color: #361c75 !important;
    color: #fff !important;
}
body.dark-mode .sidebar-nav li a,
body.dark-mode .sidebar-nav li.active a,
body.dark-mode .category-nav li a,
body.dark-mode .category-nav li.active a {
    color: #fff !important;
}
body.dark-mode .theme-toggle { border-color: #555; }
body.dark-mode .theme-toggle button { color: #ccc; }
body.dark-mode .theme-toggle button.active { background-color: #ccc; color: #333; }
body.dark-mode .search-form { border-color: #555; background-color: #333; }
body.dark-mode .search-form:focus-within { border-color: #64b5f6; }
body.dark-mode .search-form input[type="search"] { color: #eee; }
body.dark-mode .search-form button { color: #fff; }
body.dark-mode .search-form button:hover { color: #fca94a; }
body.dark-mode .tag { background-color: #555; color: #fff; }
body.dark-mode .action-btn { background-color: #555; color: #ccc; border-color: #666; }
body.dark-mode .game-thumb { color: #ccc; }
body.dark-mode .game-thumb img { border-color: #555; }
body.dark-mode .game-details strong { color: #e1dede; } /* Adjust highlight color */
body.dark-mode .comments-section, body.dark-mode .comment { border-color: #ddd; }
body.dark-mode .comment-actions button, body.dark-mode .sort-by label, body.dark-mode .breadcrumbs { color: #aaa; }
body.dark-mode input, body.dark-mode textarea, body.dark-mode select { background-color:transparent; border-color: #666; color: #eee; }
body.dark-mode .submit-comment { background-color: #4682B4; } /* MediumSeaGreen */
body.dark-mode .view-all-btn { background-color: #666; color: #fff; }
body.dark-mode .site-footer {
    background-color: #5e10a2 !important;
    color: #f8d7da !important;
}
body.dark-mode .footer-nav a {
    color: #f8d7da !important;
}
body.dark-mode .footer-nav a:hover {
    color: #fff !important;
}
body.dark-mode .disclaimer a { color: #ccc; }
body.dark-mode .back-to-top { background-color: #777; }
body.dark-mode .action-btn.fullscreen-btn {
    background-color: #de7efb !important;
    border: 1px solid #de7efb !important;
    color: #fff !important;
}
body.dark-mode .action-btn.fullscreen-btn:hover {
    background-color: #333 !important;
    border-color: #9370db !important;
    color: #fff !important;
}

/* 游戏详情和评论区的容器 */
.game-details-comments {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start; /* 确保子元素顶部对齐 */
}

/* 游戏详情区域 */
.game-details {
    flex: 1;
    min-width: 0;
    background-color: #f8f7ef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 评论区标题样式优化 */
.comments-header {
    padding: 15px;
    border-radius: 8px;
    margin: -25px -25px 20px -25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column; /* 改为纵向排列 */
    gap: 15px; /* 添加间距 */
}

.comments-header h2 {
    margin: 0; /* 移除标题默认外边距 */
    font-size: 1.5em;
}

.sort-by {
    display: flex;
    flex-direction: row; /* 改为横向排列 */
    align-items: center; /* 垂直居中对齐 */
    gap: 10px; /* 标签和选择框之间的间距 */
}

.sort-by label {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
    white-space: nowrap; /* 防止标签换行 */
}

.sort-by select {
    width: 120px; /* 设置固定宽度 */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.sort-by select:hover {
    border-color: #999;
}

.sort-by select:focus {
    outline: none;
    border-color: #666;
}

/* 响应式布局调整 */
@media (max-width: 480px) {
    .sort-by {
        flex-direction: column; /* 在小屏幕上改为纵向排列 */
        align-items: flex-start;
    }
    
    .sort-by select {
        width: 100%; /* 在小屏幕上宽度占满 */
    }
}

/* 暗色主题适配 */
body.dark-mode .sort-by label {
    color: #aaa;
}

body.dark-mode .sort-by select {
    background-color: #333;
    border-color: #444;
    color: #eee;
}

body.dark-mode .sort-by select:hover {
    border-color: #666;
}

body.dark-mode .sort-by select:focus {
    border-color: #888;
}

/* 暗色主题适配 */
body.dark-mode .game-details,
body.dark-mode .comments-section {
    background-color: #2d3edb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .comments-header {
    background-color: #2d3edb;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .game-details-comments {
        flex-direction: column;
    }

    .comments-section {
        flex: none;
        width: 100%;
        margin-top: 30px; /* 在移动端保持间距 */
    }
}

.share-modal {
  position: fixed !important;
  z-index: 9999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  min-width: 540px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2.2rem;
  color: #888;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10;
  transition: color 0.2s;
}
.close-btn:hover {
  color: #222;
}

.share-icons {
  display: flex;
  gap: 32px;
  margin: 28px 0 18px 0;
  justify-content: flex-start;
}
.share-icons a {
  font-size: 2.6rem;
  background: #f5f7fa;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.share-icons a i {
  color: inherit;
}
/* 品牌色 */
#share-x i { color: #000; }
#share-fb i { color: #1877f3; }
#share-whatsapp i { color: #25d366; }
#share-pinterest i { color: #e60023; }

.share-icons a:hover {
  background: #f5f7fa;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}

.share-link {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
}
#share-url {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px 0 0 6px;
  border: 1px solid #ccc;
  font-size: 1.1em;
  border-right: none;
}
#copyShareUrl {
  background: #5c4023;
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 10px 22px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid #ccc;
  border-left: none;
}
#copyShareUrl:hover {
  background: #3e2612;
}

.share-icons a,
.share-icons a:hover {
  text-decoration: none;
}

.action-btn.comment-btn {
  background-color: #000;
  color: #fff;
  border: none;
  padding: 12px 24px;
}
.action-btn.comment-btn span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.action-btn.comment-btn:hover {
  background-color: #333;
  color: #fff;
  text-decoration: none;
}
.action-btn.comment-btn span,
.action-btn.comment-btn:hover span {
  text-decoration: none;
}

.game-tags a,
.game-tags a:hover {
  text-decoration: none;
}

.rating-votes {
  color: #333;
  font-size: 0.8em;
}

.comment-actions button:nth-child(2),
.comment-actions button:nth-child(2) i {
  color: #1cb1cd !important;
}
.comment-actions button:nth-child(3),
.comment-actions button:nth-child(3) i {
  color: #ef3056 !important;
}

body.dark-mode .game-player-section {
  background-color: #2d3edb !important;
}
body.dark-mode .game-info {
  background-color: #607ce3 !important;
}
body.dark-mode .other-games {
  background-color: #607ce3 !important;
}
body.dark-mode .game-details-comments {
  background-color: #607ce3 !important;
}

body.dark-mode .comment-text {
  color: #eee;
}

/* Hamburger 按钮样式 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 12001;
  margin-left: 10px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 4px 0;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s;
}

/* 移动端sidebar弹出样式 */
@media (max-width: 900px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .logo-hamburger-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    gap: 10px;
  }
  .logo {
    margin-bottom: 0;
  }
  .hamburger {
    margin-left: 0;
    margin-right: 0;
  }
  .search-form {
    order: 2;
    width: 100%;
    margin-top: 10px;
    margin-left: 0;
    margin-right: 0;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 240px;
    height: 100vh;
    max-width: 80vw;
    background: #361c75;
    z-index: 12002;
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
    transition: left 0.3s cubic-bezier(.4,0,.2,1);
    border-radius: 0;
    padding-top: 0;
  }
  .sidebar.open {
    left: 0;
  }
  .sidebar-close {
    display: block !important;
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 2.2em;
    color: #fff;
    z-index: 12003;
    cursor: pointer;
  }
  .sidebar-mask {
    display: none;
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.25);
    z-index: 12000;
    transition: opacity 0.3s;
  }
  .sidebar-mask.active {
    display: block;
  }
  .main-container {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: flex !important;
  }
}

@media (max-width: 600px) {
  .game-actions {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
    font-size: 1em;
  }
  .action-btn, .action-btn.share-btn, .action-btn.comment-btn {
    padding: 7px 10px;
    font-size: 0.98em;
    min-width: 70px;
    border-radius: 6px;
    height: 38px;
    box-sizing: border-box;
  }
  .action-btn span {
    font-size: 0.98em;
  }
  .action-btn.fullscreen-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1em;
    border-radius: 50%;
    min-width: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .share-modal-content {
    min-width: 0;
    width: 96vw;
    max-width: 98vw;
    padding: 16px 2vw;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .share-icons {
    gap: 12px;
  }
  .share-icons a {
    width: 38px;
    height: 38px;
    font-size: 1.3em;
  }
  .share-link input, #copyShareUrl {
    font-size: 1em;
    padding: 7px 6px;
  }
  .game-info {
    flex-direction: column;
    align-items: left;
    gap: 10px;
    padding: 12px 0;
  }
  .game-icon-big {
    margin-bottom: 0;
    margin-right: 0;
    width: 150px;
    height: 100%;
  }
  .game-info-content {
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .view-all-btn {
    white-space: nowrap;
    overflow: auto;
    text-overflow: ellipsis;
    min-width: 90px;
    max-width: 100vw;
    display: inline-block;
  }
  .all-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sort-by {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .sort-by label {
    font-size: 1em;
    white-space: nowrap;
  }
  .sort-by select {
    width: auto;
    min-width: 150px;
    font-size: 1.1em;
    padding: 8px 12px;
  }
}

.about-content {
    background: #fff;
    padding: 20px;
}

body.dark-mode .about-content {
    background: #23272f;
    color: #f1f1f1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}


.content-area {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.contact-form label {
    font-weight: bold;
    margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
    margin-bottom: 8px;
}
.contact-form button.submit-comment {
    width: 100%;
    padding: 12px 0;
    font-size: 1.1em;
    background: #2973da;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.contact-form button.submit-comment:hover {
    background: #155aaf;
}
.select-wrapper {
    position: relative;
    width: 100%;
}
.select-wrapper select {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
    background: #f8f8f8;
    color: #333;
    margin-bottom: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
}
.select-wrapper select:focus {
    border-color: #2973da;
    outline: none;
    background: #fff;
}
.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #888;
    transform: translateY(-50%);
}
/* 多选时选项高度更友好 */
.contact-form select[multiple] {
    min-height: 48px;
    background: #f8f8f8;
    cursor: pointer;
}
/* 兼容移动端 */
@media (max-width: 900px) {
    .contact-form {
        padding-left: 5%;
        padding-right: 5%;
    }
    .contact-form select {
        font-size: 1em;
    }
}
body.dark-mode .contact-form textarea,
body.dark-mode .contact-form select#topics {
    background: #2d3edb;
    color: #f1f1f1;
    border-color: #444;
}
body.dark-mode textarea:focus,
body.dark-mode select#topics:focus {
    background: #2d3edb;
    color: #fff;
    border-color: #2973da;
}
body.dark-mode .select-wrapper::after {
    border-top-color: #ccc; /* 箭头变亮色 */
}

.sub-area{
    padding: 5% 10%;
}

.bi-list{
    color: #ddd;
}

.loading-indicator {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
}

.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
.game-iframe-container { max-width: 100vw; }
}

.accept-btn {
background: #3498db;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
}

.accept-btn:hover {
background: #2980b9;
}

.gd__aspect-ratio-box {
position: relative;
width: 100%;
max-width: 900px;
margin: 0 auto;
padding-top: 56.2566%;
background: #000;
border-radius: 12px;
overflow: hidden;
}
.gd__aspect-ratio-box iframe {
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 12px;
display: block;
background: #000;
}
/* 全屏时自适应屏幕比例 */
.gd__aspect-ratio-box:fullscreen,
.gd__aspect-ratio-box:-webkit-full-screen,
.gd__aspect-ratio-box:-ms-fullscreen {
padding: 0 !important;
margin: 0 !important;
width: 100vw !important;
height: 100vh !important;
min-width: 100vw !important;
min-height: 100vh !important;
max-width: 100vw !important;
max-height: 100vh !important;
border-radius: 0 !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
background: #000 !important;
z-index: 9999 !important;
box-sizing: border-box !important;
overflow: hidden !important;
display: block !important;
}
.gd__aspect-ratio-box:fullscreen iframe,
.gd__aspect-ratio-box:-webkit-full-screen iframe,
.gd__aspect-ratio-box:-ms-fullscreen iframe {
width: 100% !important;
height: 100% !important;
min-width: 100% !important;
min-height: 100% !important;
max-width: 100% !important;
max-height: 100% !important;
border-radius: 0 !important;
background: #000 !important;
display: block !important;
box-sizing: border-box !important;
}

/* --------- Table 美观样式（全站通用） --------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5em 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(120,0,180,0.07);
}
thead {
  background: linear-gradient(90deg, #7600d9 0%, #5e10a2 100%);
  color: #fff;
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 1em;
}
th {
  font-weight: bold;
  letter-spacing: 0.03em;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: #f3eaff;
  transition: background 0.2s;
}

/* 暗色主题下的table样式 */
body.dark-mode table {
  background: #23213a;
  box-shadow: 0 2px 8px rgba(30,0,60,0.15);
}
body.dark-mode thead {
  background: linear-gradient(90deg, #2d3edb 0%, #7600d9 100%);
  color: #fff;
}
body.dark-mode th, body.dark-mode td {
  border-bottom: 1px solid #333;
  color: #eee;
}
body.dark-mode tr:hover td {
  background: #2d2a4a;
}