/* ========================================
   知辰在线工具网 - 仪表盘组件样式
   ======================================== */

/* ========================================
   工具卡片
   ======================================== */
.tool-card {
    position: relative;
    background: rgba(15, 28, 63, 0.7);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 24px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(0, 198, 255, 0.3), transparent);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tool-card:hover::before {
    opacity: 1;
    animation: border-flow 3s linear infinite;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 198, 255, 0.3);
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: rotateY(180deg);
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 5px;
}

.tool-category {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-desc {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tool-tag {
    padding: 4px 12px;
    background: rgba(0, 198, 255, 0.1);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent);
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 198, 255, 0.1);
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--warning);
    font-size: 14px;
}

.tool-action {
    padding: 8px 20px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-action {
    opacity: 1;
    transform: translateY(0);
}

.tool-action:hover {
    box-shadow: 0 5px 15px rgba(0, 198, 255, 0.4);
}

.tool-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    background: var(--success);
    border-radius: 12px;
    font-size: 11px;
    color: white;
    font-weight: 600;
}

.tool-badge.free {
    background: var(--success);
}

.tool-badge.premium {
    background: var(--warning);
}

.tool-badge.new {
    background: var(--error);
}

/* ========================================
   导航树分类
   ======================================== */
.nav-category {
    margin-bottom: 10px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(0, 198, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-category-header:hover {
    background: rgba(0, 198, 255, 0.1);
}

.nav-category-header.active {
    background: rgba(0, 198, 255, 0.2);
}

.nav-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-300);
    font-size: 14px;
    font-weight: 500;
}

.nav-category-icon {
    font-size: 18px;
}

.nav-category-arrow {
    color: var(--gray-400);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-category.expanded .nav-category-arrow {
    transform: rotate(90deg);
}

.nav-category-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 30px;
}

.nav-category.expanded .nav-category-children {
    max-height: 500px;
    margin-top: 8px;
}

.nav-subcategory {
    padding: 8px 15px;
    color: var(--gray-400);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-subcategory:hover {
    background: rgba(0, 198, 255, 0.1);
    color: var(--accent);
}

.nav-subcategory.active {
    background: rgba(0, 198, 255, 0.2);
    color: var(--accent);
    font-weight: 600;
}

.nav-subcategory::before {
    content: '→';
    color: var(--gray-500);
}

/* ========================================
   热榜项
   ======================================== */
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rank-item:hover {
    background: rgba(0, 198, 255, 0.1);
}

.rank-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 198, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: white;
}

.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: white;
}

.rank-tool-info {
    flex: 1;
}

.rank-tool-name {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-tool-meta {
    font-size: 11px;
    color: var(--gray-400);
}

.rank-trend {
    font-size: 16px;
}

.rank-trend.up {
    color: var(--success);
}

.rank-trend.down {
    color: var(--error);
}

.rank-trend.same {
    color: var(--gray-400);
}

/* ========================================
   搜索建议
   ======================================== */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(0, 198, 255, 0.15);
}

.suggestion-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 198, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-name {
    font-size: 14px;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.suggestion-desc {
    font-size: 12px;
    color: var(--gray-400);
}

.suggestion-category {
    padding: 4px 10px;
    background: rgba(0, 198, 255, 0.1);
    border-radius: 10px;
    font-size: 11px;
    color: var(--accent);
}

mark {
    background: rgba(0, 198, 255, 0.3);
    color: var(--accent);
    padding: 2px 4px;
    border-radius: 4px;
}

/* ========================================
   分类页面
   ======================================== */
.category-hero {
    text-align: center;
    padding: 80px 40px 60px;
    background: rgba(15, 28, 63, 0.6);
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    backdrop-filter: blur(20px);
}

.category-icon-large {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.category-title {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 700;
}

.category-description {
    font-size: 18px;
    color: var(--gray-300);
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.category-stat {
    text-align: center;
}

.category-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.category-stat-label {
    font-size: 14px;
    color: var(--gray-400);
}

/* ========================================
   空状态
   ======================================== */
.empty-state {
    text-align: center;
    padding: 80px 40px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 24px;
    color: var(--gray-300);
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 16px;
    color: var(--gray-400);
}

/* ========================================
   加载状态
   ======================================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 198, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--gray-400);
    font-size: 14px;
}

/* ========================================
   响应式调整
   ======================================== */
@media (max-width: 768px) {
    .tool-card {
        padding: 18px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .tool-name {
        font-size: 14px;
    }
    
    .tool-desc {
        font-size: 13px;
    }
    
    .category-title {
        font-size: 32px;
    }
    
    .category-icon-large {
        font-size: 60px;
    }
}
