/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1890ff;
    --primary-hover: #096dd9;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #e8e8e8;
    --bg-color: #ffffff;
    --bg-gray: #f8f8f8;
    --hover-bg: #f0f0f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    scroll-behavior: smooth;
}

/* 滚动动画效果 */
@media (prefers-reduced-motion: no-preference) {
    body {
        animation: fadeIn 0.6s ease-in;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - 400px);
}

/* 导航栏样式 */
.navbar {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    padding: 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-container .navbar-left {
    padding-left: 0;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: 0;
    margin-right: auto;
    padding-left: 0;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 0;
    padding-left: 0;
    margin-left: 0;
}

/* 确保logo始终靠最左侧 */
.logo img {
    display: block;
}

.logo img {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.navbar-right {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    background-color: var(--bg-color);
    border-radius: 20px;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13px;
    width: 200px;
    color: var(--text-color);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* Hero 区域 */
.hero-section {
    padding: 0;
    position: relative;
    background-color: var(--bg-gray);
    overflow: hidden;
}

/* 公告条 */
.announcement-section {
    background-color: #fff8e6;
    border-bottom: 1px solid #ffe58f;
}

.announcement-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
    font-size: 13px;
    color: #d48806;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .announcement-content {
        padding: 8px 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .announcement-content {
        padding: 6px 10px;
        font-size: 11px;
    }
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.indicator {
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--primary-color);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 15%;
    transform: translateY(-50%);
    max-width: 600px;
    z-index: 10;
}

.hero-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: left;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    text-align: left;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 通用区域样式 */
.section-title {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color);
}

/* 特性区域 */
.features-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 30px;
    text-align: center;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.feature-card:hover {
    border-color: var(--primary-color);
}

.feature-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* API服务区域 */
.api-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.api-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    justify-content: center;
}

.api-tab {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.api-tab.active {
    color: var(--primary-color);
}

.api-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.api-content-wrapper {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.api-content-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.api-content-item.active {
    opacity: 1;
    transform: translateX(0);
}

.api-content-item.slide-out-left {
    transform: translateX(-100px);
}

.api-content-item.slide-in-right {
    transform: translateX(100px);
}

.api-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.api-item {
    display: flex;
    align-items: center;
    padding: 24px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.api-item:hover {
    border-color: var(--primary-color);
}

.api-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    margin-right: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.api-content {
    flex: 1;
}

.api-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.api-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 数据统计区域 */
.stats-section {
    padding: 80px 0;
    background-color: var(--primary-color);
}

.stats-section .section-title {
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* 快速开始区域 */
.quickstart-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.quickstart-diagram {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.quickstart-diagram svg {
    max-width: 100%;
    height: auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.step-item {
    padding: 30px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 合作伙伴区域 */
.partners-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.partners-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.partner-item {
    padding: 20px 40px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    flex: 1;
    text-align: center;
    min-width: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo {
    width: 120px;
    height: 50px;
    object-fit: contain;
}

.partner-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-to-top:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 脚页样式 */
.footer {
    background-color: var(--bg-gray);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.footer-left {
    max-width: 400px;
}

.footer-logo img {
    height: 36px;
    width: auto;
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links-info {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 12px;
}

.beian-link,
.footer-copyright-text,
.legal-link {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.beian-link:hover,
.footer-copyright-text:hover,
.legal-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.beian-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.separator {
    color: var(--text-light);
    margin: 0 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-left {
        gap: 20px;
        margin-left: 0;
    }

    .nav-links {
        gap: 15px;
    }

    .search-box input {
        width: 120px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        top: 30%;
        transform: none;
    }

    .hero-title {
        font-size: 32px;
        text-align: left;
    }

    .hero-subtitle {
        font-size: 14px;
        text-align: left;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .api-list {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .partners-list {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links-info {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .navbar-left {
        margin-left: 0;
        padding-left: 0;
    }

    .hero-slider {
        height: 400px;
    }

    .hero-content {
        left: 15px;
        right: 15px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .feature-card {
        padding: 20px;
    }

    .api-tab {
        padding: 12px 20px;
        font-size: 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-links-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .separator {
        display: none;
    }
}
