/* 全局变量 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --radius: 8px;
    --radius-lg: 12px;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-dark: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

/* 头部导航样式 */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.toggle-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    position: relative;
    transition: var(--transition);
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--text-color);
    transition: var(--transition);
}

.toggle-icon::before {
    top: -8px;
}

.toggle-icon::after {
    top: 8px;
}

/* 移动端导航展开状态 */
.nav.active {
    display: flex;
}

.mobile-nav-toggle.active .toggle-icon {
    background-color: transparent;
}

.mobile-nav-toggle.active .toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-nav-toggle.active .toggle-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* 主要内容区域样式 */
.main {
    margin-top: 80px;
}

/* 应用详情区域 */
.app-detail {
    background: var(--gradient-primary);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 30px;
}

.app-icon img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background-color: white;
    padding: 20px;
}

.app-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.app-category {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.app-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 800px;
}

.app-website {
    display: inline-block;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.app-website:hover {
    border-bottom-color: white;
}

/* 通用区域样式 */
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 功能特点区域 */
.features {
    padding: 60px 0;
    background-color: var(--light-color);
    margin-bottom: 60px;
}

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

.feature-item {
    background-color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    background-color: var(--light-color);
    padding: 15px;
    border-radius: 50%;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* 相关模板区域 */
.templates {
    padding: 60px 0;
    margin-bottom: 60px;
}

.templates-empty {
    text-align: center;
    color: var(--text-light);
    padding: 60px 0;
    font-size: 18px;
}

/* 帮助文档区域 */
.help-docs {
    padding: 60px 0;
    background-color: var(--light-color);
    margin-bottom: 60px;
}

.help-doc-item {
    background-color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: var(--transition);
}

.help-doc-item:hover {
    box-shadow: var(--shadow-lg);
}

.help-doc-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.help-doc-preview {
    color: var(--text-light);
    line-height: 1.6;
}

/* API触发条件区域 */
.api-triggers {
    padding: 60px 0;
    margin-bottom: 60px;
}

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

.trigger-item {
    background-color: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.trigger-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.trigger-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.trigger-description {
    color: var(--text-light);
    font-size: 14px;
}

/* 相关应用推荐区域 */
.related-apps {
    padding: 60px 0;
    background-color: var(--light-color);
    margin-bottom: 60px;
}

.related-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-app-item {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.related-app-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-app-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.related-app-info {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.related-app-icon img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: var(--light-color);
    padding: 10px;
}

.related-app-details h6 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.related-app-details p {
    font-size: 14px;
    color: var(--text-light);
}

/* 下载地址区域 */
.download-section {
    padding: 60px 0;
    margin-bottom: 60px;
    text-align: center;
}

.download-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.download-app {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.download-app:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.download-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background-color: var(--light-color);
    padding: 20px;
}

.download-app-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.download-version {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.download-button {
    display: inline-block;
    background: var(--gradient-dark);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* 页脚区域 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
}

.footer-column-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

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

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

.footer-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
}

.footer-contact-info {
    display: flex;
    gap: 30px;
}

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

.contact-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    border-radius: var(--radius);
}

.contact-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* 移动端样式 */
@media (max-width: 768px) {
    /* 头部导航 */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 20px;
        z-index: 999;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        margin-left: 0;
        margin-bottom: 20px;
    }

    .nav-item:last-child {
        margin-bottom: 0;
    }

    .nav-link {
        display: block;
        padding: 10px 0;
        font-size: 18px;
    }

    .mobile-nav-toggle {
        display: block;
    }

    /* 应用详情区域 */
    .app-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .app-info h1 {
        font-size: 28px;
    }

    .app-description {
        font-size: 16px;
    }

    /* 下载地址区域 */
    .download-app {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    /* 页脚区域 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .footer-contact-info {
        flex-direction: column;
        gap: 20px;
    }

    /* 功能特点和相关应用 */
    .features-grid,
    .related-apps-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* 小屏移动端样式 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .app-detail,
    .features,
    .templates,
    .help-docs,
    .api-triggers,
    .related-apps,
    .download-section {
        padding: 40px 0;
    }

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

    .feature-item,
    .help-doc-item,
    .trigger-item,
    .related-app-item {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 禁止滚动 */
.no-scroll {
    overflow: hidden;
}