/* 项目详情页面专用样式 */

/* 全局变量 */
:root {
    --primary-color: #2d5a27;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 容器和布局 */
.project-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 面包屑导航优化 */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--primary-color);
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* 主要内容区域 */
.project-detail-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
}

/* 项目图片区域 */
.project-image-detail {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.project-image-detail img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

.project-image-detail:hover img {
    transform: scale(1.02);
}

.project-badge-detail {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.project-badge-detail .badge {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 项目标题和元信息 */
.project-header {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
}

.project-title-detail {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.project-meta-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--secondary-color);
}

.meta-item a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.meta-item a:hover {
    color: var(--primary-color);
}

/* 项目统计 */
.project-stats-detail {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.stat-item-detail {
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: var(--transition);
}

.stat-item-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* 内容区域 */
.project-content-section {
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--success-color);
}

/* 项目描述 */
.description-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-color);
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* 项目特性 */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature-item i {
    font-size: 1.2rem;
}

/* 技术栈 */
.technologies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.technologies-list .badge {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a7c59 100%);
    color: white;
    border: none;
    transition: var(--transition);
}

.technologies-list .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

/* 项目截图 */
.screenshot-thumb {
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--box-shadow);
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.screenshot-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

/* 更新日志 */
.changelog-content {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--info-color);
    font-size: 1rem;
    line-height: 1.7;
}

/* 侧边栏购买卡片 */
.purchase-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 2rem;
}

/* 价格区域 */
.price-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a7c59 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.price-section::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 10px solid #4a7c59;
}

.current-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.original-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.discount-badge {
    margin-top: 1rem;
}

.discount-badge .badge {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 20px;
}

/* 购买操作区域 */
.purchase-actions {
    padding: 2rem;
}

.purchase-actions .btn {
    border-radius: 25px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
}

.purchase-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a7c59 100%);
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.purchase-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.4);
}

.purchase-actions .btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #34ce57 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.purchase-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.purchase-actions .alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

/* 项目信息 */
.project-info {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--dark-color);
}

.info-value {
    color: var(--secondary-color);
    font-weight: 500;
}

/* 作者信息 */
.author-info {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.author-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.author-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: var(--transition);
}

.author-avatar:hover {
    transform: scale(1.05);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.author-stats {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 相关项目 */
.related-projects {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.related-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.related-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.related-image:hover {
    transform: scale(1.05);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
}

.related-name a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.related-price {
    font-weight: 600;
    color: var(--success-color);
    margin-top: 0.25rem;
}

/* 评价区域 */
.reviews-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.reviews-header .btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

/* 评分统计 */
.rating-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.rating-stars {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.rating-count {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.rating-breakdown {
    padding-left: 2rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.rating-label {
    min-width: 60px;
    font-weight: 500;
    color: var(--dark-color);
}

.progress {
    flex: 1;
    height: 12px;
    border-radius: 6px;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ffdb4d 100%);
    border-radius: 6px;
    transition: var(--transition);
}

.rating-count {
    min-width: 40px;
    text-align: right;
    font-weight: 500;
    color: var(--secondary-color);
}

/* 评价列表 */
.review-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: var(--transition);
}

.reviewer-avatar:hover {
    transform: scale(1.05);
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.review-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.review-rating {
    font-size: 1.2rem;
}

.review-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-color);
}

/* 无评价状态 */
.no-reviews {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--border-radius);
}

.no-reviews i {
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .project-detail-container {
        padding: 1.5rem 1rem;
    }
    
    .project-title-detail {
        font-size: 2rem;
    }
    
    .current-price {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .project-detail-container {
        padding: 1rem 0.5rem;
    }
    
    .project-header {
        padding: 1.5rem;
    }
    
    .project-title-detail {
        font-size: 1.8rem;
    }
    
    .project-meta-detail {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-stats-detail .row {
        gap: 1rem;
    }
    
    .stat-item-detail {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .purchase-card {
        position: static;
        margin-top: 2rem;
    }
    
    .price-section {
        padding: 1.5rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .purchase-actions {
        padding: 1.5rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .rating-breakdown {
        padding-left: 0;
        margin-top: 2rem;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .review-item {
        padding: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .project-image-detail img {
        height: 250px;
    }
    
    .project-title-detail {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .rating-number {
        font-size: 3rem;
    }
    
    .rating-stars {
        font-size: 1.2rem;
    }
    
    .author-card {
        padding: 1rem;
    }
    
    .related-item {
        padding: 0.75rem;
    }
    
    .reviews-section {
        padding: 1.5rem;
    }
    
    .rating-summary {
        padding: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-detail-card,
.purchase-card,
.reviews-section {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}