/* 复用 page-standalone-games.php 的大部分样式 */
.mobile-games-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1); /* 绿色背景区别于单机游戏 */
    border-radius: 20px;
    color: #10b981; /* 绿色文字 */
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981; /* 绿色点 */
    border-radius: 50%;
    animation: pulse-green 2s ease-in-out infinite;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--text-main);
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 20px 0;
}

.stats-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.games-list-section {
    margin-top: 30px;
}

/* 手机游戏列表美化 - 参考示例图 */
.mobile-games-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
    /* 为显示区域添加边框和内边距 */
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.mobile-game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 100px;
    padding: 10px 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

/* 斑马线背景处理：三列布局下的奇数行（1,2,3; 7,8,9等）显示浅灰背景 */
.mobile-game-row:nth-child(6n + 1),
.mobile-game-row:nth-child(6n + 2),
.mobile-game-row:nth-child(6n + 3) {
    background: #f4f5f7;
}

/* 偶数行（4,5,6; 10,11,12等）保持白色背景 */
.mobile-game-row:nth-child(6n + 4),
.mobile-game-row:nth-child(6n + 5),
.mobile-game-row:nth-child(6n + 6) {
    background: #ffffff;
}

/* 置顶文章覆盖背景色 */
.mobile-game-row.sticky-row {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(37, 99, 235, 0.05) 100%) !important;
}

.mobile-game-row:hover {
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #e5e7eb;
    z-index: 1;
}

.mobile-game-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.mobile-game-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    /* 移除 overflow:hidden; 使得置顶标记可以显示在外面 */
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.mobile-game-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* 移到这里 */
}


.mobile-game-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.mobile-game-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mobile-game-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-game-date,
.mobile-game-cat {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
}

.mobile-game-row.is-today .mobile-game-date {
    color: #f97316; /* 今日显示橙色 */
    font-weight: 500;
}

.mobile-game-divider {
    width: 1px;
    height: 10px;
    background: #cbd5e1;
}

.mobile-game-right {
    flex-shrink: 0;
    margin-left: 12px;
    display: flex; /* 保持按钮对齐 */
    align-items: center;
}

.mobile-game-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.mobile-game-row:hover .mobile-game-view-btn {
    background: #e2e8f0;
    color: #0f172a;
}

/* 分页样式 - 复用现有样式，这里确保一致性 */
.pagination-wrapper {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.pagination-container a,
.pagination-container span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 5px;
}

.pagination-container a {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.pagination-container a:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pagination-container .current {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.pagination-container .dots {
    background: transparent;
    border: none;
    color: #999;
}

.pagination-container svg {
    vertical-align: middle;
}

.page-info {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-main);
    margin: 0 0 10px 0;
}

.empty-state p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.back-home-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .mobile-games-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 两列布局下的斑马线 */
    .mobile-game-row:nth-child(n) {
        background: #ffffff; /* 重置 */
    }
    .mobile-game-row:nth-child(4n + 1),
    .mobile-game-row:nth-child(4n + 2) {
        background: #f4f5f7;
    }
}

@media (max-width: 768px) {
    .mobile-games-page {
        padding: 14px 10px;
    }

    .page-header {
        margin-bottom: 24px;
    }

    .brand-pill {
        margin-bottom: 12px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .mobile-games-list-grid {
        grid-template-columns: 1fr;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        gap: 10px;
    }
    
    /* 单列布局下改为独立卡片 */
    .mobile-game-row:nth-child(n) {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 6px rgba(0,0,0,0.02);
        border-radius: 14px;
    }
    
    .mobile-game-row {
        padding: 12px;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mobile-game-left {
        gap: 10px;
        align-items: flex-start;
        min-width: 0;
    }
    
    .mobile-game-info {
        gap: 4px;
        padding-top: 0;
    }
    
    .mobile-game-meta {
        margin-top: 0;
        flex-wrap: wrap;
        gap: 6px;
    }

    .mobile-game-date,
    .mobile-game-cat {
        font-size: 12px;
    }
    
    .mobile-game-divider {
        display: none;
    }
    
    .mobile-game-title {
        font-size: 15px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.35;
        margin-bottom: 0;
        word-break: break-word;
    }
    
    .mobile-game-avatar {
        width: 48px;
        height: 48px;
    }
    
    .mobile-game-right {
        margin-left: 0;
        align-self: center;
    }

    .mobile-game-view-btn {
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 999px;
        background: #eff6ff;
        color: #2563eb;
    }

    .mobile-game-info .card-file-info {
        gap: 4px;
        margin-top: 2px !important;
    }

    .mobile-game-info .file-size,
    .mobile-game-info .file-format {
        font-size: 10px;
        padding: 2px 6px;
        box-shadow: none;
    }

    .mobile-game-info .file-size svg,
    .mobile-game-info .file-format svg {
        width: 10px;
        height: 10px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .page-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .stats-info {
        font-size: 12px;
    }

    .pagination-wrapper {
        margin-top: 24px;
        padding-top: 16px;
    }

    .pagination-container {
        gap: 5px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 34px;
        height: 34px;
        padding: 0 4px;
        font-size: 13px;
        flex: 0 0 auto;
        width: auto !important;
        display: inline-flex !important;
    }

    .nav-text {
        display: none;
    }
    
    .pagination-container svg {
        margin: 0;
        display: block;
    }
}

@media (max-width: 420px) {
    .mobile-games-page {
        padding: 12px 8px;
    }

    .mobile-game-row {
        padding: 10px;
        gap: 8px;
    }

    .mobile-game-avatar {
        width: 44px;
        height: 44px;
    }

    .mobile-game-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .mobile-game-meta {
        gap: 4px;
    }

    .mobile-game-cat {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-game-view-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .mobile-game-avatar > span {
        transform: scale(0.8) !important;
        top: -6px !important;
        left: -8px !important;
    }
}

/* Dark Mode 适配 */
[data-theme="dark"] .mobile-games-list-grid {
    background: var(--bg-surface);
    border-color: var(--border);
}
[data-theme="dark"] .mobile-game-row {
    background: transparent;
}
[data-theme="dark"] .mobile-game-row:nth-child(6n + 1),
[data-theme="dark"] .mobile-game-row:nth-child(6n + 2),
[data-theme="dark"] .mobile-game-row:nth-child(6n + 3) {
    background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .mobile-game-row:nth-child(6n + 4),
[data-theme="dark"] .mobile-game-row:nth-child(6n + 5),
[data-theme="dark"] .mobile-game-row:nth-child(6n + 6) {
    background: transparent;
}
[data-theme="dark"] .mobile-game-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}
[data-theme="dark"] .mobile-game-title {
    color: var(--text-main);
}
[data-theme="dark"] .mobile-game-view-btn {
    background: #334155;
    color: #cbd5e1;
}
[data-theme="dark"] .mobile-game-row:hover .mobile-game-view-btn {
    background: var(--primary);
    color: #fff;
}
[data-theme="dark"] .mobile-game-divider {
    background: var(--border);
}

@media (max-width: 1024px) {
    [data-theme="dark"] .mobile-game-row:nth-child(n) {
        background: transparent;
    }
    [data-theme="dark"] .mobile-game-row:nth-child(4n + 1),
    [data-theme="dark"] .mobile-game-row:nth-child(4n + 2) {
        background: rgba(255, 255, 255, 0.02);
    }
}
@media (max-width: 768px) {
    [data-theme="dark"] .mobile-games-list-grid {
        background: transparent;
        border: none;
    }
    [data-theme="dark"] .mobile-game-row:nth-child(n) {
        background: var(--bg-surface);
        border-color: var(--border);
    }
}
