/* 现代风格头部导航 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e5e7eb;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    position: relative;
}

.header-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 1.4rem;
}

.header-logo-icon {
    width: 42px;
    height: 42px;
    background: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    border: 1px solid #2563eb;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: #3b82f6;
    background: #f8fafc;
    border-color: #e5e7eb;
}

.nav-link.active {
    color: #3b82f6;
    background: #eff6ff;
    border-color: #bfdbfe;
}

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

.header-search {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 14px;
    transition: all 0.25s ease;
}

.search-form:focus-within {
    background: white;
    border-color: #3b82f6;
}

.search-icon {
    color: #9ca3af;
    font-size: 1.1rem;
}

.search-input {
    border: none;
    background: transparent;
    padding: 10px 10px;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
    color: #2d3748;
}

.search-input::placeholder {
    color: #9ca3af;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-ghost {
    background: transparent;
    color: #4a5568;
    border-color: #e5e7eb;
}

.btn-ghost:hover {
    background: #f8fafc;
    color: #3b82f6;
    border-color: #d1d5db;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #2563eb;
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #4a5568;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    z-index: 999;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #eff6ff;
    color: #3b82f6;
    border-color: #bfdbfe;
}

.mobile-search {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

@media (max-width: 992px) {
    .header-nav {
        display: none;
    }

    .header-search {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .header-right {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
    }

    .mobile-menu {
        display: block;
    }

    .mobile-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-overlay.active {
        pointer-events: auto;
    }
}

/* 主内容区域 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Hero区域 */
.hero-section {
    text-align: center;
    padding: 40px 16px 50px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
    position: relative;
}

.hero-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
    position: relative;
}

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

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3b82f6;
}

.stat-label {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.category-tab:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-tab.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

/* API卡片网格 */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.api-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
}

.api-card:hover {
    border-color: #3b82f6;
}

.api-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.api-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #3b82f6;
}

.api-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

.api-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.vip-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.vip-badge.free {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.vip-badge.paid {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.api-desc {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.api-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.api-stats {
    display: flex;
    gap: 12px;
}

.api-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.api-stat i {
    font-size: 0.9rem;
}

.api-btn {
    padding: 6px 14px;
    background: #f8fafc;
    color: #3b82f6;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid #e5e7eb;
}

.api-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

/* 底部 */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 16px 20px;
    margin-top: 40px;
    border-top: 1px solid #334155;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
}

.footer-section h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 1rem;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    max-width: 1400px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        padding: 16px 12px;
    }

    .hero-section {
        padding: 24px 12px 32px;
        border-radius: 8px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .hero-stats {
        gap: 20px;
        margin-top: 16px;
    }

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

    .stat-label {
        font-size: 0.75rem;
    }

    .category-tabs {
        gap: 6px;
        margin-bottom: 16px;
    }

    .category-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .api-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .api-card {
        padding: 12px;
        border-radius: 8px;
    }

    .api-card-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .api-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .api-title {
        font-size: 0.95rem;
    }

    .api-desc {
        font-size: 0.8rem;
    }

    .api-card-footer {
        margin-top: 10px;
        padding-top: 10px;
    }

    .api-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
    }

    .site-footer {
        padding: 24px 12px 16px;
        margin-top: 24px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .footer-section h4 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .footer-section a {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .footer-bottom {
        margin-top: 16px;
        padding-top: 16px;
        font-size: 0.75rem;
    }
}

/* 加载动画 */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 10px;
}
