
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 面包屑导航 */
.breadcrumb {
    margin-top: 85px;
    padding: 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #6b5ce7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #ff7f50;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #999;
}

/* 项目详情区域 */
.project-detail {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* 代码展示区域 */
.code-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.code-header {
    background: #306998;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.code-title .python-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.code-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.code-wrapper {
    position: relative;
    padding: 0;
    background: #272822;
    color: #f8f8f2;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
    max-height: 790px;
    min-height: 790px;
    overflow-y: auto;
}

.code-wrapper pre {
    margin: 0;
    padding: 20px;
}

.code-wrapper code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.code-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.code-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #555;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.action-btn:hover {
    color: #306998;
}

.action-icon {
    margin-right: 6px;
}

.download-btn {
    background: #4cd964;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #40bf55;
    transform: translateY(-2px);
}

.download-icon {
    margin-right: 8px;
}

/* 项目信息侧边栏 */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: #fff;
    padding: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-bottom: 10px;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #6b5ce7, #ff7f50);
    border-radius: 3px;
}

.card-content {
    padding: 15px;
}

.author-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;

    border: 2px solid rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.author-avatar:hover {
    border-color: #ffde59;
    transform: scale(1.05);
}


.author-details {
    flex-grow: 1;
}

.author-name {
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
}

.author-age {
    color: #666;
    font-size: 0.9rem;
}

.follow-btn {
    background: #6b5ce7;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.follow-btn:hover {
    background: #5a4cce;
    transform: translateY(-2px);
}

.project-meta-list {
    list-style: none;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.meta-label {
    color: #666;
    display: flex;
    align-items: center;
}

.meta-icon {
    margin-right: 8px;
    color: #306998;
}

.meta-value {
    font-weight: 500;
    color: #333;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #f0f3f8;
    color: #306998;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e8ecf5;
    transform: translateY(-2px);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.action-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.primary-btn {
    background: #306998;
    color: white;
}

.primary-btn:hover {
    background: #265d86;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background: #f0f3f8;
    color: #306998;
}

.secondary-btn:hover {
    background: #e8ecf5;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.button-icon {
    margin-right: 8px;
}

/* 项目描述区域 */
.project-description-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.description-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.description-title {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.description-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #6b5ce7, #ff7f50);
    border-radius: 3px;
}

.description-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

.description-content {
    padding: 20px;
}

.description-text {
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.description-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.description-image {
    border-radius: 8px;
    overflow: hidden;
    height: 0;
    padding-top: 65%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.description-image:hover {
    transform: scale(1.02);
}

.description-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 教程和指导 */
.guides-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 20px;
}

.guides-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.guides-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #6b5ce7, #ff7f50);
    border-radius: 3px;
}

.guides-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.guide-card {
    min-width: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.guide-image {
    height: 150px;
    overflow: hidden;
}

.guide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.guide-card:hover .guide-image img {
    transform: scale(1.05);
}

.guide-content {
    padding: 15px;
}

.guide-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1rem;
}

.guide-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.85rem;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* 评论区域 */
.comments-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.comments-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-title {
    font-size: 1.3rem;
    color: #333;
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: 10px;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #6b5ce7, #ff7f50);
    border-radius: 3px;
}

.comments-count {
    margin-left: 10px;
    background: #f0f3f8;
    color: #306998;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.comment-sort {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.sort-icon {
    margin-right: 5px;
}

.comment-input-container {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.comment-input {
    display: flex;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-form {
    flex-grow: 1;
}

.comment-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    font-size: 1rem;
    resize: none;
    min-height: 80px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #306998;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
}

.comment-submit {
    background: #306998;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-submit:hover {
    background: #265d86;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.comments-list {
    padding: 0 20px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.commenter-info {
    display: flex;
    align-items: center;
}

.commenter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.commenter-name {
    font-weight: 600;
    color: #333;
}

.commenter-name a{
    color:#333;
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-text {
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
    padding:18px;
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-action {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.comment-action:hover {
    color: #306998;
}

.action-icon {
    margin-right: 5px;
}

/* 相关项目 */
.related-projects {
    margin-bottom: 40px;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #6b5ce7, #ff7f50);
    border-radius: 3px;
}

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

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-image {
    height: 0;
    padding-top: 65%;
    position: relative;
    overflow: hidden;
}

.related-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(48, 105, 152, 0.9);
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 1;
}

.related-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.related-content {
    padding: 15px;
}

.related-project-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 1rem;
}

.related-author {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* 页脚 */
footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-logo span {
    color: #ffde59;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #ffde59;
    color: #333;
    transform: translateY(-3px);
}

.copyright {
    margin-top: 20px;
    color: #999;
    font-size: 0.9rem;
}

/* 代码区编辑器按钮 */
.code-actions {
    margin-top: 5px;
}

.editor-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 3px;
    color: #ccc;
    font-size: 0.8rem;
    padding: 3px 8px;
    margin-right: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .project-detail {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-left .nav-links {
        display: none;
    }
    
    .nav-right {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .mobile-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #306998;
        padding: 20px;
        transition: 0.5s ease-in-out;
        display: flex;
        flex-direction: column;
        z-index: 999;
    }
    
    .mobile-nav.active {
        left: 0;
    }
    
    .mobile-nav .nav-links {
        flex-direction: column;
        align-items: center;
        margin-bottom: 20px;
    }
    
    .mobile-nav .nav-links li {
        margin: 15px 0;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .description-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .breadcrumb {
        margin-top: 70px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .description-images {
        grid-template-columns: 1fr;
    }
    
    .guide-card {
        min-width: 200px;
    }
}
