/* ============================================================
   RuleMaker 官网 — 全局样式表
   品牌: Rounded Tech 浅色主题
   继承自 APP Color.kt / Shape.kt / Type.kt
   ============================================================ */

/* ---- 字体声明 ---- */
@font-face {
    font-family: 'ZCOOL GD High';
    src: url('../fonts/zcool_gdh.ttf') format('truetype');
    font-display: swap;
}

/* Alibaba PuHuiTi — 使用系统字体替代 */
@font-face {
    font-family: 'Alibaba PuHuiTi';
    src: local('PingFang SC'), local('Microsoft YaHei'), local('Noto Sans SC');
    font-display: swap;
}

/* ---- CSS 变量：品牌色体系 ---- */
:root {
    color-scheme: light;
    /* 主色 — 科技蓝 */
    --color-primary: #35B8FF;
    --color-primary-dark: #1E8ED0;
    --color-primary-light: #7DD4FF;

    /* 辅色 — 创造绿 */
    --color-secondary: #30D957;
    --color-secondary-dark: #20B040;

    /* 强调色 — 活力橙 */
    --color-accent: #FF7A00;
    --color-accent-dark: #CC6200;

    /* 表面色 */
    --bg-page: #F4F5F7;
    --bg-card: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-hover: #E8EAED;
    --border: #DEE2E8;
    --border-light: #EEF0F4;

    /* 文字色 */
    --text-primary: #1A1D23;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-on-primary: #FFFFFF;
    --text-on-accent: #FFFFFF;

    /* 状态色 */
    --color-success: #30D957;
    --color-error: #EF4444;
    --color-warning: #F59E0B;

    /* 圆角体系 — Rounded Tech */
    --radius-sm: 14px;
    --radius-md: 16px;
    --radius-lg: 20px;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

    /* 字体 */
    --font-brand: 'ZCOOL GD High', 'Alibaba PuHuiTi', system-ui, sans-serif;
    --font-body: 'Alibaba PuHuiTi', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Source Code Pro', monospace;

    /* 布局 */
    --max-width: 1200px;
    --header-height: 72px;
}

/* ---- 全局重置 ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height); /* 为 fixed header 留出空间 */
}

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

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

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

/* ---- 排版体系 ---- */
.display-large {
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
}

.headline-medium {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
}

.title-large {
    font-size: 20px;
    font-weight: 600;
}

.title-medium {
    font-size: 16px;
    font-weight: 500;
}

.body-large {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.body-medium {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.label-large {
    font-size: 14px;
    font-weight: 500;
}

/* ---- RuleMaker 品牌名专用字体 ---- */
.brand-text {
    font-family: var(--font-brand);
    letter-spacing: 0.02em;
}

/* ---- 容器 ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- 按钮 ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: var(--color-accent-dark);
    color: var(--text-on-accent);
    box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
}

.btn-secondary {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

.btn-secondary:hover {
    background: var(--color-primary-dark);
    color: var(--text-on-primary);
    box-shadow: 0 4px 16px rgba(53, 184, 255, 0.35);
}

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

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--text-on-primary);
}

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

.btn-ghost:hover {
    background: var(--bg-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 17px;
}

/* ---- 导航栏 ---- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo img {
    height: 38px;
    width: auto;
}

/* Header logo: 左侧LOGO + 右侧双行"Rule"/"Maker"布局 */
.header-logo .brand-text {
    position: relative;
    width: auto;
    min-width: 100px;
    height: 38px;
    font-family: var(--font-brand);
    letter-spacing: 0.02em;
}

.header-logo .brand-line-top {
    position: absolute;
    top: -6px;
    left: 0;
    font-size: 27px;
    color: var(--text-primary);
    line-height: 1;
}

.header-logo .brand-line-bottom {
    position: absolute;
    bottom: -3px;
    left: 0;
    font-size: 27px;
    color: var(--text-primary);
    line-height: 1;
}


.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--color-primary);
    background: rgba(53, 184, 255, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .btn {
    padding: 8px 20px;
    font-size: 14px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ---- 页脚 ---- */
.footer {
    margin-top: auto;
    background: var(--text-primary);
    color: var(--bg-card);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand .brand-text {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
}

.footer-brand p {
    color: #9CA3AF;
    font-size: 14px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #E5E7EB;
}

.footer-col a {
    display: block;
    color: #9CA3AF;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6B7280;
}

.footer-bottom a {
    color: #9CA3AF;
}

/* ---- 卡片 ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 32px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card-image {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
}

/* ---- Hero 区域 ---- */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #F4F5F7 0%, #E8F4FD 50%, #F0FDF4 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 48px;
    margin-bottom: 8px;
}

.hero-content h1 .brand-text {
    color: var(--color-primary);
}

.hero-content .subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ---- 特性卡片 ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.feature-icon .icon {
    width: 48px !important;
    height: 48px !important;
    stroke-width: 1.8 !important;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.feature-icon.blue {
    background: rgba(53, 184, 255, 0.12);
}

.feature-icon.green {
    background: rgba(48, 217, 87, 0.12);
}

.feature-icon.orange {
    background: rgba(255, 122, 0, 0.12);
}

/* ---- 产品展示卡 ---- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.product-card {
    padding: 32px;
}

.product-card .card-image {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    background: #FAFBFC;
}

.product-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card .specs {
    list-style: none;
    margin-bottom: 20px;
}

.product-card .specs li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
}

.product-card .specs li:last-child {
    border-bottom: none;
}

.product-card .actions {
    display: flex;
    gap: 12px;
}

/* ---- 探索 RuleMaker 4宫格 ---- */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.explore-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 48px 32px;
    text-decoration: none;
    transition: box-shadow 0.3s, transform 0.3s;
    gap: 8px;
}

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

.explore-card .explore-icon {
    font-size: 56px;
    margin-bottom: 8px;
}

.explore-card .explore-icon .icon {
    width: 80px !important;
    height: 80px !important;
    stroke-width: 1.2 !important;
}

.explore-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.explore-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.explore-card .explore-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 4px;
}

@media (max-width: 600px) {
    .explore-grid { grid-template-columns: 1fr; }
    .explore-card { padding: 32px 24px; }
}

/* ---- 表单 ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(53, 184, 255, 0.15);
}

.form-input.error {
    border-color: var(--color-error);
}

.form-error {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 4px;
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ---- 登录/注册页面 ---- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
    background: var(--bg-page);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-header img {
    width: 56px;
    margin: 0 auto 16px;
}

.auth-card .auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-card .auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 500;
}

/* ---- 后台管理 ---- */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    padding: 24px 0;
    flex-shrink: 0;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.admin-sidebar .nav-item:hover {
    background: rgba(53, 184, 255, 0.06);
    color: var(--color-primary);
}

.admin-sidebar .nav-item.active {
    background: rgba(53, 184, 255, 0.10);
    color: var(--color-primary);
    border-right: 3px solid var(--color-primary);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    background: var(--bg-page);
    min-height: calc(100vh - var(--header-height));
}

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

.admin-header h1 {
    font-size: 24px;
    font-weight: 600;
}

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

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

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

/* 图片管理网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.image-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-item .info {
    padding: 12px;
}

.image-item .info p {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
}

.image-item .info .actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 2000;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
    max-width: 400px;
}

.toast.success {
    background: var(--color-success);
    color: white;
}

.toast.error {
    background: var(--color-error);
    color: white;
}

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

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.faq-question {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-page);
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

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

.faq-search {
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.faq-search input:focus {
    border-color: var(--color-primary);
}

.faq-search::before {
    content: '🔍';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

/* ---- 3D Gallery 页 ---- */
.gallery-hero {
    background: linear-gradient(135deg, rgba(53, 184, 255, 0.08), rgba(48, 217, 87, 0.08));
    padding: 80px 0;
    text-align: center;
}

.generator-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border-light);
}

.generator-form {
    max-width: 600px;
    margin: 0 auto 24px;
}

.three-preview {
    width: 100%;
    height: 400px;
    background: #FAFBFC;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    overflow: hidden;
    position: relative;
}

.upload-zone {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background: rgba(53, 184, 255, 0.04);
}

.upload-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(53, 184, 255, 0.08);
}

/* ---- 文档页 ---- */
.doc-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 32px);
    align-self: start;
}

.doc-content {
    flex: 1;
    max-width: 800px;
}

.doc-layout {
    display: flex;
    gap: 40px;
    padding: 100px 0 60px;
}

.doc-nav {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
}

.doc-nav h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.doc-nav a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s;
}

.doc-nav a:hover,
.doc-nav a.active {
    background: rgba(53, 184, 255, 0.08);
    color: var(--color-primary);
}

.doc-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.doc-content h2:first-child {
    margin-top: 0;
}

.doc-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.doc-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.doc-content ul, .doc-content ol {
    margin: 12px 0 20px 24px;
    color: var(--text-secondary);
}

.doc-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.doc-content th, .doc-content td {
    padding: 10px 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.doc-content th {
    background: var(--bg-page);
    font-weight: 600;
}

/* ---- 进度条（加载动画） ---- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- 轮播图 (Carousel) ---- */
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 8 / 3;
    overflow: hidden;
    background: var(--bg-page);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide .slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 轮播导航点 */
.carousel-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(26, 29, 35, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: var(--color-primary-light);
}

/* 轮播箭头 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    /* 轮播图 — 平板 */

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .carousel-arrow.prev { left: 10px; }
    .carousel-arrow.next { right: 10px; }

    .header-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .header-nav.open {
        display: flex;
    }

    .header-nav a {
        width: 100%;
        padding: 12px 16px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .menu-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 30px;
        line-height: 38px;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 48px 0;
    }

    .hero {
        padding: 100px 0 48px;
    }

    .doc-layout {
        flex-direction: column;
    }

    .doc-sidebar {
        width: 100%;
        position: static;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px;
    }

    .admin-table {
        font-size: 13px;
    }

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

@media (max-width: 480px) {
    /* 轮播图 — 手机 */
    .carousel-dots {
        bottom: 16px;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 26px;
    }

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

/* ── 状态标签（徽标） ── */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}
.badge-warn { color: var(--color-warning, #d97706); background: rgba(217,119,6,0.08); }
.badge-err { color: var(--color-error, #dc2626); background: rgba(220,38,38,0.08); }
.badge-mute { color: var(--text-muted, #6b7280); background: rgba(107,114,128,0.08); }
.badge-ok { color: var(--color-success, #16a34a); background: rgba(22,163,74,0.08); }

/* ── Lucide 图标样式 ── */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    stroke-width: 1.5;
    color: inherit;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-inline { margin-right: 4px; }

/* hero 横幅后的首个内容模块：间距收窄（hero 自身 padding-bottom 已调小） */
.studio-hero + .section, .academy-hero + .section, .community-hero + .section, .products-hero + .section {
    padding-top: 24px;
}
