/* ==============================
   一、基础设置
============================== */

:root {
    --primary: #3869d4;
    --primary-dark: #2854b7;
    --primary-light: #edf3ff;
    --text: #202d42;
    --text-light: #66758c;
    --background: #f7f9fd;
    --border: #e7ecf4;
    --white: #ffffff;
    --shadow: 0 12px 35px rgba(39, 65, 110, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}


/* ==============================
   二、导航栏
============================== */

.navbar {
    height: 76px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #edf0f6;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #477ce7, #315cc3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: 700;
    box-shadow: 0 5px 13px rgba(56, 105, 212, 0.2);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.brand-text strong {
    font-size: 17px;
}

.brand-text small {
    font-size: 11px;
    color: #8995a8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    color: #58677d;
    font-size: 14px;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-button {
    border: none;
    background: var(--primary-light);
    color: var(--primary);
    padding: 10px 19px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.nav-button:hover {
    background: #dfe9ff;
}

.nav-button span {
    margin-left: 8px;
}


/* ==============================
   三、首页首屏
============================== */

.hero {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    background:
            radial-gradient(circle at 80% 35%, #eaf1ff 0, transparent 34%),
            linear-gradient(120deg, #fbfcff 0%, #f2f6ff 100%);
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 75px;
    padding-bottom: 80px;
    max-width: 1160px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 30px;
    color: #4169b5;
    background: #eaf1ff;
    font-size: 13px;
    margin-bottom: 27px;
}

.label-dot,
.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38b98a;
}

.hero h1 {
    font-size: clamp(36px, 4.5vw, 54px);
    line-height: 1.35;
    letter-spacing: 1px;
    font-weight: 750;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    color: #697991;
    max-width: 550px;
    margin-top: 22px;
    font-size: 16px;
    line-height: 2;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 31px;
}

.primary-button {
    border: none;
    border-radius: 9px;
    padding: 13px 24px;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 7px 18px rgba(56, 105, 212, 0.2);
    transition: 0.2s;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.primary-button span {
    margin-left: 12px;
}

.secondary-button {
    border: 1px solid #dce4f1;
    border-radius: 9px;
    padding: 12px 23px;
    color: #52647e;
    background: white;
    font-size: 15px;
}

.secondary-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-note {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 35px;
    color: #77859a;
    font-size: 12px;
}

.hero-note span {
    color: #3aab83;
    font-weight: 700;
    margin-right: -16px;
}

.hero-decoration {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-decoration-one {
    width: 300px;
    height: 300px;
    border: 1px solid rgba(87, 130, 219, 0.12);
    right: 5%;
    top: 10%;
}

.hero-decoration-two {
    width: 190px;
    height: 190px;
    border: 1px solid rgba(87, 130, 219, 0.1);
    right: 10%;
    top: 22%;
}


/* ==============================
   四、首屏右侧示意卡片
============================== */

.hero-visual {
    position: absolute;
    z-index: 1;
    width: 390px;
    right: max(calc((100% - 1160px) / 2), 30px);
    top: 50%;
    transform: translateY(-45%);
}

.visual-main-card {
    background: white;
    border: 1px solid #e6ecf6;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 20px 55px rgba(47, 78, 139, 0.12);
}

.visual-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visual-icon {
    width: 42px;
    height: 42px;
    background: #eaf1ff;
    color: var(--primary);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
}

.visual-card-top strong,
.visual-card-top small {
    display: block;
}

.visual-card-top strong {
    font-size: 15px;
}

.visual-card-top small {
    color: #95a0b1;
    font-size: 11px;
}

.visual-card-top .online-dot {
    margin-left: auto;
}

.visual-message {
    background: #f4f7fc;
    border-radius: 12px;
    padding: 18px;
    margin-top: 24px;
}

.message-label {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.visual-message p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.9;
    color: #58677d;
}

.visual-progress {
    margin-top: 24px;
}

.progress-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.progress-title span {
    color: #38a981;
}

.progress-line {
    height: 6px;
    background: #edf1f7;
    border-radius: 10px;
    margin-top: 13px;
    overflow: hidden;
}

.progress-line span {
    display: block;
    width: 62%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #477ce7, #77a2f5);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 10px;
    color: #8996a9;
}

.floating-tag {
    position: absolute;
    background: white;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    color: #586b87;
    font-size: 12px;
    font-weight: 600;
}

.floating-tag span {
    color: var(--primary);
    margin-right: 5px;
}

.tag-one {
    top: -20px;
    right: -15px;
}

.tag-two {
    bottom: -20px;
    left: -22px;
}


/* ==============================
   五、通用内容区
============================== */

.section {
    padding: 88px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 44px;
}

.section-eyebrow {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-heading h2 {
    font-size: 30px;
    letter-spacing: 1px;
}

.section-heading p {
    margin-top: 12px;
    color: #8490a2;
    font-size: 14px;
}


/* ==============================
   六、平台功能卡片
============================== */

.features-section {
    background: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 19px;
}

.feature-card {
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 27px 22px;
    background: white;
    transition: 0.25s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: #d7e2f7;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 21px;
}

.icon-blue {
    color: #3972d7;
    background: #eaf1ff;
}

.icon-purple {
    color: #8064cb;
    background: #f1edff;
}

.icon-green {
    color: #299d78;
    background: #e8f7f1;
}

.icon-orange {
    color: #d28b3b;
    background: #fff4e8;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 11px;
}

.feature-card p {
    font-size: 13px;
    color: #8490a2;
    line-height: 1.9;
}


/* ==============================
   七、学习流程
============================== */

.process-section {
    background: #f7f9fd;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.process-item {
    background: white;
    border: 1px solid #e9edf4;
    border-radius: 12px;
    padding: 25px;
    position: relative;
}

.process-number {
    display: inline-block;
    color: #4b7bd4;
    background: #edf3ff;
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.process-item h3 {
    font-size: 16px;
    margin-bottom: 7px;
}

.process-item p {
    font-size: 13px;
    color: #8995a7;
}


/* ==============================
   八、关于平台
============================== */

.about-section {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-left h2 {
    font-size: 32px;
    line-height: 1.6;
}

.about-left h2 span {
    color: var(--primary);
}

.about-right p {
    color: #748197;
    font-size: 14px;
    line-height: 2.1;
    margin-bottom: 15px;
}

.about-right .primary-button {
    margin-top: 12px;
}


/* ==============================
   九、页脚
============================== */

.footer {
    background: #f6f8fc;
    border-top: 1px solid #e9edf4;
    padding: 27px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-inner strong {
    font-size: 15px;
}

.footer-inner p,
.footer-inner > span {
    font-size: 12px;
    color: #929daf;
}


/* ==============================
   十、智能体聊天页面
============================== */

.chat-page {
    min-height: 100vh;
    background: #f5f7fb;
}

.chat-header {
    height: 76px;
    background: white;
    border-bottom: 1px solid #e8edf5;
}

.chat-header-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.back-button {
    justify-self: start;
    border: 1px solid #e5eaf2;
    background: white;
    color: #607089;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    transition: 0.2s;
}

.back-button:hover {
    color: var(--primary);
    border-color: #b8caed;
}

.back-button span {
    margin-right: 6px;
}

.chat-header-title {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-title .brand-icon {
    width: 37px;
    height: 37px;
    font-size: 18px;
}

.chat-header-title strong,
.chat-header-title small {
    display: block;
}

.chat-header-title strong {
    font-size: 15px;
}

.chat-header-title small {
    color: #9aa5b5;
    font-size: 11px;
}

.chat-header-status {
    justify-self: end;
    color: #36a47d;
    font-size: 12px;
}

.chat-header-status i {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #35b889;
    border-radius: 50%;
    margin-right: 6px;
}

.chat-workspace {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    padding: 30px 0 25px;
}

.chat-workspace-heading {
    margin-bottom: 19px;
}

.chat-workspace-heading .section-eyebrow {
    margin-bottom: 5px;
}

.chat-workspace-heading h1 {
    font-size: 23px;
    font-weight: 700;
}

.chat-workspace-heading p {
    color: #8290a4;
    font-size: 13px;
    margin-top: 5px;
}

.chat-panel {
    background: white;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 9px 30px rgba(39, 65, 110, 0.06);
}

.coze-chat-container {
    position: relative;
    width: 100%;
    height: 690px;
    min-height: 550px;
    background: white;
    overflow: hidden;
}

.coze-chat-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.loading-state,
.error-state {
    width: 100%;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 25px;
}

.loading-state strong,
.error-state strong {
    font-size: 16px;
    color: #34445c;
}

.loading-state p,
.error-state p {
    color: #8b97a8;
    font-size: 13px;
    margin-top: 8px;
    max-width: 520px;
    overflow-wrap: anywhere;
}

.loading-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #e5edfc;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 19px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-state button {
    margin-top: 18px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 7px;
    padding: 9px 19px;
    font-size: 13px;
}

.error-state button:hover {
    background: var(--primary-dark);
}

.chat-bottom-note {
    text-align: center;
    color: #9aa5b5;
    font-size: 12px;
    padding-top: 15px;
}


/* ==============================
   十一、响应式适配
============================== */

@media (max-width: 1000px) {
    .hero-visual {
        width: 340px;
        right: 25px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        max-width: 460px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 32px);
    }

    .nav-links {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-content {
        padding-top: 65px;
        padding-bottom: 65px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-visual {
        display: none;
    }

    .hero-note {
        gap: 12px;
    }

    .section {
        padding: 65px 0;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .about-left h2 {
        font-size: 27px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .chat-header-inner {
        grid-template-columns: 1fr 1fr;
    }

    .chat-header-title {
        display: none;
    }

    .chat-workspace {
        width: calc(100% - 20px);
        padding-top: 22px;
    }

    .chat-workspace-heading h1 {
        font-size: 19px;
    }

    .coze-chat-container {
        height: 70vh;
        min-height: 500px;
    }

    .loading-state,
    .error-state {
        min-height: 500px;
    }
}

@media (max-width: 420px) {
    .brand-text small {
        display: none;
    }

    .nav-button {
        padding: 9px 12px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero-actions {
        gap: 9px;
    }

    .primary-button,
    .secondary-button {
        padding: 11px 16px;
        font-size: 13px;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .chat-header-status {
        font-size: 11px;
    }
}