:root {
    --octopus-primary: #df2d49;
    --octopus-primary-hover: #bd203a;
    --octopus-primary-soft: #fff0f3;
    --octopus-background: #fff9fb;
    --octopus-border: #f0d8de;

    --semi-color-primary: #df2d49 !important;
    --semi-color-primary-hover: #bd203a !important;
    --semi-color-primary-active: #a91b34 !important;
    --semi-color-primary-light-default: #fff0f3 !important;
}

body.octopus-brand {
    background:
        radial-gradient(
            circle at 14% 12%,
            rgba(241, 91, 119, 0.13),
            transparent 30%
        ),
        radial-gradient(
            circle at 83% 9%,
            rgba(255, 190, 204, 0.20),
            transparent 28%
        ),
        #fff9fb !important;
}

/* 顶部导航 */
body.octopus-brand header {
    background: rgba(255, 255, 255, 0.90) !important;
    border-bottom-color: var(--octopus-border) !important;
    backdrop-filter: blur(16px);
}

body.octopus-brand a[data-octopus-custom-nav] {
    transition:
        color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

body.octopus-brand a[data-octopus-custom-nav]:hover {
    color: var(--octopus-primary) !important;
    background: var(--octopus-primary-soft) !important;
    transform: translateY(-1px);
}

/* 首页标题 */
body.octopus-home .octopus-home-heading {
    color: #17181c !important;
    letter-spacing: -0.045em;
}

body.octopus-home .octopus-gradient {
    background: linear-gradient(
        90deg,
        #ff718b 0%,
        #df2d49 52%,
        #b91e3a 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.octopus-home .octopus-home-description {
    color: #747985 !important;
}

/* 首页标签 */
body.octopus-home .octopus-home-badge {
    color: var(--octopus-primary) !important;
    background: var(--octopus-primary-soft) !important;
    border-color: #f2c4cf !important;
}

/* 主按钮 */
body.octopus-home .octopus-primary-button {
    color: #ffffff !important;
    border-color: transparent !important;
    background: linear-gradient(
        135deg,
        #f35f79,
        #df2d49
    ) !important;
    box-shadow: 0 14px 30px rgba(223, 45, 73, 0.22) !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease !important;
}

body.octopus-home .octopus-primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(223, 45, 73, 0.29) !important;
}

/* 次按钮 */
body.octopus-home .octopus-secondary-button {
    background: #ffffff !important;
    border-color: var(--octopus-border) !important;
    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        transform 180ms ease !important;
}

body.octopus-home .octopus-secondary-button:hover {
    color: var(--octopus-primary) !important;
    background: var(--octopus-primary-soft) !important;
    border-color: #efb5c2 !important;
    transform: translateY(-2px);
}

/* 卡片和 API 示例面板 */
body.octopus-home main [class*="card"],
body.octopus-home main [class*="Card"] {
    border-color: rgba(240, 216, 222, 0.90) !important;
}

body.octopus-home button[aria-selected="true"] {
    color: var(--octopus-primary) !important;
}

/* 页面加载动画 */
body.octopus-home .octopus-animate {
    animation: octopusFadeUp 520ms ease both;
}

@keyframes octopusFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    body.octopus-brand a[data-octopus-custom-nav] {
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.octopus-brand *,
    body.octopus-brand *::before,
    body.octopus-brand *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* OCTOPUS MOBILE FIX V3 START */

html.octopus-force-light {
    color-scheme: light !important;

    --semi-color-bg-0: #fff9fb !important;
    --semi-color-bg-1: #ffffff !important;
    --semi-color-bg-2: #fff4f7 !important;
    --semi-color-text-0: #17181c !important;
    --semi-color-text-1: #454b55 !important;
    --semi-color-text-2: #747985 !important;
    --semi-color-border: #f0d8de !important;
}

html.octopus-force-light,
html.octopus-force-light body,
body.octopus-public-page {
    background: #fff9fb !important;
    color: #17181c !important;
}

body.octopus-public-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(241, 91, 119, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 88% 10%,
            rgba(255, 202, 214, 0.20),
            transparent 26%
        ),
        #fff9fb !important;
}

/* 公开页面顶部导航 */
body.octopus-public-page header,
body.octopus-public-page nav {
    color: #17181c !important;
}

body.octopus-public-page header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #f0d8de !important;
}

body.octopus-public-page header a,
body.octopus-public-page header button,
body.octopus-public-page header span,
body.octopus-public-page header svg {
    color: #17181c !important;
}

body.octopus-public-page header svg {
    stroke: currentColor !important;
}

/* 主页文字 */
body.octopus-home h1,
body.octopus-home h2,
body.octopus-home h3,
body.octopus-home .octopus-home-heading {
    color: #17181c !important;
}

body.octopus-home .octopus-gradient {
    display: block;
    color: transparent !important;
    background: linear-gradient(
        90deg,
        #ff6683,
        #df2d49,
        #b91e3a
    ) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
}

body.octopus-home .octopus-home-description {
    color: #68707d !important;
}

body.octopus-home .octopus-home-badge {
    color: #df2d49 !important;
    background: #fff0f3 !important;
    border-color: #efbcc8 !important;
}

body.octopus-home .octopus-primary-button {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #f35f79,
        #df2d49
    ) !important;
}

body.octopus-home .octopus-secondary-button {
    color: #252a32 !important;
    background: #ffffff !important;
    border-color: #ead7dc !important;
}

body.octopus-home .octopus-secondary-button svg {
    color: #4f5661 !important;
}

/* 手机抽屉菜单 */
.octopus-mobile-nav-link {
    color: inherit !important;
    cursor: pointer !important;
}

/* 模型广场浅色兜底 */
body.octopus-models-page main {
    color: #17181c !important;
}

body.octopus-models-page input {
    color: #17181c !important;
    background: #ffffff !important;
    border-color: #e7d9de !important;
}

body.octopus-models-page input::placeholder {
    color: #9399a3 !important;
}

@media (max-width: 900px) {
    html.octopus-force-light,
    html.octopus-force-light body {
        overflow-x: hidden;
    }

    body.octopus-home .octopus-home-heading {
        max-width: 100% !important;
        font-size: clamp(39px, 11.3vw, 54px) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.045em !important;
        word-break: keep-all !important;
    }

    body.octopus-home .octopus-home-description {
        font-size: 17px !important;
        line-height: 1.75 !important;
    }

    body.octopus-home .octopus-primary-button,
    body.octopus-home .octopus-secondary-button {
        width: 100% !important;
        min-height: 54px !important;
        margin: 0 !important;
        justify-content: center !important;
    }

    body.octopus-home header {
        min-height: 72px !important;
    }

    body.octopus-public-page
    [role="dialog"],
    body.octopus-public-page
    [class*="drawer" i],
    body.octopus-public-page
    [class*="sheet" i] {
        color: #17181c !important;
        background: #ffffff !important;
    }

    body.octopus-public-page
    [role="dialog"] a,
    body.octopus-public-page
    [role="dialog"] button,
    body.octopus-public-page
    [class*="drawer" i] a,
    body.octopus-public-page
    [class*="drawer" i] button {
        color: #303640 !important;
    }

    .octopus-mobile-nav-link {
        display: block !important;
        width: 100% !important;
    }
}

/* OCTOPUS MOBILE FIX V3 END */


/* OCTOPUS MOBILE NAV FIX V5 START */

#octopus-mobile-menu-v5 {
    display: none;
}

@media (max-width: 900px) {
    body.octopus-menu-v5-open {
        overflow: hidden !important;
    }

    body.octopus-menu-v5-open #octopus-mobile-menu-v5 {
        position: fixed !important;
        z-index: 2147483000 !important;
        top: 82px !important;
        right: 0 !important;
        bottom: 104px !important;
        left: 0 !important;

        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;

        padding: 20px 24px 18px !important;
        overflow-y: auto !important;

        background:
            radial-gradient(
                circle at 86% 8%,
                rgba(255, 215, 224, 0.22),
                transparent 32%
            ),
            #ffffff !important;

        border-top: 1px solid #f0d8de !important;
    }

    #octopus-mobile-menu-v5 a {
        display: flex !important;
        align-items: center !important;

        width: 100% !important;
        min-height: 58px !important;
        padding: 0 22px !important;

        color: #4e545e !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 14px !important;

        font-size: 20px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        text-decoration: none !important;

        transition:
            color 160ms ease,
            background 160ms ease,
            transform 160ms ease !important;
    }

    #octopus-mobile-menu-v5 a:hover,
    #octopus-mobile-menu-v5 a:active {
        color: #df2d49 !important;
        background: #fff0f3 !important;
        transform: translateX(3px);
    }

    #octopus-mobile-menu-v5 a.is-active {
        color: #df2d49 !important;
        background: #fff0f3 !important;
        font-weight: 750 !important;
    }

    #octopus-mobile-menu-v5 .octopus-menu-divider {
        width: 100% !important;
        height: 1px !important;
        margin: 8px 0 !important;
        background: #f1e2e6 !important;
    }
}

/* OCTOPUS MOBILE NAV FIX V5 END */

/* octopus-partner-home */
body.octopus-home .octopus-partner-home {
    margin-top: 10px !important;
    font-size: 14px !important;
    color: #6b5a60 !important;
}
body.octopus-home .octopus-partner-home a {
    color: var(--octopus-primary, #df2d49) !important;
    font-weight: 600;
    text-decoration: none;
}
body.octopus-home .octopus-partner-home a:hover {
    text-decoration: underline;
}
