/**
 * Goodtools 行业工具导航页面 V3 样式表
 * @since 3.0.0
 */

/* 页面整体样式 */
.industry-v2-container {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    min-height: 100vh;
}

/* 头部区域 */
.industry-header-v2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0;
    padding: 40px 60px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.industry-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.industry-title-section h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.industry-title-section h1 i {
    font-size: 2rem;
    opacity: 0.9;
}

.industry-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.industry-stats {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

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

.btn-v2 {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-v2-primary {
    background: white;
    color: #667eea;
}

.btn-v2-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-v2-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-v2-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* 回到顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.back-to-top-btn:active {
    transform: translateY(-2px);
}

/* 大类卡片 */
.category-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.category-header h2 {
    font-size: 1.8rem;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-header h2 i {
    color: #667eea;
}

.category-description {
    color: #666;
    font-size: 0.95rem;
    margin-left: auto;
}

/* 小类卡片 */
.sub-category-section {
    margin-bottom: 25px;
}

.sub-category-title {
    font-size: 1.3rem;
    color: #444;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-category-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #667eea;
    border-radius: 2px;
}

.sub-category-title .tool-count {
    background: #e3f2fd;
    color: #2196F3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: auto;
}

/* 工具网格 */
.tools-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tool-card-v2 {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.tool-card-v2:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.tool-icon-v2 {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tool-icon-v2 img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.tool-info h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 2px;
    font-weight: 600;
}

.tool-info .tool-url {
    font-size: 0.8rem;
    color: #888;
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.tool-actions {
    display: flex;
    gap: 8px;
}

.tool-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.tool-action-btn.vote {
    background: #fff0f0;
    color: #e74c3c;
}

.tool-action-btn.vote:hover {
    background: #e74c3c;
    color: white;
}

.tool-action-btn.favorite {
    background: #fff8e1;
    color: #f39c12;
}

.tool-action-btn.favorite:hover {
    background: #f39c12;
    color: white;
}

.tool-action-btn.detail {
    background: #e3f2fd;
    color: #2196F3;
    margin-left: auto;
}

.tool-action-btn.detail:hover {
    background: #2196F3;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .industry-header-v2 {
        padding: 24px 20px;
    }

    .industry-title-section h1 {
        font-size: 1.8rem;
    }

    .industry-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-description {
        margin-left: 0;
    }

    .tools-grid-v2 {
        grid-template-columns: 1fr;
    }

    .industry-header-content {
        flex-direction: column;
    }

    .industry-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .main-layout {
        padding: 0 20px;
    }
}

/* 返回按钮 */
.back-link {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.back-link:active {
    transform: translateY(-2px);
}

/* 快速导航锚点 */
.quick-nav {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

.quick-nav.collapsed {
    width: 60px;
    padding: 15px 10px;
}

.quick-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quick-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.quick-nav.collapsed .quick-nav-title {
    display: none;
}

.toggle-nav-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-nav-btn:hover {
    background: #764ba2;
    transform: rotate(180deg);
}

.quick-nav-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.quick-nav.collapsed .quick-nav-items {
    gap: 5px;
}

.quick-nav-item {
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    white-space: nowrap;
}

.quick-nav.collapsed .quick-nav-item {
    padding: 10px;
    justify-content: center;
}

.quick-nav-item:hover {
    background: #f0f2f5;
    color: #667eea;
}

.quick-nav-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.quick-nav-item span {
    flex: 1;
}

.quick-nav.collapsed .quick-nav-item span {
    display: none;
}

/* 小类下拉菜单 */
.quick-nav-item {
    position: relative;
}

.sub-category-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.quick-nav-item:hover .sub-category-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-category-menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-category-menu-item:hover {
    background: #f0f2f5;
    color: #667eea;
}

.sub-category-menu-item i {
    font-size: 0.8rem;
    color: #999;
}

.sub-category-menu-item .count {
    background: #e3f2fd;
    color: #2196F3;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: auto;
}

/* 折叠状态下不显示下拉菜单 */
.quick-nav.collapsed .sub-category-menu {
    display: none;
}

/* 侧边栏布局 */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 0 60px;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .quick-nav {
        position: static;
        margin-bottom: 20px;
    }

    .quick-nav.collapsed {
        width: auto;
        padding: 20px;
    }

    .quick-nav.collapsed .quick-nav-title {
        display: block;
    }

    .quick-nav.collapsed .quick-nav-item span {
        display: inline;
    }

    .quick-nav-items {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .toggle-nav-btn {
        display: none;
    }
}
