/* 首页样式 - 全新现代化设计 */

/* ==================== CSS变量 ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #0f172a;
    --text-light: #475569;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ==================== 导航栏 ==================== */
.navbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.625rem 1.25rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.btn-install {
    background: var(--gradient-primary);
    color: var(--white);
    margin-left: 0.5rem;
}

.nav-item.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: var(--white);
}

/* ==================== 主视觉区域 ==================== */
.hero-modern {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
    background: var(--bg-alt);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.05;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
}

.badge-text {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-code {
    animation: fadeInUp 0.8s ease 0.8s both;
}

.code-block {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--gray-light);
}

.code-prompt {
    color: var(--gray);
    font-weight: 600;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--text);
}

.code-copy {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.code-copy:hover {
    background: var(--gray-lighter);
    color: var(--primary);
}

.hero-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bg);
    clip-path: polygon(0 50%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 0;
}

/* ==================== 核心特性 ==================== */
.features-modern {
    padding: 6rem 0;
    background: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    padding: 2.5rem;
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0;
}

/* ==================== 集成环境 ==================== */
.integrations-modern {
    padding: 6rem 0;
    background: var(--bg-alt);
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.integration-item {
    padding: 2.5rem;
    background: var(--white);
    border-radius: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.integration-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
    border-color: var(--primary-light);
}

.integration-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gray-lighter);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.integration-item:hover .integration-icon {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.1);
}

.integration-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.integration-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* ==================== 架构说明 ==================== */
.architecture-modern {
    padding: 6rem 0;
    background: var(--bg);
}

.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.architecture-card {
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.architecture-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-header {
    padding: 2rem;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 2rem;
}

.card-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-features li {
    padding: 0.75rem 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-features li i {
    color: var(--success);
    font-size: 0.875rem;
}

/* ==================== 快速开始 ==================== */
.quickstart-modern {
    padding: 6rem 0;
    background: var(--gradient-hero);
    color: var(--white);
}

.quickstart-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.quickstart-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.quickstart-description {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.7;
}

.quickstart-code {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.code-header {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.code-copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.code-content {
    padding: 1.5rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--white);
    overflow-x: auto;
}

.btn-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-link:hover {
    gap: 1rem;
    opacity: 0.9;
}

/* 页脚样式已移至 common.css */

/* ==================== 动画 ==================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .features-grid,
    .integrations-grid,
    .architecture-grid {
        grid-template-columns: 1fr;
    }
    
    .quickstart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
    }
}
