/**
 * AI 生图与生视频开放平台 - 统一设计系统样式 (Unified Design System)
 * 风格：现代科技、简洁、明快、高对比度与易读性
 */

:root {
    --bg-main: #090d16;
    --bg-elevated: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-input: rgba(15, 23, 42, 0.95);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(56, 189, 248, 0.5);
    
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-title: #f8fafc;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #7dd3fc;
}

/* 布局容器 */
.ai-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 统一顶部导航条 */
.ai-nav {
    background: rgba(9, 13, 22, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ai-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.ai-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-title);
    text-decoration: none;
}

.ai-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
    box-shadow: 0 0 16px var(--primary-glow);
}

.ai-logo-text span {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-menu-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.ai-menu-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    text-decoration: none;
}

.ai-menu-item:hover, .ai-menu-item.active {
    color: var(--text-title);
}

.ai-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* 通用按钮 */
.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1.2;
}

.ai-btn-primary {
    background: linear-gradient(90deg, #0284c7, #6366f1);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.ai-btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
    color: #fff;
}

.ai-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-title);
}

.ai-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-active);
    color: var(--primary-light);
}

.ai-btn-success {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.ai-btn-success:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    color: #fff;
}

.ai-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.ai-btn-lg {
    padding: 14px 30px;
    font-size: 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* 卡片容器 */
.ai-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 26px;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ai-card:hover {
    border-color: var(--border-active);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 徽章 Badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.ai-badge-primary {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.ai-badge-accent {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.ai-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 脉冲圆点 */
.ai-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 页面区段 Header */
.ai-section {
    padding: 60px 0;
}

.ai-section-head {
    text-align: center;
    margin-bottom: 44px;
}

.ai-section-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 12px;
}

.ai-section-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
}

/* 网格系统 */
.ai-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.ai-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ai-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Hero 首页横幅 */
.ai-hero-wrap {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    overflow: hidden;
}

.ai-hero-bg-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 450px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.1) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

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

.ai-hero-title {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.25;
    color: var(--text-title);
    margin: 20px 0 16px;
}

.ai-hero-title-grad {
    background: linear-gradient(135deg, #38bdf8 20%, #818cf8 60%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-hero-desc {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 34px;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.ai-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

/* 核心特性与数据统计条 */
.ai-stat-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px 30px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ai-stat-box {
    text-align: center;
    border-right: 1px solid var(--border-subtle);
}

.ai-stat-box:last-child {
    border-right: none;
}

.ai-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1.1;
    margin-bottom: 4px;
}

.ai-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* 视觉化比例选择网格 */
.ai-ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.ai-ratio-card {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-ratio-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.ai-ratio-card.active {
    border-color: var(--primary-light);
    background: rgba(2, 132, 199, 0.18);
    box-shadow: 0 0 16px var(--primary-glow);
}

.ai-ratio-preview {
    margin: 0 auto 8px;
    background: #334155;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-ratio-card.active .ai-ratio-preview {
    background: #0284c7;
    border-color: #38bdf8;
}

.ai-ratio-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-title);
}

.ai-ratio-res {
    font-size: 11px;
    color: var(--text-dim);
}

/* 表单输入控件 */
.ai-form-group {
    margin-bottom: 20px;
}

.ai-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ai-input, .ai-select, .ai-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-title);
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.ai-input:focus, .ai-select:focus, .ai-textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ai-textarea {
    resize: vertical;
    min-height: 100px;
}

/* 代码与文档块 */
.ai-code-wrapper {
    background: #060910;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 14px 0;
}

.ai-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 16px;
}

.ai-code-tabs {
    display: flex;
    gap: 8px;
}

.ai-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-tab-btn:hover {
    color: var(--text-muted);
}

.ai-tab-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-light);
}

.ai-copy-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-copy-btn:hover {
    color: var(--text-title);
    border-color: var(--border-active);
}

.ai-code-content {
    padding: 16px;
    font-family: "Fira Code", Consolas, Monaco, monospace;
    font-size: 13px;
    color: #7dd3fc;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

/* 表格组件 */
.ai-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.ai-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.ai-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-body);
}

.ai-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* 统一页脚 */
.ai-footer {
    border-top: 1px solid var(--border-subtle);
    background: #060910;
    padding: 46px 0 24px;
    margin-top: 70px;
    color: var(--text-dim);
    font-size: 13px;
}

.ai-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .ai-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-stat-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-stat-box:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .ai-menu-links {
        display: none;
    }
    .ai-grid-2, .ai-grid-3, .ai-grid-4 {
        grid-template-columns: 1fr;
    }
    .ai-hero-title {
        font-size: 32px;
    }
    .ai-ratio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ai-stat-bar {
        grid-template-columns: 1fr;
    }
    .ai-stat-box {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 12px;
    }
    .ai-stat-box:last-child {
        border-bottom: none;
    }
}
