/* common.css */
:root {
    --primary-gradient: linear-gradient(135deg, #FF8C42 0%, #F76B8A 100%);
    --secondary-gradient: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #f6f8fd 0%, #f1f4f9 100%);
    color: #2D3748;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
}

.loading {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 20px;
    height: 20px;
    border-top-color: #007BFF;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* form.css */
#input-area {
    width: 80%;
    max-width: 800px;
    margin-bottom: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

#user_input {
    width: 100%;
    height: 100px;
    padding: 16px;
    border: none;
    font-size: 16px;
    resize: none;
    box-sizing: border-box;
    outline: none;
    background: white;
    transition: background 0.3s ease;
}

#user_input:focus {
    background: #f8fafc;
}

#button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #E2E8F0;
}

#model-info {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

#submit_button {
    width: 44px;
    height: 44px;
    background: url('../svg/arrow-up-circle.svg'), var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    filter: invert(100%);
}

#submit_button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#continue-conversation {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    background: var(--secondary-gradient);
    color: #4A5568;
    border: none;
    transition: all 0.3s ease;
}

#continue-conversation:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Tool Options */
#tool-options {
    display: flex;
    gap: 12px;
    align-items: center;
}

#tool-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4A5568;
}

#tool-options input[type="checkbox"] {
    margin-right: 4px;
    cursor: pointer;
}

/* chat_history.css */
#chat_history {
    width: 80%;
    max-width: 800px;
    border: none;
    border-radius: 16px;
    padding: 20px;
    background-color: white;
    margin-bottom: 20px;
    box-sizing: border-box;
    box-shadow: var(--shadow-lg);
}

.user-message,
.assistant-message {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    position: relative;
    max-width: 85%;
}

.user-message {
    background: linear-gradient(135deg, #6B46C1 0%, #805AD5 100%);
    color: white;
    margin-left: auto;
    box-shadow: var(--shadow-sm);
}

.assistant-message {
    background: var(--secondary-gradient);
    margin-right: auto;
    box-shadow: var(--shadow-sm);
}

.think-content {
    color: #9e9e9e;
    font-style: normal;
    font-size: 0.9em;
    border-left: 2px solid #ddd;
    padding-left: 10px;
}

.real-content {
    color: #212121;
}

.code-result {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.message-buttons {
    /* 移除绝对定位相关样式 */
    display: flex;
    gap: 10px; /* 按钮之间的间距 */
    margin-top: 10px; /* 添加上边距与消息内容分开 */
}

.icon-clipboard,
.icon-share {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: cover;
    cursor: pointer;
}

.icon-clipboard {
    background-image: url('../svg/clipboard-document.svg');
}

.icon-share {
    background-image: url('../svg/share.svg');
}

.check-icon {
    background-image: url('../svg/check.svg') !important;
}

.icon-play {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../svg/play.svg');
    background-size: cover;
    cursor: pointer;
}

.loading-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #0078d4;
    border-radius: 50%;
    margin-left: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* 悬停效果 */
.icon-clipboard:hover,
.icon-share:hover {
    opacity: 0.7;
}

/* 模态框样式 */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.link-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.copy-link-btn {
    padding: 8px 16px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-link-btn:hover {
    background-color: #0056b3;
}

.copy-link-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #000;
}
/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    margin-bottom: 15px;
}

/* 列表样式 */
ul, ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

ul li, ol li {
    margin-bottom: 5px;
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #ddd;
    padding-left: 15px;
    color: #777;
    margin: 0 0 15px;
}

/* 代码块样式 */
pre {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
}

code {
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 4px;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* 链接样式 */
a {
    color: #4078c0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 15px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

p {
    line-height: 1.67;
}
.beian-info {
    text-align: center;
    color: #777;
    padding: 10px;
    font-size: 12px; /* 设置字体大小，可按需调整 */
}

.beian-info a {
    color: #777;
    text-decoration: none;
}

.beian-info a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* css/new_logo.css */
#logo {
    display: block;
    max-width: 100%; /* 确保图片不会超出容器宽度 */
    height: auto; /* 保持图片的纵横比 */
    margin: 0 auto;
}

/* 整体 header 样式 */
header {
    display: flex;
    width: 80%;
    text-align: center; /* 内部内容居中对齐 */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    max-width: 800px;
}

/* logo 链接样式 */
.logo-link {
    display: inline-block; /* 让链接以行内块元素显示，方便设置宽度和高度 */
}

/* 免费用户标签样式 */
#user-label {
    display: inline-block; /* 让标签以行内块元素显示 */
    margin-left: 10px; /* 与 logo 之间添加左边距 */
    color: #333; /* 设置文本颜色，可根据需求调整 */
    font-size: 14px; /* 设置字体大小，可根据需求调整 */
    font-weight: bold; /* 设置字体加粗 */
}
#user-label:hover{
    text-decoration: none;
    cursor: pointer;
}

body{
    padding-top: 0;
}

/* 优化输入框字体样式 */
#user_input {
    /* 选择合适的字体族 */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* 设置字体大小 */
    font-size: 16px;
    /* 设置行高 */
    line-height: 1.5;
    /* 设置字体颜色 */
    color: #333;
}

/* NEW: Styles for model selection buttons */
#model-info {
    display: flex; /* Arrange buttons horizontally */
    gap: 0; /* CHANGE: Remove gap for connected buttons */
    align-items: center;
    padding: 2px 0; /* Optional: adjust padding around the buttons */
}

.model-selector-button {
    /* 高度调整：增加垂直内边距 */
    padding: 8px 15px; /* CHANGE: Increased vertical padding for more height, slightly more horizontal padding */

    /* 默认颜色：更柔和、不那么“俗气”的灰色调 */
    background-color: #F7F7F7; /* Softer light grey */
    color: #555; /* Keep dark grey text */
    border: 1px solid #E0E0E0; /* Softer border color */

    border-radius: 0; /* Reset border-radius to 0 for all buttons in the group */
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    transition: all 0.2s ease;
    outline: none; /* Remove focus outline for better UX */
    white-space: nowrap; /* Prevent text wrapping */
    position: relative; /* Added for z-index to manage overlapping borders */
    z-index: 1; /* Default z-index */
}

/* Overlap borders for buttons that are not the first one */
.model-selector-button + .model-selector-button {
    margin-left: -1px;
}

/* Apply rounded corners to the first button in the group */
#model-info .model-selector-button:first-child {
    font-weight: bold;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

/* Apply rounded corners to the last button in the group */
#model-info .model-selector-button:last-child {
    font-weight: bold;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.model-selector-button:hover {
    /* 默认悬停颜色 */
    background-color: #EFEFEF; /* Slightly darker light grey on hover */
    border-color: #D0D0D0; /* Slightly darker border on hover */
    z-index: 2; /* Bring hovered button to front to show its full border */
}

.model-selector-button.active {
    /* 活跃状态颜色：根据参考渐变反色后的蓝绿色渐变 */
    /* 原始渐变：linear-gradient(135deg, #FF8C42 0%, #F76B8A 100%) */
    /* 反色后近似：#0073BD (深蓝色) 到 #089475 (深青绿色) */
    background: linear-gradient(135deg, #0073BD 0%, #089475 100%); /* Blue-Green gradient */
    color: white; /* Keep white text for contrast */
    border-color: #0073BD; /* Match border to the start of the gradient */
    font-weight: bold;
    z-index: 3; /* Bring active button to the highest front */
}

.model-selector-button.active:hover {
    /* 活跃状态悬停颜色：稍暗的蓝绿色渐变 */
    background: linear-gradient(135deg, #005A96 0%, #067058 100%); /* Darker blue-green gradient */
    border-color: #005A96; /* Match border to the start of the darker gradient */
    z-index: 3; /* Keep active button on top even when hovered */
}
/* mobile.css */
@media (max-width: 767px) {
    #chat_history {
        width: 100%;
        max-width: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-sizing: content-box;
    }

    #input-area {
    }

    #user_input {
        border-radius: 0;
    }

    #button-container {
        border-radius: 0;
    }
}
/* 弹窗样式 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* 使用 flex 布局让内容居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* 新增：让 padding 和 border 包含在 width 和 height 内 */
}

.modal-content {
    background-color: #fff;
    /* 使用 Material 风格的阴影 */
    box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);
    padding: 24px;
    width: 400px;
    max-width: 90%; /* 新增：限制最大宽度，避免超过屏幕 */
    border-radius: 4px;
    box-sizing: border-box; /* 新增：让 padding 和 border 包含在 width 和 height 内 */
	margin: auto;
    margin-top: 33px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0; /* 新增：增加头部的上下内边距，增强呼吸感 */
}

.modal-header h2 {
    /* 设置字体颜色和大小 */
    color: rgba(0, 0, 0, 0.87);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: rgba(0, 0, 0, 0.54);
    /* 添加过渡效果 */
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: rgba(0, 0, 0, 0.87);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-body p {
    /* 设置字体颜色和大小 */
    color: rgba(0, 0, 0, 0.87);
    font-size: 16px;
    margin: 0;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    /* 设置字体大小和样式 */
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    /* 添加过渡效果 */
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: rgba(0, 0, 0, 0.87);
}

.btn-secondary:hover {
    background-color: #bdbdbd;
}

.gift-code-section {
    display: none;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.gift-code-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* 设置字体颜色和大小 */
    color: rgba(0, 0, 0, 0.87);
    font-size: 16px;
    /* 添加过渡效果 */
    transition: border-color 0.2s ease;
    box-sizing: border-box; /* 新增：让 padding 和 border 包含在 width 和 height 内 */
}

.gift-code-input:focus {
    border-color: #1976d2;
    outline: none;
}

.submit-gift-code {
    margin-top: 10px;
    width: 100%;
}
/* 兑换成功提示框样式 */
#success-modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* 新增：使用 flex 布局让内容居中 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-modal-content {
    background-color: #fff;
    /* 新增：使用 Material 风格的阴影 */
    box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);
    padding: 24px;
    width: 300px;
    text-align: center;
    border-radius: 4px;
}

.success-modal-content p {
    margin-bottom: 20px;
    /* 新增：设置字体颜色和大小 */
    color: rgba(0, 0, 0, 0.87);
    font-size: 16px;
}

#success-modal-confirm {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    /* 新增：设置字体大小和样式 */
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    /* 新增：添加过渡效果 */
    transition: background-color 0.2s ease;
}

#success-modal-confirm:hover {
    background-color: #1565c0;
}
