/* Gemini 3.0 优化样式 */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #fbbc05;
    --warning-color: #ea4335;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --background-light: #fafafa;
    --background-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* 基础重置和通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--background-light);
    scroll-behavior: smooth;
}

/* 头部导航 */
.header {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
    background: rgba(66, 133, 244, 0.1);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* 文章卡片 */
.article-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-header {
    margin-bottom: 25px;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.3;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.category-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 面包屑导航 */
.breadcrumb {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.9rem;
    padding: 15px 0;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 内容排版 */
.article-content {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

/* 文章标题和段落样式 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
    clear: both;
}

.article-content h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.article-content h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 50px;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    position: relative;
}

.article-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 4px solid var(--primary-color);
}

.article-content h4 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 35px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 段落样式 */
.article-content p {
    margin-bottom: 25px;
    line-height: 1.8;
    text-align: justify;
    font-size: 1.05rem;
    color: var(--text-primary);
}

/* 列表样式 */
.article-content ul,
.article-content ol {
    margin: 30px 0;
    padding-left: 40px;
}

.article-content li {
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1.05rem;
}

.article-content ul li {
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

.article-content ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.article-content ol li {
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* 链接样式 */
.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    position: relative;
}

.article-content a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* 强调文本 */
.article-content strong,
.article-content b {
    color: var(--text-primary);
    font-weight: 600;
}

/* 引用样式 */
.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 25px;
    margin: 30px 0;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
    color: var(--text-secondary);
}

/* 分隔线 */
.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 40px 0;
}

/* 表格样式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-content th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.article-content tr:hover {
    background: #f8f9fa;
}

/* 特殊内容区块 */
.article-content .highlight-text {
    background: linear-gradient(135deg, #fff3cd, #f8f9fa);
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--accent-color);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
    position: relative;
}

.article-content .highlight-text::before {
    content: "💡";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 5px;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* 清理特殊字符 */
.article-content p:first-child {
    margin-top: 0;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* 图片和媒体 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

/* 代码块 */
.code-block {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-block::before {
    content: "Code";
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

/* API 信息框 */
.api-info-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 40px 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.api-info-box h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.api-info-box p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

.api-key-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

/* 警告框 */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.warning-box::before {
    content: "⚠️ 注意";
    font-weight: 600;
    color: var(--warning-color);
    display: block;
    margin-bottom: 10px;
}

/* 提示框 */
.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.info-box::before {
    content: "💡 提示";
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

/* 表格样式 */
.features-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.features-table th,
.features-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.features-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.features-table tr:hover {
    background: #f8f9fa;
}

.features-table tr:last-child td {
    border-bottom: none;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-warning {
    background: var(--accent-color);
    color: var(--text-primary);
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* CTA 框 */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 40px 0;
    box-shadow: var(--shadow-lg);
}

.cta-box h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--background-white);
    color: var(--text-secondary);
    margin-top: 60px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .article-content {
        padding: 30px 20px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-content h1 {
        font-size: 2rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }

    .nav {
        display: none;
    }

    .features-table {
        font-size: 0.9rem;
    }

    .features-table th,
    .features-table td {
        padding: 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .cta-box {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }

    .article-card {
        padding: 20px;
    }

    .article-content {
        padding: 25px 15px;
    }

    .container,
    .container-narrow {
        padding: 0 15px;
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 可访问性增强 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* 打印样式 */
@media print {
    .header,
    .nav,
    .footer,
    .cta-box,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .article-card,
    .article-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}