/* ============================================
   矩阵云官网样式
   科技蓝主题，支持夜间模式
   ============================================ */

:root {
    /* 科技蓝配色 - 日间模式 */
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #0050b3;
    --primary-light: #e6f7ff;
    
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    
    --border-color: #d9d9d9;
    --border-light: #f0f0f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    
    --success-color: #52c41a;
    --error-color: #ff4d4f;
    --warning-color: #faad14;
    --info-color: #1890ff;
    
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 夜间模式 */
[data-theme="dark"] {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --primary-active: #0050b3;
    --primary-light: #111b26;
    
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    
    --border-color: #30363d;
    --border-light: #21262d;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    --success-color: #3fcf7f;
    --error-color: #ff6b6b;
    --warning-color: #ffa940;
    --info-color: #1890ff;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 移动端优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero区域 */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-color) 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-outline:active {
    transform: translateY(0);
    background: var(--primary-color);
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.card-header {
    background: var(--border-light);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.card-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.card-content {
    padding: 2rem;
}

.feature-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
}

.preview-icon {
    font-size: 1.5rem;
}

/* 功能特性 */
.features {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 支持平台 */
.platforms {
    padding: 80px 0;
    background: var(--bg-color);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.platform-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.platform-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.platform-features {
    list-style: none;
    text-align: left;
}

.platform-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* 技术架构 */
.tech {
    padding: 80px 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tech-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
}

.tech-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

/* 下载安装 */
.download {
    padding: 80px 0;
    background: var(--bg-color);
}

.download-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.download-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.step-content code {
    background: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.download-notes {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    height: fit-content;
}

.download-notes h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.download-notes ul {
    list-style: none;
}

.download-notes li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.download-notes li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 使用文档 */
.docs {
    padding: 80px 0;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.doc-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.doc-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.doc-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.doc-link:hover {
    color: var(--primary-hover);
}

/* 联系我们 */
.contact {
    padding: 80px 0;
    background: var(--bg-color);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    align-items: center;
}

.contact-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* 导航栏移动端优化 */
    .navbar .container {
        padding: 0.75rem 16px;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }

    .brand-subtitle {
        font-size: 0.75rem;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: calc(100vh - 60px);
        background: var(--card-bg);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        width: 100%;
        font-size: 1rem;
    }

    .nav-link.active::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .theme-toggle {
        margin-right: 0.5rem;
    }

    /* Hero区域移动端优化 */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-card {
        max-width: 100%;
    }

    .card-content {
        padding: 1.5rem;
    }

    .preview-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .preview-icon {
        font-size: 1.25rem;
    }

    /* 功能特性移动端优化 */
    .features {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .features-grid,
    .platforms-grid,
    .tech-grid,
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card,
    .platform-card,
    .tech-item,
    .doc-card {
        padding: 1.5rem;
    }

    .feature-icon,
    .platform-icon,
    .doc-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .feature-title,
    .platform-name,
    .doc-title {
        font-size: 1.125rem;
    }

    .feature-description,
    .doc-description {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    /* 支持平台移动端优化 */
    .platforms {
        padding: 60px 0;
    }

    .platform-features {
        font-size: 0.9375rem;
    }

    /* 技术架构移动端优化 */
    .tech {
        padding: 60px 0;
    }

    .tech-stack {
        gap: 0.5rem;
    }

    .tech-tag {
        font-size: 0.8125rem;
        padding: 0.4rem 0.8rem;
    }

    /* 下载安装移动端优化 */
    .download {
        padding: 60px 0;
    }

    .download-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .download-steps {
        gap: 1.5rem;
    }

    .step-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .step-content h3 {
        font-size: 1.125rem;
    }

    .step-content p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .step-content code {
        font-size: 0.8125rem;
        word-break: break-all;
        display: inline-block;
        max-width: 100%;
    }

    .download-notes {
        padding: 1.5rem;
    }

    .download-notes h3 {
        font-size: 1.125rem;
    }

    .download-notes li {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    /* 使用文档移动端优化 */
    .docs {
        padding: 60px 0;
    }

    /* 联系我们移动端优化 */
    .contact {
        padding: 60px 0;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .contact-icon {
        font-size: 2.5rem;
    }

    .contact-details h3 {
        font-size: 1.125rem;
    }

    .contact-details p {
        font-size: 0.9375rem;
    }

    /* 页脚移动端优化 */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 1.125rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.9375rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.875rem;
    }
}

/* 小屏幕手机优化 (最大宽度 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .navbar .container {
        padding: 0.625rem 12px;
    }

    .nav-brand h1 {
        font-size: 1.125rem;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9375rem;
    }

    .features,
    .platforms,
    .tech,
    .download,
    .docs,
    .contact {
        padding: 40px 0;
    }

    .feature-card,
    .platform-card,
    .tech-item,
    .doc-card,
    .step-item,
    .download-notes,
    .contact-item {
        padding: 1.25rem;
    }

    .feature-icon,
    .platform-icon,
    .doc-icon {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .doc-link,
    .footer-section a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .feature-card:hover,
    .platform-card:hover,
    .doc-card:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-outline:hover {
        transform: none;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

