/* 应用详情页样式 */

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    background: #f5f7fa;
    margin-bottom: 20px;
    border-radius: 8px;
    padding-left: 20px;
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #007bff;
}

.breadcrumb span {
    color: #007bff;
    font-weight: 500;
}

/* 应用信息区域 */
.app-info-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.app-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

/* 应用图标 */
.app-icon {
    flex-shrink: 0;
}

.app-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 应用基本信息 */
.app-basic-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
}

.app-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.app-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.app-version {
    color: #666;
    font-size: 14px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    color: #ffc107;
    font-size: 16px;
}

.rating-score {
    font-weight: 600;
    color: #333;
}

.app-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-item {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-description-short {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
}

/* 下载按钮区域 */
.download-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.primary-download-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.primary-download-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff7070);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.download-icon {
    font-size: 24px;
}

.download-text {
    font-size: 18px;
    font-weight: 700;
}

.app-size {
    font-size: 14px;
    opacity: 0.9;
}

.download-options {
    display: flex;
    gap: 12px;
}

.option-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.option-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
}

/* 应用截图区域 */
.app-screenshots-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.screenshots-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Swiper主轮播样式 */
.screenshots-swiper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    width: 100%;
}

/* 修复Swiper容器的高度问题 */
.screenshots-swiper .swiper-wrapper {
    height: auto !important;
}

.screenshots-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    /* 确保每张幻灯片都占据完整宽度 */
    width: auto !important;
}

.screenshot-img {
    max-width: 100%;
    max-height: 500px;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    /* 确保图片适应容器并保持比例 */
    object-fit: contain;
}

/* 确保Swiper初始化前的默认显示 */
.screenshots-swiper .swiper-slide {
    display: flex !important;
}

/* Swiper导航按钮样式 */
.screenshots-swiper .swiper-button-next,
.screenshots-swiper .swiper-button-prev {
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.screenshots-swiper .swiper-button-next:hover,
.screenshots-swiper .swiper-button-prev:hover {
    background: white;
    color: #ff6b6b;
    transform: scale(1.1);
}

/* 调整导航按钮内部的箭头大小 */
.screenshots-swiper .swiper-button-next::after,
.screenshots-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* Swiper分页指示器样式 */
.screenshots-swiper .swiper-pagination {
    bottom: 20px !important;
}

.screenshots-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transition: all 0.3s ease;
}

.screenshots-swiper .swiper-pagination-bullet:hover {
    background: white;
    transform: scale(1.2);
}

.screenshots-swiper .swiper-pagination-bullet-active {
    background: #ff6b6b;
    width: 24px;
    border-radius: 6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .screenshots-swiper {
        min-height: 300px;
    }
    
    .screenshots-swiper .swiper-slide {
        padding: 10px;
    }
    
    .screenshot-img {
        max-height: 400px;
    }
    
    .screenshots-swiper .swiper-button-next,
    .screenshots-swiper .swiper-button-prev {
        width: 32px;
        height: 32px;
    }
    
    .screenshots-swiper .swiper-button-next::after,
    .screenshots-swiper .swiper-button-prev::after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .screenshots-swiper {
        min-height: 200px;
    }
    
    .screenshot-img {
        max-height: 300px;
    }
    
    .screenshots-swiper .swiper-pagination {
        bottom: 10px !important;
    }
}

/* 应用介绍区域 */
.app-intro-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.intro-tabs {
    display: flex;
    gap: 1px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.intro-tab {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.intro-tab:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #333;
}

.intro-tab.active {
    background: white;
    color: #ff6b6b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.intro-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 应用介绍内容 */
.app-intro-content {
    color: #555;
    line-height: 1.8;
}

.app-intro-content h3 {
    color: #333;
    margin: 20px 0 12px 0;
    font-size: 20px;
}

.app-intro-content p {
    margin: 12px 0;
}

.app-intro-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.app-intro-content li {
    margin: 8px 0;
}

/* 功能特点内容 */
.feature-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-item h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 版本更新内容 */
.version-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.version-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
}

.version-item.current {
    border-left-color: #4caf50;
    background: #f1f8e9;
}

.version-item h4 {
    color: #333;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.version-item ul {
    margin: 0;
    padding-left: 20px;
}

.version-item li {
    color: #666;
    margin: 6px 0;
    line-height: 1.5;
}

/* 系统要求内容 */
.requirement-content h4 {
    color: #333;
    margin: 0 0 12px 0;
    font-size: 18px;
}

.requirement-content ul {
    margin: 0 0 24px 0;
    padding-left: 24px;
}

.requirement-content li {
    color: #666;
    margin: 8px 0;
    line-height: 1.6;
}

/* 用户评论内容 */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.comment-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avg-rating {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b6b;
}

.comment-count {
    color: #666;
    font-size: 14px;
}

.rating-select {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 14px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.comment-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.commenter-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.commenter-name {
    font-weight: 600;
    color: #333;
}

.comment-time {
    color: #999;
    font-size: 14px;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.comment-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.page-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.page-btn.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.page-btn.prev,
.page-btn.next {
    min-width: 80px;
}

/* 相关下载推荐区域 */
.related-apps-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-app-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.related-app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #ff6b6b;
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.related-app-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-app-info {
    flex: 1;
    min-width: 0;
}

.related-app-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-app-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.related-app-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
}

.related-app-rating {
    color: #ffc107;
}

.related-app-score {
    color: #666;
}

.related-app-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.related-download-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    align-self: center;
    width: 100%;
}

.related-download-btn:hover {
    background: linear-gradient(135deg, #388e3c, #43a047);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .app-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-basic-info {
        order: -1;
    }
    
    .app-icon {
        order: -2;
    }
    
    .feature-content {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .related-apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-info-section,
    .app-screenshots-section,
    .app-intro-section,
    .related-apps-section {
        padding: 16px;
    }
    
    .app-name {
        font-size: 24px;
    }
    
    .app-meta,
    .app-stats {
        justify-content: center;
    }
    
    .intro-tabs {
        flex-direction: column;
        padding: 0;
        background: transparent;
    }
    
    .intro-tab {
        border-radius: 8px;
        margin-bottom: 4px;
        background: #f0f0f0;
    }
    
    .screenshot-nav {
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feature-content {
        grid-template-columns: 1fr;
    }
    
    .related-apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .primary-download-btn {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .app-logo {
        width: 100px;
        height: 100px;
    }
    
    .app-name {
        font-size: 20px;
    }
    
    .primary-download-btn {
        min-width: 160px;
        padding: 14px 24px;
    }
    
    .download-options {
        flex-direction: column;
        width: 100%;
    }
    
    .option-btn {
        justify-content: center;
    }
    
    .screenshot-thumb {
        width: 60px;
        height: 45px;
    }
    
    .related-apps-grid {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb {
        padding-left: 12px;
        font-size: 12px;
    }
}