/* OpenClaw 中文版网站样式 */

/* ===== Variables ===== */
:root {
    --primary: #ff6b35;
    --primary-dark: #e55a28;
    --secondary: #4a90d9;
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --gray: #666;
    --gray-light: #999;
    --gray-bg: #f5f7fa;
    --white: #fff;
    --border: #e5e7eb;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ===== Base ===== */
* {
    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', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    min-height: 100vh;
}

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

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
}

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

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.section-more {
    color: var(--primary);
    font-weight: 500;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo:hover {
    color: var(--dark);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--gray);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
}

.btn-nav:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    padding: 80px 0 100px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-title .fire {
    display: inline-block;
    animation: fire-pulse 1s ease-in-out infinite alternate;
}

@keyframes fire-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.hero-desc {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.badge {
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-disabled {
    background: var(--gray-light);
    color: var(--white);
    cursor: not-allowed;
}

/* ===== Steps ===== */
.steps {
    background: var(--gray-bg);
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.step-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    width: 220px;
    box-shadow: var(--shadow);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-card h3 {
    margin-bottom: 8px;
}

.step-card p {
    color: var(--gray);
    font-size: 0.875rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary);
}

.steps-note {
    text-align: center;
    margin-top: 40px;
    color: var(--gray);
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== Why Local ===== */
.why-local {
    background: var(--gray-bg);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.why-item {
    display: flex;
    gap: 16px;
}

.why-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.why-item h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.why-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

.why-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.diagram-left h4,
.diagram-right h4 {
    margin-bottom: 16px;
}

.diagram-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.diagram-items span {
    background: var(--gray-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
}

.diagram-arrow {
    font-size: 3rem;
    color: var(--primary);
}

.diagram-right {
    text-align: center;
}

.diagram-right p {
    color: var(--primary);
    font-weight: 600;
}

/* ===== Use Cases ===== */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.use-case-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.use-case-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.use-case-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.use-case-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.use-case-card p {
    color: var(--gray);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ===== Download ===== */
.download {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
}

.download .section-title {
    color: var(--white);
}

.download-content {
    text-align: center;
}

.download-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.download-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: var(--radius);
    width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-card.disabled {
    opacity: 0.6;
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.download-card h3 {
    margin-bottom: 8px;
}

.download-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.download-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: var(--radius);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.download-note ol {
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.download-note li {
    margin-bottom: 8px;
}

/* ===== Articles ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.article-cover {
    height: 180px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-cover img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

.article-summary {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-light);
}

/* ===== Latest Articles ===== */
.latest-articles {
    background: var(--gray-bg);
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.faq-question {
    padding: 20px 24px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--gray);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin-bottom: 12px;
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.page-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Articles Page ===== */
.articles-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.articles-sidebar {
    flex-shrink: 0;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--gray);
    transition: var(--transition);
}

.category-list a:hover,
.category-list a.active {
    background: var(--gray-bg);
    color: var(--primary);
}

.category-list .count {
    background: var(--gray-bg);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--gray-bg);
    color: var(--gray);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: var(--transition);
}

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

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gray);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.page-ellipsis {
    color: var(--gray-light);
}

/* ===== Article Page ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

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

.article-breadcrumb {
    font-size: 0.875rem;
    color: var(--gray-light);
    margin-bottom: 16px;
}

.article-breadcrumb a {
    color: var(--gray);
}

.article-breadcrumb .current {
    color: var(--gray-light);
}

.article-category-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-meta-full {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--gray-light);
}

.article-cover-full {
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-summary-full {
    background: var(--gray-bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
    color: var(--gray);
    border-left: 4px solid var(--primary);
}

.article-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333;
}

.article-body h2,
.article-body h3 {
    margin-top: 32px;
    margin-bottom: 16px;
}

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

.article-body h3 {
    font-size: 1.25rem;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    font-weight: 600;
}

.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.article-share {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-btn {
    background: var(--gray-bg);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

.article-sidebar .sticky {
    position: sticky;
    top: 90px;
}

.related-list {
    list-style: none;
}

.related-item {
    margin-bottom: 12px;
}

.related-item a {
    display: block;
    padding: 12px;
    background: var(--gray-bg);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.related-item a:hover {
    background: var(--primary);
    color: var(--white);
}

.related-item h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.related-date {
    font-size: 0.75rem;
    opacity: 0.7;
}

.no-related {
    color: var(--gray-light);
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--gray-light);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    font-size: 1.5rem;
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .features-grid,
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        order: -1;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        padding: 16px 20px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        flex-direction: column;
        gap: 12px;
        min-width: 180px;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .steps-grid {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .features-grid,
    .use-cases-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .why-diagram {
        flex-direction: column;
        text-align: center;
    }
    
    .download-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .download-card {
        width: 100%;
        max-width: 300px;
    }
    
    .articles-layout {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.feature-card,
.use-case-card {
    animation: fadeIn 0.5s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
