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

/* 全局无滚动条，滚动条只出现在消息区域 */
html, body {
    font-size: 16px;
    height: 100%;
    overflow: hidden;
    font-family: 'PingFang SC', 'helvetica neue', 'hiragino sans gb', 'arial', 'microsoft yahei', 'simsun', 'sans-serif';
}

body {
    background-color: #ffffff;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif; */
    /* color: #171717; */
    display: flex;
    flex-direction: column;
    height: 100%;
}


html {
    font-size: 16px;
}

body {
    font-family: "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}

/*@media print {
    .typora-export h1,
    .typora-export h2 {
        border-bottom: none;
        padding-bottom: initial;
    }

    .typora-export h1::after,
    .typora-export h2::after {
        content: "";
        display: block;
        height: 100px;
        margin-top: -96px;
        border-top: 1px solid #eee;
    }
}*/

h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li {
    list-style: none;
}
li>ol,
li>ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 16px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
    border-collapse: collapse;
    border-spacing: 0;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table th:nth-child(1) {
    width: 200px;
}
table th:nth-child(2) {
    width: 100px;
}
table tr:nth-child(2n), thead {
    background-color: #f8f8f8;
    border-collapse: collapse;
}
table th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    margin: 0;
    padding: 6px 13px;
}
table td {
    border: 1px solid #dfe2e5;
    margin: 0;
    padding: 6px 13px;
}
table th:first-child,
table td:first-child {
    margin-top: 0;
}
table th:last-child,
table td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item > input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block>.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write>h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write>h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write>h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write>h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image>.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: "Segoe UI", "Arial", sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

.ty-preferences .window-content {
    background-color: #fafafa;
}

.ty-preferences .nav-group-item.active {
    color: white;
    background: #999;
}



        /* 头部导航栏 */
        .navbar {
            width: 100%;
            background-color: #ffffff;
            border-bottom: 1px solid #e5e5e5;
            padding: 12px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            height: 50px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            font-size: 18px;
            color: #63f;
        }
        .logo>img {
            height: 56px;
            margin-top: 12px;
        }
        .logo span {
            font-size: 24px;
        }

        .account-menu {
            position: relative;
        }
        .account-btn {
            background: transparent;
            border: none;
            /* width: 36px; */
            height: 36px;
            /* border-radius: 50%; */
            cursor: pointer;
            font-size: 14px;
            color: #4b5563;
            transition: background 0.2s;
            padding: 0 20px;
        }
        .account-btn:hover {
            background: #f3f4f6;
        }
        .dropdown {
            position: absolute;
            right: 0;
            /* top: 44px; */
            top: 70px;
            background: white;
            border: 1px solid #e5e5e5;
            min-width: 160px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.08);
            /* opacity: 0; */
            visibility: hidden;
            transform: translateY(-6px);
            transition: 0.2s;
            z-index: 100;
        }
        .account-menu:hover .dropdown {
            /* opacity: 1; */
            visibility: visible;
        }
        .dropdown-item {
            padding: 10px 16px;
            font-size: 14px;
            /* cursor: pointer; */
            color: #374151;
        }
        .dropdown-item:hover {
            background: #f9fafb;
        }
        .dropdown-divider {
            height: 1px;
            background: #e5e5e5;
            /* margin: 6px 0; */
        }

        /* 主内容区 – 居中且占满剩余空间 */
        .main-content {
            flex: 1;
            display: flex;
            justify-content: center;
            min-height: 0;  /* 防止flex溢出 */
            overflow: auto;
        }
        .chat-container {
            width: 100%;
            max-width: 1000px;
            /* height: 100%; */
            display: flex;
            flex-direction: column;
            background-color: #ffffff;
        }
        .wel-content {
            flex: none;
            align-items: center;
            height: calc(100% - 100px);
        }
        .wel {
            margin-bottom: 20px;
        }
        .wel>p {
            font-size: 30px;
            font-weight: 500;
            margin: 0;
        }
        .wel>p:nth-child(2) {
            color: #7d8186;
            font-weight: 300;
            display: flex;
        }
        .title {
            background: linear-gradient(90deg, #335bff, #ca37ce);
            background: -webkit-gradient(linear, left top, right top, from(#335bff), to(#ca37ce));
            background: -webkit-linear-gradient(left, #335bff, #ca37ce);
            background: linear-gradient(90deg, #335bff, #ca37ce);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-size: 30px;
            font-weight: 500;
        }
        /* 消息区域 – 滚动条只在这里出现 */
        .messages-area {
            flex: 1;
            /* overflow-y: auto; */
            padding: 20px 0;
            scroll-behavior: smooth;
        }

        /* 消息样式 */
        .message {
            display: flex;
            margin-bottom: 28px;
            animation: fadeIn 0.25s ease;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .user-message {
            justify-content: flex-end;
        }
        .assistant-message {
            justify-content: flex-start;
        }
        .message-bubble {
            max-width: 100%;
            border-radius: 20px;
            padding: 10px 16px;
            line-height: 1.5;
            font-size: 16px;
        }
        .user-message .message-bubble {
            background: #e9ecef;
            color: #1f1f1f;
            border-bottom-right-radius: 4px;
        }
        .assistant-message .message-bubble {
            background: transparent;
            padding: 0;
        }

        /* 思考区域 – 低调引文样式 */
        .thinking-section {
            margin-bottom: 16px;
            background: transparent;
            border-radius: 0;
            overflow: hidden;
        }
        .thinking-header {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 2px 10px;
            cursor: pointer;
            background-color: #6e4bfa14;
            user-select: none;
            font-size: 14px;
            color: #63f;
            border-radius: 8px;
        }

        .arrow-icon {
            transition: transform 0.2s;
            font-size: 10px;
        }
        .arrow-icon.collapsed {
            transform: rotate(-90deg);
        }
        .thinking-content {
            margin: 10px 0;
            padding: 0 12px;
            font-weight: 300;
            color: #9195a3;
            /* background: transparent; */
            /* border-top: none; */
            /* white-space: pre-wrap; */
            word-break: break-word;
            border-left: 1px solid #e0e4e97a;
        }
        .thinking-content.hidden {
            display: none;
        }
        .switch {
            padding-left: 5px;
            cursor: pointer;
            width: 14px;
            margin-right: 2px;
        }
        /* 最终答案样式 */
        .answer-content {
            font-size: 16px;
            line-height: 1.6;
        }
        .answer-content.title {
            font-size: 24px;
        }
        .answer-content pre {
            background: #f6f8fa;
            border-radius: 8px;
            padding: 12px;
            overflow-x: auto;
        }
        .answer-content code {
            font-family: 'Fira Code', monospace;
        }

        /* 复制按钮 */
        .copy-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            background: none;
            border: none;
            color: #8e9db2;
            cursor: pointer;
            font-size: 14px;
            margin-top: 12px;
            padding: 4px 8px;
            border-radius: 6px;
            transition: 0.2s;
        }
        .footer {
            display: flex;
            justify-content: center;
        }
        .footer-content {
            width: 100%;
            max-width: 1000px;
        }
        .input-card {
            background: #ffffff;
            border: 1px solid #e5e5e5;
            border-radius: 28px;
            margin: 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.02);
            flex-shrink: 0;
        }
        .input-row {
            width: 100%;
            padding: 12px 20px;
            /* border-bottom: 1px solid #eef2f6; */
        }
        .message-input {
            width: 100%;
            border: none;
            font-size: 16px;
            outline: none;
            font-family: inherit;
            background: transparent;
            padding: 4px 0;
        }
        .input-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
        }
        .tool-group {
            display: flex;
            gap: 12px;
        }
        .tool-btn {
            background: #f3f4f6;
            border: none;
            padding: 6px 14px;
            border-radius: 30px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: 0.2s;
            color: #374151;
        }
        .tool-btn.active {
            background: #6e4bfa14;
            color: #63f;
        }
        .tool-btn>img {
            width: 14px;
        }
        #deepThinkBtn>img {
            width: 16px;
        }
        .send-btn {
            background: #63f;
            border: none;
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .send-btn:hover:not(:disabled) {
            background: #63f;
        }
        .send-btn:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }
        .stop-btn {
            background: #64f;
        }
        .stop-btn:hover {
            background: #64f;
        }

        /* 滚动条样式 */
        ::-webkit-scrollbar {
            width: 5px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 8px;
        }

/* 设置密码 */
.dropdown-item a {
    color: #111827;
    text-decoration: none;
}

.layout-tuning {
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 460px;
}

.login-card {
    background: transparent;
    /* 完全透明，与白色背景融合 */
    padding: 1.2rem 0.5rem 1.5rem;
}

/* 欢迎文案 */
.title-text {
    margin-bottom: 2rem;
    text-align: center;
}

.title-text h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #111827;
    background: linear-gradient(90deg, #335bff, #ca37ce);
    background: -webkit-gradient(linear, left top, right top, from(#335bff), to(#ca37ce));
    background: -webkit-linear-gradient(left, #335bff, #ca37ce);
    background: linear-gradient(90deg, #335bff, #ca37ce);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border: none;
}

.title-text span {
    font-size: 0.85rem;
    color: #6c7289;
    display: block;
    margin-top: 0.3rem;
}

/* 表单组 */
.input-group {
    margin-bottom: 1.8rem;
    position: relative;
}

/* 底部边框输入框样式: 无圆角, 只有底部边框 */
.input-field {
    width: 100%;
    padding: 0.85rem 0 0.85rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-bottom: 1.5px solid #e5e7eb;
    background: transparent;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    outline: none;
    color: #1f2937;
    border-radius: 0px;
    /* 无圆角 */
}

.input-field:focus {
    border-bottom-color: #4f46e5;
}

.input-field::placeholder {
    color: #b9c2d4;
    font-weight: 400;
}

/* 输入框图标位置调整（适应底部边框布局） */
.input-icon {
    position: absolute;
    left: 0;
    bottom: 0.9rem;
    color: #9ca3af;
    font-size: 1.1rem;
    transition: color 0.2s;
    pointer-events: none;
}

.input-field:focus~.input-icon {
    color: #4f46e5;
}

.login-btn {
    width: 100%;
    background: #63f;
    border: none;
    padding: 0.7rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    letter-spacing: 0.3px;
}

.login-btn:hover {
    opacity: 0.8;
    filter: alpha(opacity=80);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn:disabled {
    opacity: 0.7;
    filter: alpha(opacity=70);
    cursor: not-allowed;
    transform: none;
}

/* 消息区域 */
.message-area {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    text-align: center;
    min-height: 2.5rem;
}

.error-msg {
    color: #e11d48;
    background: #fff0f2;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    display: inline-block;
    width: 100%;
}

.success-msg {
    color: #0f7b3a;
    background: #e6f7ed;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
}

.info-msg {
    color: #2563eb;
    background: #eef2ff;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
}

.text-gray-500 {
    color: #6b7280;
}

/* 移动端微调 */
@media (max-width: 480px) {
    .login-card {
        padding: 0.8rem 0.2rem 1.2rem;
    }

    .title-text h2 {
        font-size: 1.4rem;
    }
}
