
/* ==================== AI工具导航样式 ==================== */

/* AI工具推荐页面 */
.ai-hot-carousel {
    margin-bottom: 30px;
}

.ai-carousel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.ai-category-tabs {
    margin-bottom: 30px;
}

.ai-tab-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.ai-tab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.ai-tab-item:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.ai-tab-item.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.ai-tab-item img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.ai-tools-list {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.ai-tools-list .section-header {
    margin-bottom: 20px;
}

.ai-tools-list .section-title {
    font-size: 24px;
    color: #212529;
    font-weight: 600;
    margin-bottom: 0;
}

/* AI工具卡片 */
.ai-tool-card {
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ai-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ai-tool-card .card-image {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ai-tool-card .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.recommend-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6b6b;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.free-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #4ecdc4;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.ai-tool-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.ai-tool-card .card-title {
    font-size: 18px;
    color: #212529;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-tool-card .card-text {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.ai-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ai-tool-tag {
    padding: 4px 10px;
    background-color: #f0f2f5;
    color: #495057;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.ai-tool-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
}

.ai-tool-card .card-rating {
    color: #ffc107;
}

.ai-tool-card .card-views {
    color: #6c757d;
}

.ai-tool-card .card-favorite {
    color: #6c757d;
    transition: all 0.3s;
}

.ai-tool-card .card-favorite.favorited {
    color: #ff6b6b;
}

/* 快捷筛选标签 */
.ai-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ai-quick-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    background-color: white;
    border: 2px solid #e9ecef;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-quick-tag:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.ai-quick-tag.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.ai-quick-tag i {
    font-size: 14px;
}

/* 空状态和错误状态 */
.ai-empty-state {
    padding: 80px 20px;
    text-align: center;
}

.ai-empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.ai-empty-state h3 {
    font-size: 20px;
    color: #495057;
    margin-bottom: 10px;
}

.ai-empty-state p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.error-state {
    padding: 80px 20px;
    text-align: center;
    color: #6c757d;
}

.error-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #dc3545;
}

.error-state h3 {
    font-size: 20px;
    color: #495057;
    margin-bottom: 10px;
}

.error-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* 右侧边栏 */
.ai-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ai-ranking-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-ranking-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.ai-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-ranking-item:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
}

.ai-ranking-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.ai-ranking-rank.top-1 {
    background-color: #ffd700;
    color: white;
}

.ai-ranking-rank.top-2 {
    background-color: #c0c0c0;
    color: white;
}

.ai-ranking-rank.top-3 {
    background-color: #cd7f32;
    color: white;
}

.ai-ranking-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.ai-ranking-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-ranking-item i {
    color: #6c757d;
    font-size: 12px;
}

/* 标签云 */
.ai-tags-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-tags-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.ai-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-tag-item {
    padding: 6px 14px;
    background-color: #f0f2f5;
    color: #495057;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-tag-item:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* AI工具广场页面 */
.ai-filter-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

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

.ai-filter-label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
}

.ai-filter-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    background-color: white;
    transition: all 0.3s;
}

.ai-filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.ai-sort-buttons {
    display: flex;
    gap: 10px;
    flex: 1;
}

.ai-sort-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: white;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-sort-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.ai-sort-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.ai-result-count {
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

/* AI工具详情页面 */
.ai-detail-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.ai-detail-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.back-btn {
    margin-right: auto;
    border-radius: 8px;
    font-size: 14px;
    padding: 8px 16px;
}

.ai-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f2f5;
}

.ai-detail-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-detail-info {
    flex: 1;
}

.ai-detail-title {
    font-size: 28px;
    color: #212529;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.ai-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ai-meta-item {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-meta-item i {
    color: #007bff;
}

.ai-detail-actions {
    display: flex;
    gap: 12px;
}

.ai-detail-actions .btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
}

.ai-detail-section {
    margin-bottom: 35px;
}

.ai-detail-section h3 {
    font-size: 20px;
    color: #212529;
    font-weight: 600;
    margin-bottom: 15px;
}

.ai-detail-section p {
    font-size: 15px;
    color: #495057;
    line-height: 1.8;
}

.ai-detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-detail-category {
    padding: 8px 16px;
    background-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.ai-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-detail-tag {
    padding: 6px 12px;
    background-color: #f0f2f5;
    color: #495057;
    border-radius: 6px;
    font-size: 13px;
}

.ai-rating-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.ai-rating-average {
    font-size: 48px;
    font-weight: 700;
    color: #ffc107;
}

.ai-rating-total {
    font-size: 14px;
    color: #6c757d;
}

.ai-rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.ai-rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-rating-star {
    width: 40px;
    font-size: 14px;
    color: #495057;
}

.ai-rating-progress {
    flex: 1;
    height: 8px;
    background-color: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
}

.ai-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transition: width 0.3s;
}

.ai-rating-count {
    width: 40px;
    font-size: 14px;
    color: #6c757d;
    text-align: right;
}

.ai-user-rating {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.ai-stars-input {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.ai-star {
    font-size: 28px;
    color: #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-star:hover {
    transform: scale(1.2);
}

.ai-star.filled {
    color: #ffc107;
}

/* 相关工具 */
.ai-related-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-related-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

.ai-related-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-related-tool {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-related-tool:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
}

.ai-related-tool img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.ai-related-info {
    flex: 1;
    min-width: 0;
}

.ai-related-name {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-related-rating {
    font-size: 12px;
    color: #ffc107;
}

/* 加载动画优化 */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 骨架屏加载效果 */
.skeleton-loading {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.skeleton-image {
    width: 100%;
    padding-top: 66.67%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-body {
    padding: 15px;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 14px;
    width: 90%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-meta {
    height: 14px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 768px) {
    .skeleton-loading {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skeleton-loading {
        grid-template-columns: 1fr;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .ai-tools-list {
        grid-template-columns: 1fr;
    }
    
    .ai-carousel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-detail-container {
        grid-template-columns: 1fr;
    }
    
    .ai-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .ai-detail-meta {
        justify-content: center;
    }
    
    .ai-detail-actions {
        justify-content: center;
    }
    
    .ai-filter-row {
        flex-wrap: wrap;
    }
    
    .ai-filter-label {
        width: auto;
    }
    
    .ai-filter-select {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .ai-tab-buttons {
        gap: 8px;
    }
    
    .ai-tab-item {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .ai-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .ai-filter-label {
        width: 100%;
    }
    
    .ai-filter-select {
        width: 100%;
    }
    
    .ai-sort-buttons {
        width: 100%;
    }
    
    .ai-sort-btn {
        flex: 1;
        font-size: 13px;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ai-quick-tags {
        gap: 8px;
    }
    
    .ai-quick-tag {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .ai-detail-logo {
        width: 60px;
        height: 60px;
    }
    
    .ai-detail-title {
        font-size: 22px;
    }
    
    .ai-result-count {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr !important;
    }
    
    .ai-filter-row {
        gap: 10px;
    }
    
    .ai-sort-buttons {
        flex-wrap: wrap;
    }
    
    .ai-sort-btn {
        min-width: calc(50% - 5px);
    }
    
    .ai-quick-tags {
        gap: 6px;
    }
    
    .ai-quick-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}

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

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 0;
}
