/* 详情页特定样式 */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 资源头部信息 */
.resource-header {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 资源图标 */
.resource-icon-large {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.resource-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* 资源元信息 */
.resource-meta {
    flex: 1;
}

.resource-meta h1 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.resource-meta .version {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.resource-meta .author,
.resource-meta .publisher,
.resource-meta .time {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    line-height: 20px;
}

/* 作者链接和头像样式 */
.author-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    padding: 2px 0;
}

.author-link:hover {
    color: #000;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    vertical-align: middle;
}

/* 资源操作按钮 */
.resource-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.action-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

/* 确保按钮a标签悬停时文字颜色不变 */
.action-btn:hover {
    color: inherit;
}

.download-btn {
    background-color: #4CAF50;
    color: white;
}

.download-btn:hover {
    background-color: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.open-btn {
    background-color: #2196F3;
    color: white;
}

.open-btn:hover {
    background-color: #1976D2;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.view-btn {
    background-color: #FF9800;
    color: white;
}

.view-btn:hover {
    background-color: #F57C00;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

/* 点赞按钮 */
.like-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-btn:hover {
    background-color: #ffebee;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

.like-btn.liked {
    background-color: #ffebee;
    color: #f44336;
}

.like-icon {
    font-size: 20px;
}

/* 资源描述 */
.resource-description {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.resource-description h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.resource-description p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* 评论区 */
.comments-section {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.comments-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* 登录提示 */
.login-to-comment {
    text-align: center;
    padding: 40px;
    color: #999;
    background-color: #fafafa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.login-to-comment a {
    color: #2196F3;
    font-weight: 600;
    text-decoration: none;
}

.login-to-comment a:hover {
    text-decoration: underline;
}

/* 评论表单 */
.comment-form {
    margin-bottom: 30px;
}

.comment-form .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-submit-btn {
    background-color: #2196F3;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-submit-btn:hover {
    background-color: #1976D2;
}

/* 评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

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

.comment-user {
    display: flex;
    flex-direction: column;
}

.comment-user .username {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.comment-user .author-link {
    padding: 0;
}

.comment-user .author-link:hover .username {
    color: #000;
}

.comment-user .time {
    color: #999;
    font-size: 12px;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 无评论提示 */
.no-comments {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .resource-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .resource-icon-large {
        width: 120px;
        height: 120px;
    }
    
    .resource-meta h1 {
        font-size: 24px;
    }
    
    .resource-actions {
        width: 100%;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .resource-header,
    .resource-description,
    .comments-section {
        padding: 20px;
    }
    
    .resource-meta h1 {
        font-size: 20px;
    }
}