/* ========================================
   OpenClaw 网站样式表
   ======================================== */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a25;
    --secondary: #4ecdc4;
    --dark: #1a1a2e;
    --dark2: #16213e;
    --accent: #0f3460;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e9ecef;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans CJK SC', sans-serif;
    background: #f8fafc;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}

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

/* ===== HEADER ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
}

.logo-img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    margin-right: 8px;
    border-radius: 4px;
    object-fit: contain;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    height: 32px;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

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

.download-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}

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

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    background: #fff;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.mobile-nav-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,107,53,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(78,205,196,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
}

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

.hero-left {
    flex: 1;
    max-width: 580px;
}

.hero-right {
    flex-shrink: 0;
    margin-right: 40px;
}

.hero-qr {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.hero-qr img {
    max-width: 350px;
    max-height: 350px;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    padding: 8px;
    display: block;
    margin: 0 auto;
}

.hero-qr p {
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,107,53,0.15);
    border: 1px solid rgba(255,107,53,0.3);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-bottom: 36px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-btns .btn-primary,
.hero-btns .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.hero-btns .btn-primary:hover,
.hero-btns .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
}

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

.stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}
/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-title p {
    color: var(--gray);
    font-size: 16px;
}

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

.step-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-num {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

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

.step-arrow {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary);
    z-index: 1;
}

/* ===== FEATURES ===== */
.features-bg {
    background: #fff;
}

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

.feature-card {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(255,107,53,0.1);
    transform: translateY(-3px);
}

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

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
}

/* ===== WHY LOCAL ===== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.why-card {
    background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
    border-radius: var(--radius);
    padding: 32px;
    color: #fff;
    transition: transform 0.3s;
}

.why-card:hover {
    transform: translateY(-5px);
}

.why-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.why-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.why-card p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ===== USAGE ===== */
.usage-bg {
    background: #fff;
}

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

.usage-card {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.usage-card:hover {
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 4px 20px rgba(78,205,196,0.1);
    transform: translateY(-3px);
}

.usage-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.usage-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.usage-card p {
    color: var(--gray);
    font-size: 13px;
}

/* ===== CTA ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 60px 0;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 28px;
    font-size: 16px;
}

.cta-section .btn-secondary {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    font-size: 18px;
    padding: 16px 40px;
}

.cta-section .btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

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

.faq-item {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-q {
    padding: 20px 24px;
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-q::after {
    content: '+';
    font-size: 22px;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.open .faq-q::after {
    transform: rotate(45deg);
}

.faq-a {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}

.faq-item.open .faq-a {
    padding: 0 24px 20px;
    max-height: 500px;
}

/* ===== ARTICLES LIST ===== */
.articles-page-header {
    background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.articles-page-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}

.articles-page-header p {
    color: rgba(255,255,255,0.6);
}

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

.article-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.article-card-thumb {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255,255,255,0.3);
}

.article-card-body {
    padding: 24px;
}

.article-category-tag {
    display: inline-block;
    background: rgba(255,107,53,0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.article-card-body h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.5;
}

.article-card-body h2 a {
    text-decoration: none;
    color: var(--dark);
    transition: color 0.2s;
}

.article-card-body h2 a:hover {
    color: var(--primary);
}

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

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #999;
    font-size: 13px;
}

/* ===== ARTICLE DETAIL ===== */
.article-detail-header {
    background: linear-gradient(135deg, #0a0a1a, #1a1a3e);
    color: #fff;
    padding: 60px 0;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    margin: 0 8px;
    color: rgba(255,255,255,0.4);
}

.article-detail-header h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.article-meta-bar .category-tag {
    background: rgba(255,107,53,0.2);
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.article-content {
    background: #fff;
    padding: 48px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: -40px auto 60px;
    max-width: 860px;
}

.article-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin: 30px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.article-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 24px 0 12px;
}

.article-content p {
    margin-bottom: 16px;
    line-height: 2;
    color: #444;
}

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

.article-content li {
    margin-bottom: 8px;
    line-height: 1.8;
    color: #444;
}

.article-content img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
    object-fit: contain;
}

/* 相关文章 */
.related-articles {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 48px;
    margin-top: 24px;
    margin-bottom: 60px;
    box-shadow: var(--shadow);
}
.related-articles h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.related-articles ul {
    list-style: none;
}
.related-articles ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.related-articles ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.related-articles ul li a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    display: block;
}
.related-articles ul li a:hover {
    color: var(--primary);
}

.article-content a {
    color: var(--primary);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #555;
}

.article-content strong {
    color: var(--dark);
    font-weight: 700;
}

/* ===== SIDEBAR ===== */
.layout-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.sidebar-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-widget ul li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.sidebar-widget ul li a:hover {
    color: var(--primary);
}

.category-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-filter a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.category-filter a:hover, .category-filter a.active {
    background: var(--primary);
    color: #fff;
}

.category-filter a .count {
    background: rgba(255,255,255,0.2);
    padding: 1px 8px;
    border-radius: 50px;
    font-size: 12px;
}

.sidebar-download {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    text-align: center;
}

.sidebar-download h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom-color: rgba(255,255,255,0.3);
}

.sidebar-download p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.sidebar-download .btn-primary {
    width: 100%;
    justify-content: center;
    background: #fff;
    color: var(--primary);
}

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

.page-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.page-link:hover {
    background: var(--primary);
    color: #fff;
}

.page-link.active {
    background: var(--primary);
    color: #fff;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.qr-code {
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid, .usage-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .layout-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .mobile-menu { display: none; }
    .mobile-menu.show { display: block; }
    
    .hero { padding: 50px 0 70px; }
    .hero-inner { flex-direction: column; text-align: center; gap: 30px; }
    .hero-left { max-width: 100%; }
    .hero-right { margin: 0 auto; }
    .hero h1 { font-size: 30px; }
    .hero-stats { justify-content: center; gap: 24px; }
    .stat-number { font-size: 24px; }
    .hero-btns { justify-content: center; }
    .hero-qr img { max-width: 260px; max-height: 260px; width: auto; height: auto; }
    
    .steps-grid, .features-grid, .why-grid, .usage-grid, .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .step-arrow { display: none; }
    .section { padding: 50px 0; }
    .section-title h2 { font-size: 26px; }
    
    .article-content { padding: 24px; }
    .article-detail-header h1 { font-size: 24px; }
    .article-meta-bar { flex-wrap: wrap; gap: 10px; }
    
    .footer-content { grid-template-columns: 1fr; }
}
