/* 小智AI智能体使用说明书：沿用设备管理说明书的阅读结构，补充统一入口、智能体卡片与对话示例样式 */

.xiaozhi-manual-body {
    background: #f7f9fc;
}

.xiaozhi-manual-body .manual-main section {
    max-width: 1180px;
}

.xiaozhi-manual-body .manual-main h2 {
    scroll-margin-top: 20px;
}

.xiaozhi-manual-body .manual-main h3,
.xiaozhi-manual-body .manual-main h4 {
    scroll-margin-top: 20px;
}

.xiaozhi-manual-body .manual-cover {
    background:
        radial-gradient(circle at 84% 18%, rgba(92, 175, 255, 0.42), transparent 28%),
        radial-gradient(circle at 72% 90%, rgba(105, 72, 220, 0.42), transparent 34%),
        linear-gradient(130deg, #06162f 0%, #0d2d61 52%, #15539e 100%);
}

.xiaozhi-manual-body .cover-eyebrow {
    color: #a9d4ff;
}

.xiaozhi-manual-body .cover-eyebrow span {
    background: #73c2ff;
}

.xiaozhi-manual-body .manual-info-bar {
    max-width: 1100px;
    margin-bottom: 0;
    line-height: 1.75;
}

.overview-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-grid.four .overview-card {
    min-height: 178px;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}

.quick-fact {
    padding: 18px 20px;
    border: 1px solid #dfe7f3;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(31, 57, 102, 0.04);
}

.quick-fact strong {
    display: block;
    margin-bottom: 4px;
    color: #315fb5;
    font-size: 26px;
    line-height: 1.1;
}

.quick-fact span {
    color: #5b6474;
    font-size: 13px;
    line-height: 1.6;
}

.xiaozhi-flow {
    grid-template-columns: repeat(9, auto);
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 30px;
}

.agent-card {
    position: relative;
    padding: 20px 20px 18px;
    overflow: hidden;
    border: 1px solid #e0e7f2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(31, 57, 102, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(31, 57, 102, 0.1);
}

.agent-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f0f5ff;
    pointer-events: none;
}

.agent-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.agent-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #2f65c8, #5b8fe8);
    box-shadow: 0 6px 14px rgba(47, 101, 200, 0.22);
}

.agent-icon.green {
    background: linear-gradient(135deg, #2c8a61, #57b98b);
    box-shadow: 0 6px 14px rgba(44, 138, 97, 0.2);
}

.agent-icon.purple {
    background: linear-gradient(135deg, #6545b8, #8f72dc);
    box-shadow: 0 6px 14px rgba(101, 69, 184, 0.2);
}

.agent-icon.orange {
    background: linear-gradient(135deg, #b06b1f, #dfa24f);
    box-shadow: 0 6px 14px rgba(176, 107, 31, 0.2);
}

.agent-icon.red {
    background: linear-gradient(135deg, #a53c3c, #d66b6b);
    box-shadow: 0 6px 14px rgba(165, 60, 60, 0.2);
}

.agent-icon.cyan {
    background: linear-gradient(135deg, #1f7f9e, #4db3cf);
    box-shadow: 0 6px 14px rgba(31, 127, 158, 0.2);
}

.agent-head h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 3px;
    font-size: 18px;
    color: #254b9c;
}

.agent-head p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #6b7688;
    font-size: 12px;
    line-height: 1.6;
}

.agent-card > p {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: #4b5565;
    font-size: 14px;
    line-height: 1.7;
}

.agent-card ul {
    position: relative;
    z-index: 1;
    margin: 4px 0 0 18px;
    color: #374151;
    font-size: 13px;
    line-height: 1.75;
}

.agent-card li {
    margin: 2px 0;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}

.status-tag.ready {
    color: #126b4b;
    background: #ddf7ec;
}

.status-tag.permission {
    color: #8c4a00;
    background: #fff0d4;
}

.status-tag.data {
    color: #315fb5;
    background: #e5eefc;
}

.status-tag.limit {
    color: #a63232;
    background: #fde8e8;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 16px;
}

.command-pill {
    display: block;
    padding: 9px 11px;
    border: 1px solid #dce5f3;
    border-radius: 7px;
    color: #173f7b;
    background: #f7faff;
    font-size: 13px;
    line-height: 1.6;
}

.command-pill::before {
    content: "“";
    color: #7b97bd;
}

.command-pill::after {
    content: "”";
    color: #7b97bd;
}

.chat-mock {
    max-width: 760px;
    margin: 18px 0 24px;
    overflow: hidden;
    border: 1px solid #dce5f3;
    border-radius: 12px;
    background: #f7faff;
    box-shadow: 0 8px 24px rgba(31, 57, 102, 0.06);
}

.chat-mock-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #dceaff;
    background: linear-gradient(110deg, #0d2d61, #164b94);
    font-size: 12px;
    font-weight: 600;
}

.chat-mock-head span:last-child {
    color: #a9c9ff;
    font-weight: 400;
}

.chat-mock-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.chat-bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    color: #273246;
    background: #fff;
    border: 1px solid #e1e7ef;
    font-size: 14px;
    line-height: 1.7;
}

.chat-bubble .meta {
    display: block;
    margin-bottom: 3px;
    color: #7b8798;
    font-size: 11px;
    font-weight: 700;
}

.chat-bubble.user {
    align-self: flex-end;
    color: #fff;
    background: #4070d8;
    border-color: #4070d8;
    border-bottom-right-radius: 4px;
}

.chat-bubble.user .meta {
    color: rgba(255, 255, 255, 0.72);
}

.chat-bubble.agent {
    align-self: flex-start;
    background: #f8fffc;
    border-color: #d8ece5;
    border-bottom-left-radius: 4px;
}

.agent-section {
    margin: 26px 0;
    padding-top: 4px;
}

.agent-section .agent-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #254b9c;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.agent-section .agent-kicker i {
    color: #5b8fe8;
    font-size: 20px;
}

.agent-section .section-note {
    margin: 6px 0 12px;
    padding: 10px 13px;
    border-left: 3px solid #ffc107;
    border-radius: 0 6px 6px 0;
    color: #6b5a35;
    background: #fff8e1;
    font-size: 13px;
    line-height: 1.7;
}

.agent-section .manual-table {
    margin-top: 10px;
}

.agent-section .manual-table th {
    white-space: nowrap;
}

.figure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 16px 0 24px;
}

.figure-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-grid.three .manual-figure:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    margin: 0;
}

.figure-grid .manual-figure {
    margin: 0;
}

.figure-grid .manual-figure img {
    width: 100%;
    max-height: none;
}

.figure-grid .manual-figure figcaption {
    text-align: left;
}

.figure-grid .manual-figure:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 62%;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .figure-grid,
    .figure-grid.three {
        grid-template-columns: 1fr;
    }

    .figure-grid .manual-figure:last-child:nth-child(odd) {
        max-width: 100%;
    }
}

.tip-inline {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    color: #315fb5;
    background: #eaf2ff;
    font-size: 12px;
    font-weight: 600;
}

.muted {
    color: #758196;
    font-size: 13px;
    line-height: 1.7;
}

.xiaozhi-manual-body .faq-list details {
    border-radius: 0;
}

.xiaozhi-manual-body .support-card {
    margin-bottom: 20px;
}

@media (max-width: 1180px) {
    .overview-grid.four,
    .quick-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xiaozhi-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .agent-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .overview-grid.four,
    .quick-facts {
        grid-template-columns: 1fr;
    }

    .agent-card {
        padding: 16px;
    }

    .chat-mock {
        max-width: 100%;
    }

    .command-grid {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .xiaozhi-manual-body .manual-cover {
        padding: 26px 18px 24px;
    }

    .xiaozhi-manual-body .manual-cover h1 {
        font-size: 26px;
        line-height: 1.22;
    }

    .xiaozhi-manual-body .cover-subtitle {
        font-size: 14px;
        line-height: 1.7;
    }

    .xiaozhi-manual-body .cover-eyebrow {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .xiaozhi-manual-body .cover-meta span {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media print {
    .xiaozhi-manual-body .manual-info-bar {
        display: none;
    }

    .overview-grid.four,
    .quick-facts,
    .agent-grid,
    .command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
