/**
 * 最近更新页面样式 - 方案二：标签页 + 瀑布流布局
 * 延续蓝域下载站蓝色系设计风格
 */

/* ==================== 页面头部 ==================== */
.page-header {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 50%, #42a5f5 100%);
    padding: 50px 0 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

/* 光晕装饰 */
.page-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* 左侧标题区域 */
.page-title {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* 图标容器 */
.page-title-icon {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.25);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.page-title-icon:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.3);
}

.page-title-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
}

.page-title-text h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    /* text-shadow: 0 2px 8px rgba(0,0,0,0.2); */
}

.hero-desc {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: nowrap;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat-num {
    font-size: 24px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.hero-stat-label {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

/* 右侧统计区域 */
.update-stats-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-stats-title {
    font-size: 13px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* 统计数字 - 玻璃拟态设计 */
.update-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 30px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffeb3b, #ffc107, #ff9800);
}

.stat-item:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 统计趋势指示器 */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #fff;
    margin-top: 6px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    font-weight: 600;
}

.stat-trend svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* ==================== 平台标签页 ==================== */
.platform-tabs {
    background: white;
    padding: 25px 0;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.platform-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.tabs-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.platform-tab:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
}

.platform-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.platform-tab svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.platform-tab-text {
    font-size: 15px;
    font-weight: 500;
}

.platform-tab-count {
    font-size: 13px;
    padding: 3px 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 20px;
    font-weight: 600;
}

.platform-tab.active .platform-tab-count {
    background: rgba(255,255,255,0.25);
}

/* ==================== 瀑布流布局 ==================== */
.updates-content {
    padding: 30px 0 0px;
}

/* 时间分组标题 */
.time-group {
    margin-bottom: 30px;
}

.time-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.time-group-title h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
}

.time-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.time-badge.today {
    background: #ffebee;
    color: #c62828;
}

.time-badge.yesterday {
    background: #fff3e0;
    color: #ef6c00;
}

.time-badge.week {
    background: #e8f5e9;
    color: #2e7d32;
}

.time-badge.earlier {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* 瀑布流网格 */
.waterfall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 更新卡片 */
.update-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-fast);
    border: 1px solid var(--gray-200);
}

.update-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.update-card-header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, white 100%);
}

.update-platform-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: var(--shadow-sm);
}

.update-platform-icon svg {
    width: 18px;
    height: 18px;
}

.update-platform-icon.windows svg {
    fill: #0078d4;
}

.update-platform-icon.android svg {
    fill: #3ddc84;
}

.update-platform-icon.ios svg {
    fill: #555;
}

.update-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.update-icon img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.update-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    /* margin-bottom: 8px; */
    display: block;
}

.update-name:hover {
    color: var(--primary-color);
}

.update-category {
    font-size: 13px;
    color: var(--gray-500);
}

.update-card-body {
    padding: 15px 20px;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.version-label {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
}

.version-current {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    background: var(--primary-bg);
    padding: 2px 10px;
    border-radius: 4px;
}

.update-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.update-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.update-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
}

.update-time svg {
    width: 14px;
    height: 14px;
}

.update-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 15px;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-load-more:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-bg);
}

.btn-load-more svg {
    width: 18px;
    height: 18px;
}

/* ==================== 加载更多按钮 ==================== */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-bottom: 10px;
}

.btn-load-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-load-more:hover {
    background: var(--primary-color);
    color: white;
}

.btn-load-more svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.btn-load-more:hover svg {
    transform: translateY(2px);
}

/* 隐藏卡片 - 默认隐藏 */
.update-card.hidden-card {
    display: none;
}

/* 平台筛选隐藏卡片 */
.update-card.platform-hidden {
    display: none;
}

/* 显示隐藏卡片时的动画 */
.update-card.hidden-card.show,
.update-card.platform-hidden.show {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载更多按钮加载中状态 */
.btn-load-more.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-load-more.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 没有更多数据时隐藏按钮 */
.btn-load-more.hidden {
    display: none;
}

/* ==================== 平台筛选内容区域 ==================== */
.tab-content-platform {
    width: 100%;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 60px;
    height: 60px;
    fill: var(--primary-color);
}

.empty-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 15px;
    color: var(--gray-500);
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1200px) {
    .page-header-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .page-title {
        flex-direction: column;
    }
    
    .waterfall-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .platform-tabs-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tabs-wrapper {
        justify-content: center;
    }
    
    .platform-tab {
        padding: 12px 18px;
    }
    
    .platform-tab-text {
        font-size: 14px;
    }
    
    .update-stats {
        gap: 20px;
    }
    
    .stat-item {
        padding: 12px 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 30px 0;
    }
    
    .page-title-text h1 {
        font-size: 24px;
    }
    
    .update-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
        min-width: 100px;
        max-width: 150px;
    }
    
    .tabs-wrapper {
        gap: 8px;
    }
    
    .platform-tab {
        padding: 10px 14px;
        flex: 1;
        justify-content: center;
    }
    
    .platform-tab svg {
        width: 18px;
        height: 18px;
    }
    
    .platform-tab-count {
        display: none;
    }
    
    .waterfall-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .update-card-header {
        padding: 15px;
    }
    
    .update-icon {
        width: 60px;
        height: 60px;
    }
    
    .update-icon img {
        width: 44px;
        height: 44px;
    }
    
    .update-name {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .waterfall-grid {
        grid-template-columns: 1fr;
    }
    
    .time-group-title h2 {
        font-size: 18px;
    }
}
