/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.top-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo img {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mobile-nav {
    display: none;
}

.nav-item {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 8px 16px;
    width: 200px;
}

.search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: var(--primary-hover);
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, #f5f3ff 0%, #e0f2fe 50%, #f5f3ff 100%);
    padding: 48px 24px;
    text-align: center;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Hero搜索框 */
.hero-search {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.hero-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hero-search-box:focus-within {
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.hero-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.hero-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    padding: 8px 0;
}

.hero-search-box input::placeholder {
    color: var(--text-muted);
}

.hero-search-btn {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Hero菜单 */
.hero-menu {
    margin-top: 48px;
    padding-bottom: 32px;
}

.hero-menu-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 24px;
}

.hero-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 100px;
}

.hero-menu-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 1);
}

.hero-menu-image {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.hero-menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-menu-label {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    font-weight: 500;
}

.hero-menu-item:hover .hero-menu-label {
    color: var(--primary-color);
}

/* 菜单索引 */
.menu-index {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.menu-index::-webkit-scrollbar {
    height: 4px;
}

.menu-index::-webkit-scrollbar-track {
    background: transparent;
}

.menu-index::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 2px;
}

.menu-index-container {
    display: flex;
    gap: 32px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.menu-item:hover {
    transform: translateY(-2px);
}

.menu-item:hover .menu-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.menu-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
}

.menu-label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
}

.menu-item:hover .menu-label {
    color: var(--primary-color);
}

/* 工具容器 */
.tools-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

/* 工具分类 */
.tool-category {
    margin-bottom: 48px;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.category-header::before,
.category-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0 50%, #e2e8f0);
}

.category-header::after {
    background: linear-gradient(to left, transparent, #e2e8f0 50%, #e2e8f0);
}

.category-header-content {
    display: flex;
    align-items: center;
    padding: 0 24px;
    white-space: nowrap;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.category-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.category-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.category-icon.pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.category-icon.green {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.category-icon.yellow {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.category-icon.orange {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 工具网格 - 4列布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 工具卡片 - 横向排列（左图右文） */
.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

/* 不同颜色的图标背景 */
.tool-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.tool-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.tool-icon.pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.tool-icon.green {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.tool-icon.yellow {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.tool-icon.orange {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.tool-icon.red {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.tool-icon.cyan {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

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

.tool-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tool-price-tag {
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 4px 12px;
    line-height: 1.4;
    white-space: nowrap;
}

.tool-price-tag--free {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.tool-price-tag--pending {
    color: var(--text-muted);
    background: #f8fafc;
    border-color: var(--border-color);
    font-weight: 500;
}

.tool-action-btn {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 999px;
    padding: 6px 16px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.tool-card:hover .tool-action-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* 底部Footer */
.main-footer {
    background: #1e293b;
    color: white;
    padding: 48px 24px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
}

.footer-brand {
    min-width: 300px;
    flex-shrink: 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
}

.brand-en {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 1px;
}

.brand-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
}

.social-link svg {
    width: 16px;
    height: 16px;
    color: white;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex: 1;
    justify-content: flex-end;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.contact-list li {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-list li svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: #64748b;
}

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

    .main-nav {
        display: none;
    }
}

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

    .footer-container {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        justify-content: flex-start;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 8px 16px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        border-top: 1px solid var(--border-color);
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav .nav-item {
        flex-shrink: 0;
        font-size: 13px;
    }

    .search-box {
        display: none;
    }

    .hero-title {
        font-size: 24px;
    }

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

    .tools-container {
        padding: 20px 16px;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
}

/* 左侧悬浮快捷导航 */
.side-nav {
    position: fixed;
    left: calc((100% - 1200px) / 2 - 180px);
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 12px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    min-width: 160px;
}

.side-nav.visible {
    opacity: 1;
    visibility: visible;
}

.side-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.side-nav-item:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.side-nav-item:hover .side-nav-icon svg {
    color: var(--primary-color);
}

.side-nav-item.active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.side-nav-item.active .side-nav-icon svg {
    color: white;
}

.side-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-nav-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.side-nav-label {
    font-weight: 500;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.back-to-top:hover svg {
    color: white;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 响应式：小屏幕隐藏侧边导航 */
@media (max-width: 1400px) {
    .side-nav {
        display: none;
    }
}
