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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 粒子动画背景 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: #60a5fa;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #60a5fa;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #60a5fa;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页区域 */
.hero {
    padding: 15rem 0 5rem;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #60a5fa, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #60a5fa, #8b5cf6);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: #60a5fa;
    border: 2px solid #60a5fa;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 部分标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    color: #fff;
}

.view-all {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: #8b5cf6;
}

/* 分类导航 */
.categories {
    padding: 5rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(96, 165, 250, 0.3);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #8b5cf6);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
}

.category-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.category-desc {
    color: #94a3b8;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.category-count {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 工具展示 */
.tools {
    padding: 5rem 0;
    background: rgba(15, 23, 42, 0.5);
}

.tools-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(30, 41, 59, 0.7);
    border: none;
    border-radius: 50px;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active,
.tab-btn:hover {
    background: #60a5fa;
    color: white;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.7);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(96, 165, 250, 0.3);
}

.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
}

.tool-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.tool-desc {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.tool-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.tool-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-badge.free {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.tool-badge.paid {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.tool-stats {
    display: flex;
    gap: 1rem;
}

.tool-stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* 排行榜 */
.ranking {
    padding: 5rem 0;
}

.ranking-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 15px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-item:hover {
    transform: translateX(5px);
    border-color: rgba(96, 165, 250, 0.3);
}

.ranking-number {
    font-size: 2rem;
    font-weight: 700;
    color: #60a5fa;
    min-width: 40px;
}

.ranking-tool {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.tool-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.tool-info {
    flex: 1;
}

.tool-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.tool-desc {
    color: #94a3b8;
    font-size: 0.9rem;
}

.ranking-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.tool-category {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* 提交工具 */
.submit {
    padding: 5rem 0;
    background: rgba(15, 23, 42, 0.5);
}

.submit-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.7);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* 关于我们 */
.about {
    padding: 5rem 0;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 1rem;
}

/* 页脚 */
.footer {
    background: rgba(15, 23, 42, 0.95);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo h3 {
    color: #60a5fa;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-column ul li {
    margin-bottom: 0.5rem;
}

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

.footer-column ul li a:hover {
    color: #60a5fa;
}

.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.footer-social a {
    color: #94a3b8;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #60a5fa;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-copyright {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-copyright a {
    color: #60a5fa;
    text-decoration: none;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #60a5fa, #8b5cf6);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        padding: 2rem 0;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        padding: 10rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .tools-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

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

    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ranking-number {
        font-size: 1.5rem;
    }

    .ranking-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .category-name {
        font-size: 1.1rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tool-title {
        font-size: 1.1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
}