/**
 * 苹果软件二级首页样式
 * 
 * 包含Mac软件、iPhone应用、iPad应用
 * 严格延续pc-software.html页面中已有的卡片样式设计风格
 */

/* ==================== 平台切换标签栏 ==================== */
.platform-tabs-section {
    background: white;
    padding: 30px 0 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.platform-tabs {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--gray-100);
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-tab:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.platform-tab.active {
    background: linear-gradient(135deg, #a11ee5 0%, #0D47A1 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.platform-tab svg {
    transition: all 0.3s ease;
}

/* ==================== 页面横幅区域（Apple风格 - 紧凑通透设计） ==================== */
.pc-hero-section {
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #1e1b4b 70%, #0f172a 100%);
    padding: 60px 0;
    margin-bottom: 30px;
    position: relative;
}

.pc-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    max-width: 100%;
}

.pc-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.pc-hero-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.85) 50%, rgba(236, 72, 153, 0.8) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 60px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
}

.pc-hero-text h1 {
    font-size: 36px;
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
}

.pc-hero-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
}

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

.pc-hero-stats span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.pc-hero-stats strong {
    color: white;
    font-size: 20px;
    display: block;
    font-weight: 600;
}

/* 分类快捷入口 */
.pc-hero-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 300px;
    flex-shrink: 0;
}

.hero-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-cat-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
    transform: translateY(-2px);
    color: white;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 8px 16px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-cat-item svg {
    margin-bottom: 6px;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-cat-item span {
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ==================== 精选推荐区域 ==================== */
.featured-section {
    margin-bottom: 30px;
    padding: 10px 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.section-title svg {
    color: #514aff;
}

.more-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--gray-500);
    font-size: 14px;
    transition: all 0.3s ease;
}

.more-link:hover {
    color: var(--primary-color);
    gap: 8px;
}

/* 精选卡片网格 */
.featured-grid {
    display: flex;
    gap: 20px;
    align-items: stretch;
    padding-bottom: 40px;
}

/* 左侧大轮播卡片 */
.featured-carousel {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 220px;
}

.featured-carousel .carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.featured-carousel .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.featured-carousel .carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.featured-carousel .slide-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 左侧渐变遮罩 - 从左到右渐变 */
.featured-carousel .slide-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    z-index: 1;
}

.featured-carousel .slide-content {
    position: absolute;
    bottom: 35px;
    left: 0;
    right: 0;
    padding: 20px 25px;
    z-index: 2;
}

.featured-carousel .slide-text {
    color: white;
}

.featured-carousel .slide-text h3 {
    font-size: 26px;
    font-weight: 700;
}

.featured-carousel .slide-text p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 12px;
    line-height: 1.4;
}

.featured-carousel .slide-btn {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.featured-carousel .slide-btn:hover {
    background: #1a6ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

/* 轮播指示器 - 居中显示 */
.featured-carousel .carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.featured-carousel .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-carousel .indicator.active {
    width: 28px;
    border-radius: 5px;
    background: white;
}

/* 右侧2个小卡片网格 */
.featured-links {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
    gap: 14px;
    height: 220px;
}

.featured-link-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.featured-link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.featured-link-item .link-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-link-item:hover .link-bg {
    transform: scale(1.08);
}

/* 底部渐变遮罩 - 只在底部有渐变 */
.featured-link-item .link-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    z-index: 1;
}

.featured-link-item .link-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
    color: white;
}

.featured-link-item .link-content h4 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-link-item .link-content p {
    font-size: 13px;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 主内容区域（双栏布局） ==================== */
.content-section {
    margin-bottom: 10px;
}

.content-layout {
    display: flex;
    gap: 30px;
    max-width: 100%;
}

.content-left {
    flex: 1;
    min-width: 0;
}

.content-right {
    width: 320px;
    flex-shrink: 0;
}

/* 分类区块 */
.category-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.category-title {
    font-size: 18px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.category-title svg {
    color: #514aff;
}

/* 软件卡片网格 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.software-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: left;
}

.software-card:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.software-card:hover .software-info h4 {
    color: var(--primary-color);
}

.software-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.software-info {
    flex: 1;
    min-width: 0;
}

.software-info h4 {
    font-size: 14px;
    color: var(--gray-800);
    margin-bottom: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.software-desc {
    font-size: 12px;
    color: #96a0a9;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 12px;
}

.software-meta .stars {
    color: #FFC107;
    letter-spacing: 1px;
}

.software-meta .size {
    color: var(--gray-400);
}

/* ==================== 侧边栏 ==================== */
.sidebar-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.sidebar-header svg {
    color: #514aff;
}

/* 排行榜 */
.rank-list {
    display: flex;
    flex-direction: column;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-decoration: none;
}

.rank-item:hover {
    background: var(--gray-100);
}

.rank-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: white;
}

.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #C0C0C0, #9E9E9E);
    color: white;
}

.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #CD7F32, #A1887F);
    color: white;
}

.rank-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-size: 14px;
    color: var(--gray-800);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    font-size: 12px;
    color: var(--gray-400);
}

/* 资讯列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-item:hover {
    opacity: 0.8;
}

.news-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-title {
    font-size: 13px;
    color: var(--gray-800);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.news-date {
    font-size: 12px;
    color: var(--gray-400);
}

.news-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--primary-color);
    background: var(--primary-bg);
    border-radius: 4px;
}

/* ==================== 专题聚合区域 ==================== */
.topic-section {
    margin-bottom: 30px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.topic-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
}

.topic-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.topic-img {
    width: 100px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.topic-info {
    flex: 1;
}

.topic-info h4 {
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 4px;
    font-weight: 600;
}

.topic-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.topic-count {
    font-size: 12px;
    color: var(--primary-color);
    background: var(--primary-bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* ==================== 标签云 ==================== */
.tag-section {
    margin-bottom: 20px;
}

.tag-cloud-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.tag-item.hot {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
}

.tag-item.new {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .featured-card:last-child {
        display: none;
    }
    
    .software-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pc-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .pc-hero-left {
        flex-direction: column;
    }
    
    .pc-hero-stats {
        justify-content: center;
    }
    
    .pc-hero-categories {
        width: 100%;
        max-width: 400px;
    }
    
    .content-layout {
        flex-direction: column;
    }
    
    .content-right {
        width: 100%;
    }
    
    .topic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .platform-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .pc-hero-section {
        padding: 24px 0;
    }
    
    .pc-hero-left {
        flex-direction: column;
        text-align: center;
    }
    
    .pc-hero-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }
    
    .pc-hero-text h1 {
        font-size: 24px;
    }
    
    .pc-hero-text p {
        font-size: 13px;
    }
    
    .pc-hero-stats {
        gap: 16px;
    }
    
    .pc-hero-stats strong {
        font-size: 16px;
    }
    
    .pc-hero-categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .hero-cat-item {
        padding: 12px 8px;
    }
    
    .hero-cat-item svg {
        width: 24px;
        height: 24px;
    }
    
    .hero-cat-item span {
        font-size: 11px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .featured-large {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-tabs {
        gap: 8px;
    }
    
    .platform-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .platform-tab svg {
        width: 16px;
        height: 16px;
    }
}
