/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

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

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px - 300px);
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2d3436;
}

.category-card p {
    color: #636e72;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.popular-sites {
    margin-bottom: 60px;
}

.popular-sites h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #2d3436;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.site-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.site-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.site-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.site-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #2d3436;
}

.site-info p {
    color: #636e72;
    font-size: 0.9rem;
}

.visit-btn {
    margin-left: auto;
    background: #00b894;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.visit-btn:hover {
    background: #00a085;
    transform: scale(1.05);
}

/* 工具页面样式 */
.page-header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tool-category {
    margin-bottom: 60px;
}

.tool-category h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #2d3436;
    border-left: 5px solid #e84393;
    padding-left: 20px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.tool-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.tool-item img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.tool-info {
    flex: 1;
}

.tool-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #2d3436;
}

.tool-info p {
    color: #636e72;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

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

.tag {
    background: #f1f2f6;
    color: #57606f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 通栏页脚样式 */
.footer {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: white;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 60px 0 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ddd;
}

.footer-section p {
    line-height: 1.8;
    color: #bbb;
    margin-bottom: 20px;
}

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

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

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding: 20px 0;
    text-align: center;
    color: #999;
}

.footer-bottom a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: white;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
        gap: 0;
    }

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

    .nav-item {
        margin: 15px 0;
    }

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

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

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

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

    .tool-item {
        flex-direction: column;
        text-align: center;
    }

    .tool-item img {
        margin-bottom: 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .category-card {
        padding: 30px 20px;
    }

    .site-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .visit-btn {
        margin-left: 0;
    }
}