/* 全局样式 */
.news-detail img {
    margin: 10px 0;
    padding: 10px 0;
    display: block;
    max-width: 100%;
    height: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    /* Slightly different body background for contrast */
    color: #333;
    /* Restored for sticky header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-wrapper {
    flex: 1 0 auto;
}

.page-container {
    /* New wrapper for overall page centering */
    width: 100%;
    /* Added to ensure it takes full width within flex parent */
    max-width: 1300px;
    /* Further increased width */
    margin: 30px auto;
    background-color: #fff;
    /* Background for the content area */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.07);
    /* Optional subtle shadow */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Adjust full-width elements since they are now inside .page-container */
.header,
.sub-nav {
    /* padding-left: 20px; */
    /* Removed */
    /* padding-right: 20px; */
    /* Removed */
    /* Default side padding */
    /* box-shadow is fine */
}

/* 头部导航栏 */
.header {
    padding-top: 15px;
    padding-bottom: 15px;
    background-color: #fff;
    /* Changed to white */
    color: #333;
    /* Default text color for white background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    /* Restored sticky header */
    top: 0;
    /* Restored sticky header */
    z-index: 1000;
    width: 100%;
}

.header-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1300px;
    /* Content within header is still constrained */
    margin: 0 auto;
    /* Center the content wrapper */
    padding-left: 20px;
    padding-right: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 100px;
    height: 48px;
    /* 修改高度以匹配宽度，实现100x100 */
}

.site-title {
    font-size: 24px;
    margin-left: 10px;
    color: #ff6600;
    font-weight: bold;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-item {
    padding: 10px 15px;
    margin: 0 2px;
    color: #333;
    /* Darker text for white header */
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item.active,
.nav-item:hover {
    background-color: #3366cc;
    /* Original blue for hover on white */
    color: #fff;
    /* White text on blue background */
}

.nav-item.search {
    background-color: transparent;
    color: #333;
    /* Darker search icon */
}

.nav-item.search:hover {
    color: #3366cc;
    /* Blue hover for search icon */
    background-color: transparent;
}

/* 子导航栏 */
.sub-nav {
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    /* padding: 8px 5%; /* Replaced by .page-container and fixed padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hot-tags {
    display: flex;
    align-items: center;
}

.hot-label {
    color: #ff6600;
    font-weight: bold;
    margin-right: 10px;
}

.hot-tags a {
    margin-right: 15px;
    color: #666;
    font-size: 14px;
    position: relative;
}

.hot-tags a:after {
    content: ">";
    margin-left: 5px;
    color: #ccc;
}

.category-tabs {
    display: flex;
}

.category-tabs a {
    padding: 5px 12px;
    margin: 0 2px;
    color: #666;
    font-size: 14px;
    border-radius: 3px;
}

.category-tabs a.active {
    color: #3366cc;
    font-weight: bold;
}

/* 轮播图区域 */
.carousel-container {
    margin: 20px 30px;
    /* 上下20px，左右30px外边距 */
    /* Adjusted margin as it's inside .page-container */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    /* Add position for z-index context */
    z-index: 1;
    /* Ensure it's above default content but below high-level items */
}

.carousel-main {
    width: 100%;
    height: 520px;
    /* 增加高度 */
    /* Increased height */
    overflow: hidden;
}

.banner-img {
    width: calc(100% - 40px);
    /* 左右各留20px边距 */
    height: 100%;
    object-fit: cover;
    /* 保持宽高比并填充 */
    background-color: #000;
    margin: 0 auto;
    /* 图片居中 */
    display: block;
    /* 确保 margin: auto 生效 */
    border-radius: 6px;
    /* 轻微的圆角与外部容器匹配 */
}

.carousel-nav {
    display: flex;
    /* Changed from grid to flex */
    overflow-x: hidden;
    /* Hide scrollbar, JS will handle scrolling */
    background-color: #222;
    padding: 5px 0;
    /* Adjusted padding */
}

.carousel-item {
    position: relative;
    padding: 8px;
    /* Slightly adjusted padding */
    text-align: center;
    cursor: pointer;
    background-color: #333;
    transition: background-color 0.3s;
    flex-shrink: 0;
    /* Prevent items from shrinking */
    width: calc((100% / 6) - 8px);
    /* 调整宽度以适应新的边距和期望数量 (6个项目，每个左右边距4px) */
    /* Aim for about 6.5 items visible to encourage scroll perception, adjust as needed */
    margin: 0 4px;
    /* 增加项目之间的边距 */
}

.carousel-item.active,
.carousel-item:hover {
    background-color: #3366cc;
}

.carousel-item img {
    width: 100%;
    height: 70px;
    /* Slightly increased height for nav images */
    object-fit: cover;
    border-radius: 4px;
}

.carousel-item p {
    color: white;
    font-size: 12px;
    line-height: 1.4;
    /* 稍微增加行高以获得更好的可读性 */
    margin-top: 6px;
    height: calc(12px * 1.4 * 2);
    /* 显式设置高度以容纳两行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    /* 确保文本可以换行 */
}

/* 游戏评测区域 */
.game-reviews {
    /* This class is used on the section wrapper in index.html for '品味游戏' */
    margin: 30px 5%;
    /* position: relative; /* Will be handled by .content-module */
}

/* General content module styling */
.content-module {
    margin: 30px 20px;
    /* Restored side margins */
    position: relative;
    /* For absolute positioning of page buttons */
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    /* position: relative; /* Moved to .content-module */
}

.section-title {
    font-size: 22px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #3366cc;
}

.more-link {
    color: #3366cc;
    font-size: 14px;
}

.pagination {
    display: flex;
    align-items: center;
    /* justify-content: flex-end; */
    /* Original */
    /* We will position buttons absolutely, so this container might not be strictly needed for buttons */
    /* Or, it can be used to group them if they are not absolutely positioned outside */
    /* For now, let's assume buttons are moved or their container is simple */
    justify-content: center;
    /* If dots were to remain, center them */
    margin-bottom: 15px;
    /* Original */
    width: 100%;
    position: static;
    /* Overriding any previous positioning if buttons are moved out */
}

.page-btn {
    /* width: 24px; */
    /* Original */
    /* height: 24px; */
    /* Original */
    width: 36px;
    /* Larger buttons */
    height: 36px;
    border-radius: 50%;
    background-color: rgba(238, 238, 238, 0.8);
    /* Slightly transparent */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    /* Darker icon color */
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: absolute;
    /* Position arrows relative to .game-reviews or .content-module */
    top: 50%;
    transform: translateY(-50%);
    /* Vertically center */
    z-index: 999;
    /* Ensure they are above content cards and carousel */
}

.page-btn:hover {
    background-color: #3366cc;
    color: white;
}

.page-btn.prev {
    left: -15px;
    /* Adjust as needed for spacing from the module edge */
}

.page-btn.next {
    right: -15px;
    /* Adjust as needed for spacing from the module edge */
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
    color: #aaa;
}


.page-dots {
    display: none;
    /* Removed as per new design */
    /* display: flex; */
    /* margin: 0 10px; */
}

/* .dot { ... } .dot.active { ... } */
/* Dot styles remain if ever re-enabled, but dots are hidden */

.content-grid {
    /* Common class for game-grid and news-grid */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Restored gap */
    min-height: 360px;
    /* Adjusted min-height, might need further tuning based on card content */
    /* Adjust based on card height for 2 rows of cards */
    align-content: flex-start;
    /* overflow: hidden; */
    /* Prevent scrollbars if content overflows due to JS pagination */
}

.game-grid {
    /* This remains for horizontal game cards */
    /* display: flex; flex-wrap: wrap; gap: 10px; min-height: 360px; align-content: flex-start; */
    /* These styles are now in .content-grid, .game-grid can be for specifics if any */
}

.news-grid {
    /* Styles for vertical news list */
    display: flex;
    flex-direction: column;
    gap: 0;
    /* No gap, items will have border-bottom */
    min-height: auto;
    /* Override from .content-grid */
}

.game-card {
    /* For horizontal game cards */
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    width: calc(20% - 8px);
    /* Restored for 5 cards per row with 10px gap (general/homepage) */
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

/* Ensure '品味游戏' section (#home-pinweiyouxi) on homepage displays 4 cards per row for desktop */
#home-pinweiyouxi .game-card {
    width: calc(25% - 7.5px);
    /* 4 cards per row: (100% - 3 * 10px gap) / 4 */
}

.game-card .game-img {
    /* Ensure specific styles for game card images */
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #f0f0f0;
    /* Placeholder */
}

.game-card .game-img img {
    /* Ensure specific styles for img within game card images */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.game-card:hover {
    transform: translateY(-3px);
}

/* News card styling for vertical list */
.news-card {
    /* This will be a list item */
    width: 100%;
    display: flex;
    /* For image on left, text on right */
    flex-direction: row;
    align-items: flex-start;
    /* Align items to the top */
    padding: 12px 0;
    /* Padding top/bottom, no side padding as it's full width */
    border-bottom: 1px solid #e9e9e9;
    background-color: #fff;
    /* Ensure background if page-container has different one */
    margin-bottom: 0;
    /* Remove margin as gap/border handles spacing */
    border-radius: 0;
    /* No radius for list items */
    box-shadow: none;
    /* No shadow for list items */
    transition: background-color 0.2s;
}

.news-card:last-child {
    border-bottom: none;
}

.news-card:hover {
    background-color: #f9f9f9;
    transform: none;
    /* No hover transform for list items */
}

.news-card .game-img {
    /* Thumbnail for news */
    flex: 0 0 120px;
    /* Fixed width for thumbnail */
    height: 80px;
    /* Fixed height for thumbnail */
    padding-top: 0;
    /* Override aspect ratio padding */
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    /* Ensure image respects border-radius */
    background-color: #f0f0f0;
    /* Placeholder */
}

.news-card .game-img.no-image {
    /* Class to add via JS if no image */
    display: none;
}

.news-card .game-img img {
    position: static;
    /* Override from general .game-img img */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .news-content-wrapper {
    /* Wrapper for text content in news list item */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertically center text if image is taller */
    min-height: 80px;
    /* Match image height if image exists */
}


.score-circle {
    /* If used for game-card, might need size adjustment if cards are smaller */
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    /* Adjust if a different size is desired */
    height: 40px;
    /* Adjust if a different size is desired */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    /* Solid black background */
    border-radius: 50%;
    /* Ensures it's a circle */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* Optional: subtle shadow for depth */
}

.score-circle svg {
    /* display: none; */
    /* Removed to show SVG */
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Ensure consistent starting point */
}

.score-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    /* Color of the dashed background */
    stroke-width: 1.5;
    /* Thinner stroke for the dashed background */
    stroke-dasharray: 2, 3;
    /* Creates a dashed effect (2px dash, 3px gap) */
}

.score-circle-fill {
    fill: none;
    stroke-width: 3;
    /* Slightly thicker for the gradient fill */
    /* stroke-dasharray is set by JS */
    stroke-linecap: round;
    /* Makes the line ends rounded */
    /* stroke will be set to url(#scoreGradient) by JS */
}

/* Removed old specific score color classes */

.score-text {
    position: absolute;
    /* Ensures it's centered within the parent .score-circle */
    color: white;
    font-weight: bold;
    font-size: 14px;
    /* Slightly larger for better prominence */
    line-height: 1;
    /* Ensure text is vertically centered if it wraps (though it shouldn't) */
    /* No need for top/left/transform if parent is flex and centered */
}

/* Title and Desc for Game Cards (horizontal) */
.game-card .game-title {
    padding: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
    min-height: 36px;
    /* Approx 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card .game-desc {
    padding: 0 8px 8px;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.game-card .game-date {
    padding: 0 8px 8px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #777;
    padding: 0 8px 8px;
}

.game-meta .game-author,
.game-meta .game-created-at {
    display: flex;
    align-items: center;
}

.game-meta i {
    margin-right: 4px;
}

/* Title, Desc, Meta for News Cards (vertical list items) */
.news-card .game-title {
    /* Re-using .game-title for consistency, but styled for news */
    font-size: 17px;
    /* Larger for news list item title */
    font-weight: 500;
    /* Medium weight */
    color: #333;
    line-height: 1.4;
    margin-bottom: 4px;
    padding: 0;
    /* Reset padding */
    min-height: auto;
    /* Reset min-height */
}

.news-card .game-desc {
    /* Re-using .game-desc, styled for news summary */
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 6px;
    padding: 0;
    /* Reset padding */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Show 2 lines */
    -webkit-box-orient: vertical;
}

.news-card .news-meta {
    /* For date/source etc. in news list */
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Push meta to the bottom */
}

.news-author,
.news-date,
.news-author-date {
    display: flex;
    align-items: center;
}

.news-author i,
.news-date i,
.news-author-date i {
    margin-right: 4px;
    margin-left: 8px;
}


/* 页脚 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    /* Adjusted padding */
    flex-shrink: 0;
    /* Prevent footer from shrinking */
}

/* Hide horizontal pagination for news module */
#home-zixun>.page-btn {
    /* Targets .page-btn if direct child of #home-zixun */
    display: none !important;
}

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    /* 默认隐藏，只在小屏幕显示 */
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
    /* 高于导航栏 */
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}


/* 管理员登录表单样式 */
.admin-login-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.admin-login-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.admin-login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.admin-login-form button {
    width: 100%;
    padding: 10px;
    background-color: #3366cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.admin-login-form button:hover {
    background-color: #2a5298;
}

/* 图片上传表单样式 */
.image-upload-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.image-upload-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.image-upload-form input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.image-upload-form button {
    width: 100%;
    padding: 10px;
    background-color: #3366cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.image-upload-form button:hover {
    background-color: #2a5298;
}

/* 新测评表单样式 */
.new-review-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.new-review-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.new-review-form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.new-review-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    height: 150px;
    resize: vertical;
}

.new-review-form button {
    width: 100%;
    padding: 10px;
    background-color: #3366cc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.new-review-form button:hover {
    background-color: #2a5298;
}

/* 媒体查询 - 响应式布局 */
@media (max-width: 1200px) {

    /* .game-grid is handled by .content-grid general rules or specific page styles */
    /* Ensuring .game-card (e.g., on pinweiyouxi.html) uses this rule if not overridden by more specific homepage styles */
    .page-container:not(.index-body) .game-card {
        width: calc(25% - 7.5px);
        /* 4 cards per row */
    }
}

@media (max-width: 992px) {
    .page-container:not(.index-body) .game-card {
        width: calc(33.333% - 6.67px);
        /* 3 cards per row */
    }

    /* Homepage .content-grid cards are handled by the 768px breakpoint below */
}

/* Responsive Navigation and general small screen adjustments */
@media (max-width: 768px) {

    .header {
        /* Adjust padding if necessary for smaller screens, or keep as is */
    }

    .main-nav {
        display: none;
        /* Hide by default on small screens */
        flex-direction: column;
        position: absolute;
        top: 100%;
        /* Position below the header */
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        z-index: 999;
        /* Ensure it's above sub-nav if sub-nav is still visible */
    }

    .header.nav-open .main-nav {
        /* Show when toggled */
        display: flex;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item.search {
        margin-top: 0.5rem;
        display: block;
        /* Make search icon a block in menu */
        margin: 0.5rem auto;
        padding: 0.5rem;
    }

    .nav-toggle {
        display: block;
        /* Show hamburger toggle */
    }

    /* Hamburger animation when nav is open */
    .header.nav-open .hamburger {
        background: transparent;
    }

    .header.nav-open .hamburger::before {
        transform: translateY(8px) rotate(45deg);
    }

    .header.nav-open .hamburger::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Adjust sub-nav for smaller screens */
    .sub-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
        /* Simpler padding */
    }

    .hot-tags {
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .hot-tags a {
        font-size: 13px;
        /* Slightly smaller */
    }

    .category-tabs {
        width: 100%;
        overflow-x: auto;
        /* Allow horizontal scroll if many tabs */
        justify-content: flex-start;
    }

    /* Homepage content grid adjustments */
    .content-grid {
        /* This applies to both .game-grid and .news-grid on homepage */
        min-height: auto;
        /* Allow natural height */
    }

    #home-pinweiyouxi .game-card,
    /* Specifically target homepage game cards */
    #home-zixun .news-card {
        /* Specifically target homepage news cards */
        width: calc(50% - 5px);
        /* 2 cards per row */
    }

    /* Adjust carousel navigation for small screens */
    .carousel-nav {
        /* display: flex; already set by default */
        /* overflow-x: hidden; already set by default */
        /* No need to change to grid, keep as flex for JS scrolling */
    }

    .carousel-item {
        /* Adjust width for 768px screens to show ~3-4 items */
        width: calc(100% / 3.5 - 8px);
        /* Shows approx 3.5 items, adjust as needed */
    }

    .carousel-item p {
        font-size: 11px;
        height: calc(11px * 1.4 * 2);
        /* 适应移动端字体大小的高度 */
    }

    .carousel-item img {
        height: 50px;
    }

    .carousel-item {
        padding: 5px;
    }

    /* Adjust main carousel height for mobile */
    .carousel-main {
        height: 250px;
        /* Or another value like 40vh, 200px etc. */
    }

    .page-btn.prev {
        left: -5px;
    }

    .page-btn.next {
        right: -5px;
    }
}

@media (max-width: 576px) {
    .logo {
        width: 80px;
        /* 移动端宽度修改为80px */
        height: 38px;
        /* 移动端高度修改为80px */
    }

    /* Homepage content grid adjustments for very small screens */
    #home-pinweiyouxi .game-card,
    #home-zixun .news-card {
        width: 100%;
        /* 1 card per row */
    }

    /* Adjust general page buttons for very small screens */
    .page-btn {
        width: 30px;
        height: 30px;
    }

    .page-btn.prev {
        left: 2px;
    }

    .page-btn.next {
        right: 2px;
    }

    /* Carousel nav further adjustments for very small screens */
    .carousel-nav {
        /* display: flex; already set by default */
        /* overflow-x: hidden; already set by default */
        /* No need to change to grid, keep as flex for JS scrolling */
    }

    .carousel-item {
        /* Adjust width for 576px screens to show ~3 items */
        width: calc(100% / 3 - 8px);
        /* Shows 3 items with 4px margin on each side */
    }

    /* .carousel-item:nth-child(n+4) { */
    /* REMOVE: Do not hide items, overflow:hidden on parent handles it */
    /* display: none; */
    /* } */

    /* The .main-nav display:none rule from the previous 768px block will persist,
       so it does not need to be repeated here unless a different behavior is desired for 576px.
       The nav-toggle will still be visible. */
}

/* Game Score Badge on Game Cards */
.game-card .game-img {
    position: relative;
    /* Ensure this is set for absolute positioning of child */
}

.game-score-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.85);
    /* Slightly transparent black */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    /* Ensure text is vertically centered */
    z-index: 5;
    border: 3px solid transparent;
    /* Base for colored ring */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* Subtle shadow for better visibility */
}

.game-score-badge .score-value {
    /* Text is directly inside, no extra span styling needed beyond parent */
}

.game-score-badge.score-high {
    border-color: #28a745;
    /* Green for high scores (e.g., 75+) */
}

.game-score-badge.score-medium {
    border-color: #ffc107;
    /* Yellow for medium scores (e.g., 50-74) */
}

.game-score-badge.score-low {
    border-color: #dc3545;
    /* Red for low scores (e.g., <50) */
}

/* News Detail Page Specific Styles */
.news-title-info-background {
    background-color: #2c2c2c;
    /* 深灰色背景，参考游戏详情页 */
    padding: 20px;
    border-radius: 8px;
    /* 圆角 */
    margin-bottom: 20px;
    /* 与下方内容的间距 */
    color: #ffffff;
    /* 内部文字颜色调整为白色 */
}

.news-title-info-background .article-title {
    color: #ffffff !important;
    /* 标题文字颜色调整为白色, 增加!important确保覆盖 */
    margin-bottom: 10px;
    /* 调整标题和下方元数据的间距 */
}

.article-meta-condensed {
    display: flex;
    /* 使内部元素在同一行显示 */
    justify-content: flex-start;
    /* 从左侧开始排列 */
    align-items: center;
    /* 垂直居中对齐 */
    font-size: 0.9em;
    /* 调整字体大小 */
    color: #cccccc !important;
    /* 元数据文字颜色调整为浅灰色, 增加!important确保覆盖 */
}

.article-meta-condensed .meta-editor,
.article-meta-condensed .meta-date {
    margin-right: 15px;
    /* 元数据之间的间距 */
    color: #cccccc !important;
    /* 确保这些也继承或应用浅灰色 */
}

/* 调整原有的 article-meta（现在只包含分类）的样式，使其与新的背景板协调 */
.article-header>.article-meta {
    /* 定位到直接子元素 .article-meta */
    margin-top: 15px;
    /* 在背景板下方留出一些空间给分类 */
    padding-left: 5px;
    /* 轻微左内边距 */
}

/* Dropdown Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 160px;
    z-index: 1001;
    border: 1px solid #eee;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    color: #3366cc;
}

/* Review Card for Game Detail Page */
.review-card {
    display: flex;
    align-items: center;
    background-color: #2c2c2c;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.review-card-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    margin-right: 20px;
}

.review-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.review-card-content {
    flex-grow: 1;
}

.review-card-title {
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.review-card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #ccc;
}

/* Adjustments for mobile view */
@media (max-width: 768px) {
    .nav-item.dropdown {
        position: static;
    }

    .dropdown-menu {
        position: static;
        display: none;
        /* Initially hidden on mobile */
        box-shadow: none;
        border-radius: 0;
        background-color: #f9f9f9;
        padding: 0;
        min-width: 100%;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }

    /* JS will toggle this class on the parent .dropdown */
    .nav-item.dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding-left: 30px;
        /* Indent dropdown items on mobile */
    }
}

/* Styles for News/Vertical List Layout */
.news-list-container {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 25px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    gap: 15px;
}

.news-item:first-child {
    padding-top: 0;
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-item:hover .news-title {
    color: #c00;
}

.news-item-image-container {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.news-item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.news-title {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.news-date {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.news-author {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #666;
}

.news-meta-separator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 12px;
    color: #666;
    margin: 0 5px;
}