/*
Theme Name: H5 Game Hub
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 一个专为移动端和平板优化的在线小游戏分享主题，采用现代化H5设计，提供流畅的游戏浏览和游玩体验。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: h5-game-hub
Tags: mobile-first, responsive, games, entertainment, modern
*/

/* ========================================
   CSS Reset & Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --accent-color: #2563eb;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Header Styles
======================================== */
.site-header {
    background: var(--card-bg);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.site-title:hover {
    opacity: 0.8;
}

/* ========================================
   Navigation
======================================== */
.main-navigation {
    display: flex;
    gap: 1rem;
}

.main-navigation a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.main-navigation a:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ========================================
   Main Content
======================================== */
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* ========================================
   Game List
======================================== */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.75rem;
    gap: 0.75rem;
}

/* 只在鼠标设备上显示hover效果 */
@media (hover: hover) and (pointer: fine) {
    .game-card:hover {
        box-shadow: var(--shadow-lg);
    }
}

/* 只在非触摸设备上使用:active */
@media (hover: hover) and (pointer: fine) {
    .game-card:active {
        transform: scale(0.99);
    }
}

.game-thumbnail,
.game-thumbnail-placeholder {
    width: 70px;
    height: 70px;
    min-width: 70px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    flex-shrink: 0;
}

/* 兼容不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 1/1) {
    .game-thumbnail,
    .game-thumbnail-placeholder {
        height: 0;
        padding-bottom: 100%; /* 1:1 比例 */
        position: relative;
    }
    
    .game-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.game-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    padding: 0;
    color: var(--text-color);
    line-height: 20px;
    height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.game-description {
    display: none;
}

.game-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 5px 0;
    padding: 0;
    line-height: 20px;
    height: 20px;
}

.game-category {
    display: none;
}

.game-plays {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.game-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.play-button {
    padding: 0.5rem 1.25rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.play-button:hover {
    background: var(--accent-color);
    transform: scale(1.02);
}

/* 只在非触摸设备上使用:active */
@media (hover: hover) and (pointer: fine) {
    .play-button:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* ========================================
   Single Game Page
======================================== */
.game-single {
    max-width: 900px;
    margin: 0 auto;
}

.game-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title,
.archive-title,
.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    text-align: center;
}

.game-play-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.game-preview-image {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.game-preview-image img {
    width: 100%;
    height: auto;
    display: block;
}

.game-play-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.game-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.game-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

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

.game-play-notice {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.game-control-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.game-control-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.game-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* ========================================
   Footer
======================================== */
.site-footer {
    display: none;
}

.footer-content {
    display: none;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1200px;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0; /* 减少内边距 */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem; /* 减少图标和文字间距 */
    padding: 0.3rem 0.8rem; /* 减少内边距 */
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem; /* 减小字体 */
    transition: all 0.3s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item .icon {
    font-size: 1.3rem; /* 减小图标大小 */
}

/* ========================================
   Home Stats
======================================== */
.home-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.home-stats .stat-item {
    text-align: center;
    flex: 1;
}

.home-stats .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.home-stats .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   Search Bar
======================================== */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-form {
    width: 100%;
}

/* ========================================
   Category Icons
======================================== */
.category-icons {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.category-icons::-webkit-scrollbar {
    display: none;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 60px;
    flex-shrink: 0;
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.category-icon .icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.category-icon-item:hover .category-icon {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-icon-item:active .category-icon {
    transform: translateY(-2px);
}

.category-name {
    font-size: 0.875rem;
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    font-weight: 500;
}

.search-box {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.search-box::placeholder {
    color: var(--text-secondary);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .site-header {
        padding: 0.875rem;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation.active {
        display: flex;
    }

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

    .games-grid {
        gap: 0.5rem;
    }

    .game-card {
        padding: 0.6rem;
    }

    .game-thumbnail,
    .game-thumbnail-placeholder {
        width: 60px;
        height: 60px;
        min-width: 60px;
        border-radius: 10px;
    }

    .game-title {
        font-size: 0.9rem;
        margin: 0 0 5px 0 !important;
    }

    .game-meta {
        font-size: 0.75rem;
        margin: 0 0 5px 0 !important;
    }
    
    .game-rating-display {
        margin: 0 !important;
    }

    .game-plays {
        font-size: 0.75rem;
    }

    .play-button {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .site-content {
        padding: 1rem 0.75rem;
    }

    .game-header h1 {
        font-size: 1.5rem;
    }

    .game-controls {
        flex-wrap: wrap;
    }

    .game-control-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .search-filter-bar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }
}

/* 平板 (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 1.25rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .game-card {
        max-width: none;
    }
    
    .game-title {
        font-size: 1.1rem;
    }
    
    .game-meta {
        font-size: 0.9rem;
    }
    
    .play-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .category-icons {
        gap: 2rem;
        padding: 0.75rem 1rem;
    }
    
    .category-icon {
        width: 65px;
        height: 65px;
    }
    
    .category-name {
        font-size: 0.95rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .bottom-nav-item {
        padding: 0.625rem 1.25rem;
    }
    
    .bottom-nav-item .icon {
        font-size: 1.75rem;
    }
    
    .bottom-nav-item span {
        font-size: 0.9rem;
    }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.875rem;
    }
    
    .category-icons {
        gap: 1.25rem;
        padding: 0.5rem 0.75rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .search-box {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* 中等屏手机 (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .category-icons {
        gap: 1.75rem;
    }
    
    .category-icon {
        width: 55px;
        height: 55px;
    }
}

@media (min-width: 1025px) {
    .site-footer {
        padding: 0;
    }
    
    .site-content {
        max-width: 1200px;
        padding: 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .category-icons {
        gap: 2.5rem;
        padding: 0.75rem 1.5rem;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    .category-name {
        font-size: 1rem;
    }
}

/* ========================================
   Loading & Animations
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========================================
   Utility Classes
======================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}

/* Touch-friendly tap targets */
@media (hover: none) {
    .game-card,
    .play-button,
    .game-control-btn {
        -webkit-tap-highlight-color: transparent;
    }
}

/* 防止自动聚焦导致的样式变化 */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.game-card:focus:not(:focus-visible),
.play-button:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* 只在键盘导航时显示焦点样式 */
a:focus-visible,
button:focus-visible,
.game-card:focus-visible,
.play-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   Page Headers
======================================== */
.page-header,
.archive-header,
.search-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.page-title,
.archive-title,
.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.archive-description {
    color: var(--text-secondary);
    margin-top: 1rem;
    line-height: 1.8;
}

.search-count {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ========================================
   Game Rating Display
======================================== */
.game-rating-display {
    display: block;
    padding: 0;
    line-height: 20px;
    height: 20px;
    overflow: hidden;
}

.game-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 0.75rem;
    margin: 0;
    padding: 0;
    vertical-align: top;
    line-height: 1;
}

.game-rating .star {
    font-size: 12px;
    line-height: 1;
}

.game-rating .star.full {
    color: #fbbf24;
}

.game-rating .star.half {
    color: #fbbf24;
    opacity: 0.5;
}

.game-rating .star.empty {
    color: #d1d5db;
}

.game-rating .rating-value {
    margin-left: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   Game Meta Info (Single Page)
======================================== */
.game-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.game-meta-info > * {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-plays-count,
.game-categories {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.game-categories a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.game-categories a:hover {
    color: var(--accent-color);
}

/* ========================================
   Game Tags
======================================== */
.game-tags {
    margin: 2rem 0;
}

.game-tags h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.game-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.game-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========================================
   Game Info Grid
======================================== */
.game-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* ========================================
   No Results / Error Pages
======================================== */
.no-results,
.search-suggestions {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.no-results h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.search-suggestions {
    max-width: 500px;
    margin: 2rem auto;
    text-align: left;
}

.search-suggestions h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.search-suggestions li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.search-suggestions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ========================================
   Pagination
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem; /* 减少顶部间距 */
    padding: 1rem 0 0 0; /* 减少内边距，底部间距由内联样式控制 */
    margin-bottom: 0 !important;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a,
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ========================================
   Responsive Improvements
======================================== */
@media (max-width: 768px) {
    .page-title,
    .archive-title,
    .search-title {
        font-size: 1.5rem;
    }
    
    .game-meta-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pagination {
        margin-top: 1rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 5rem !important; /* 移动端底部间距80px，覆盖内联样式 */
    }
    
    .pagination a,
    .pagination .current {
        min-width: 40px;
        height: 40px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   WordPress 图片对齐样式
======================================== */
img.alignleft {
    float: left !important;
    margin: 0.5rem 1.5rem 1rem 0 !important;
}

img.alignright {
    float: right !important;
    margin: 0.5rem 0 1rem 1.5rem !important;
}

img.aligncenter {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    float: none !important;
}

img.alignnone {
    margin: 0.5rem 0 !important;
}

/* 图片标题样式 */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0 0.5rem;
}

/* 清除浮动 */
.entry-content::after,
.welfare-excerpt::after {
    content: "";
    display: table;
    clear: both;
}

/* 响应式图片 */
.entry-content img,
.welfare-excerpt img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 移动端图片对齐优化 */
@media (max-width: 768px) {
    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 1rem auto;
    }
}
