/* ===================== 项目首页专用样式 ===================== */

/* 项目页面特定样式 */
.project-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.project-tags .tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.project-tags .tag:hover {
    background: #e5e5e5;
    color: #333;
}

.project-stats {
    color: #8590a6;
    font-size: 13px;
}

.project-stats i {
    margin-right: 4px;
}

/* 项目投票按钮样式 - 与首页保持一致 */
.action-box.upvote {
    --box-size: 46px;
    --icon-color: #4b587c;
    --hover-color: #2d3748;
    --upvote-color: #ff6154;
    --text-size: 11px;
    --icon-size: 14px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--box-size);
    height: var(--box-size);
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px;
    flex-shrink: 0;
    margin: 0;
}

.action-box.upvote i {
    color: var(--icon-color);
    font-size: calc(var(--icon-size) + 1px);
    margin-bottom: 3px;
    transition: color 0.3s ease;
    line-height: 1;
    transform: translateY(-1px);
}

.action-box.upvote span {
    color: var(--icon-color);
    font-size: var(--text-size);
    font-weight: 500;
    transition: color 0.3s ease;
    line-height: 1;
}

.action-box.upvote:hover {
    border-color: var(--upvote-color);
    background-color: #fff8f7;
}

.action-box.upvote:hover i,
.action-box.upvote:hover span {
    color: var(--upvote-color);
}

/* 已投票状态 - 使用温和的蓝色调而非突出的红色 */
.action-box.upvote.voted {
    border-color: #e3f2fd;
    background-color: #f8fbff;
    transform: scale(1);
    animation: voteStateChange 0.5s ease;
}

.action-box.upvote.voted i,
.action-box.upvote.voted span {
    color: #1976d2;
}

/* 投票状态切换动画 */
@keyframes voteStateChange {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 筛选器样式 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 16px 0;
    border-bottom: none;
}

.filter-category {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.category-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 120px;
    max-width: 160px;
}

.category-select:focus {
    border-color: #3498db;
}

/* 筛选容器样式 */
.filter-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.subcategory-row {
    background: #f8fafc;
    margin: 12px -20px 16px -20px;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.filter-label {
    font-weight: 600;
    color: #374151;
    min-width: 50px;
    font-size: 14px;
    padding-top: 6px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* 方块圆角标签样式 */
.filter-tab {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #6b7280;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    background: white;
}

.filter-tab:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f0f8ff;
}

.filter-tab.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-tab i {
    font-size: 12px;
}

/* 下拉菜单样式 */
.product-filter-dropdown {
    position: relative;
}

.product-dropdown-toggle {
    background: white;
    cursor: pointer;
}

.product-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 120px;
    display: none;
}

.product-filter-dropdown.active .product-dropdown-menu {
    display: block;
}

.product-dropdown-item {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}

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

.product-dropdown-item:hover {
    background: #f9fafb;
}

.product-dropdown-item.active {
    background: #3b82f6;
    color: white;
}

/* 当前筛选状态样式 */
.active-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-status-label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}

.active-filter {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.remove-filter {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-left: 4px;
}

.remove-filter:hover {
    color: #fecaca;
}

.clear-all-filters {
    color: #ef4444;
    text-decoration: none;
    font-size: 12px;
    margin-left: auto;
}

.clear-all-filters:hover {
    text-decoration: underline;
}

/* 项目列表区域 */
.post-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* 技术栈标签样式 */
.tech-stack-tags {
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tech-tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    border: 1px solid #ddd;
    display: inline-block;
}

.more-tech {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    display: inline-block;
}

.language-tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    display: inline-block;
}

.category-tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    display: inline-block;
}

.tag {
    background: #f5f5f5;
    color: #666;
    padding: 2px 6px;
    border-radius: 5%;
    font-size: 11px;
    font-weight: 400;
    border: 1px solid #ddd;
    display: inline-block;
}

/* 项目作者信息样式 */
.author-link {
    color: #4a5568 !important;
    font-weight: 500;
}

.author-link:hover {
    color: #3498db !important;
}

/* 热门项目列表样式 */
.hot-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.hot-project-item .rank {
    width: 20px;
    height: 20px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.hot-project-item:nth-child(1) .rank { background: #f39c12; }
.hot-project-item:nth-child(2) .rank { background: #95a5a6; }
.hot-project-item:nth-child(3) .rank { background: #e67e22; }

.hot-project-item a {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-project-item a:hover {
    color: #3498db;
}

.hot-project-item .heat-score {
    color: #8590a6;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

/* 快速筛选样式 */
.quick-filters {
    font-size: 13px;
}

.quick-filter-group {
    margin-bottom: 20px;
}

.quick-filter-group:last-child {
    margin-bottom: 0;
}

.quick-filter-group h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.quick-filter-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-filter-item {
    padding: 4px 8px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.quick-filter-item:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 空状态样式优化 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: #374151;
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 14px;
}

.create-project-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.create-project-btn:hover {
    background: #2563eb;
}

/* 投票按钮加载状态 */
.action-box.upvote.loading {
    pointer-events: none;
    opacity: 0.7;
}

.action-box.upvote.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 项目热度分级颜色 */
.heat-score-low { color: #999 !important; }
.heat-score-medium { color: #007bff !important; }
.heat-score-high { color: #fd7e14 !important; }
.heat-score-hot { color: #dc3545 !important; }

/* 投票成功动画 */
.action-box.upvote.vote-success {
    animation: voteSuccess 0.5s ease;
}

@keyframes voteSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 侧边栏项目相关样式 */
.sidebar-box .node-list .hot-project-item:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 0 -8px;
    padding: 8px;
    border-bottom: 1px solid #f5f5f5;
}

/* 流行技术网格样式调整 */
.repo-grid .repo-card[data-title*="Vue"] .repo-icon { color: #4fc08d; }
.repo-grid .repo-card[data-title*="React"] .repo-icon { color: #61dafb; }
.repo-grid .repo-card[data-title*="Node"] .repo-icon { color: #339933; }
.repo-grid .repo-card[data-title*="Python"] .repo-icon { color: #3776ab; }
.repo-grid .repo-card[data-title*="Go"] .repo-icon { color: #00add8; }

/* 工具提示样式优化 */
.repo-card:hover::before {
    white-space: pre-line;
    text-align: left;
    font-size: 11px;
    line-height: 1.4;
    max-width: 180px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 筛选区域紧凑化 */
    .filter-container {
        padding: 10px;
        margin-bottom: 16px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .filter-label {
        min-width: auto;
        padding-top: 0;
        font-size: 12px;
        font-weight: 600;
    }
    
    .filter-tabs {
        width: 100%;
    }
    
    .filter-tab {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .subcategory-row {
        margin: 8px -10px 10px -10px;
        padding: 8px 10px;
    }
    
    .active-filters {
        padding: 8px 10px;
        margin-bottom: 12px;
    }
    
    .filter-status-label {
        font-size: 11px;
    }
    
    .active-filter {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    /* 项目列表优化 */
    .list-header {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0;
        padding: 8px 0;
    }
    
    .post-tabs a {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    .filter-category {
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    .category-select {
        width: auto;
        min-width: 70px;
        max-width: 90px;
        font-size: 11px;
        padding: 4px 6px;
    }
    
    /* 移动端隐藏评论列，只显示投票 */
    .post-item .actions .action-box.comment {
        display: none !important;
    }
    
    .post-item .actions {
        min-width: auto;
        width: auto;
    }
    
    .project-description {
        font-size: 12px;
        margin: 4px 0;
    }
    
    .project-tags .tag {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .tech-tag,
    .language-tag,
    .category-tag,
    .more-tech {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .project-stats {
        font-size: 11px;
    }
    
    .hot-project-item .rank {
        width: 16px;
        height: 16px;
        font-size: 10px;
        margin-right: 8px;
    }
    
    .hot-project-item a {
        font-size: 12px;
    }
    
    .hot-project-item .heat-score {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕进一步紧凑 */
    .filter-container {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .filter-label {
        font-size: 11px;
    }
    
    .filter-tab {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .project-description {
        display: none;
    }
    
    .project-tags {
        margin-top: 6px;
    }
    
    .project-tags .tag:nth-child(n+4) {
        display: none;
    }
    
    .project-tags .tag,
    .tech-tag,
    .language-tag,
    .category-tag,
    .more-tech {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .project-stats {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px;
    }
    
    .post-meta {
        font-size: 10px;
    }
    
    .empty-state {
        padding: 30px 12px;
    }
    
    .empty-state i {
        font-size: 32px;
    }
    
    .empty-state h3 {
        font-size: 14px;
    }
    
    .empty-state p {
        font-size: 12px;
    }
}