﻿/* 添加think容器的样式 */
.think-container {
    color: #666;
    margin: 8px 0;
    border-left: 3px solid #e0e0e0;
    padding-left: 12px;

    margin-bottom: 10px;
}

.think-summary {
    cursor: pointer;
    list-style: none; /* 移除默认箭头 */
    position: relative;
    padding-left: 20px;
}

.think-summary:hover {
    color: #444;
}

.think-summary::before {
    content: "▶";
    position: absolute;
    left: 0;
    transition: transform 0.2s;
}

details[open] .think-summary::before {
    transform: rotate(90deg);
}

.think-content {
    margin-top: 8px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
margin-top: -50px;
font-size: 12px;
    margin-bottom: -0px;
}



/* 基础样式重置 */
* {
    /* margin: 5px; */
    padding: 0;
    box-sizing: border-box;
}
/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9466ff;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #e5e5e5;
    color: #333;
    min-width: 1000px;
    margin: 0px;
    line-height: 1.6;
}

    /* 导航栏样式 - 修改后的版本 */
    .navbar {
        /* position: sticky; */
        width: 100%;
        top: 0;
        z-index: 1000;
        padding: 1.5rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* background: rgba(45, 27, 78, 0.9); */
        /* backdrop-filter: blur(10px); */
    }   
    .left-section {
        flex: 0 0 auto;
    }
    .right-section-main{
        position: relative;
        display: flex;
        gap: 2rem;
        width: 50%;
        max-width: 700px;
        opacity: 0.8;
    }

    .right-section {
        width: 100%;
        align-items: center;
        background: #f9f9f9;
        backdrop-filter: blur(10px);
        padding: 0.5rem 1.5rem;
        border-radius: 0 15px 15px 0;
        display: flex;
        justify-content: space-between;
        margin-left: 20px;
    }

    .right-section::before {
        content: '';
        position: absolute;
        left: -25px;
        top: 0;
        height: 100%;
        width: 40px;
        background: #f9f9f9;
        backdrop-filter: blur(10px);
        transform: skew(-25deg);
        border-radius: 15px 0 0 15px;
        z-index: -1;
    }
    .logo {
        width: 80px;
        transition: transform 0.3s ease;
    }

    .logo:hover {
        transform: scale(1.1);
    }

    .nav-links {
        display: flex;
        gap: 2rem;
        align-items: center;
        margin-left: 29px;
    }

    .nav-links a {
        color: #111111;
        text-decoration: none;
        font-weight: bold;
        font-size: 1rem;
        opacity: 0.8;
        transition: opacity 0.3s ease;
    }

    .nav-links a:hover {
        opacity: 1;
    }

    .login-btn {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(66, 66, 66, 0.897);
        padding: 0.5rem 1.5rem;
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: bold;
        color: #131313;
    }

    .login-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }



/* 主容器布局 */
.main-container {
    /* display: grid;
    grid-template-columns: 280px 1fr 300px;
    height: calc(100vh - 160px);
    gap: 1px; */
    /* background: #f0f0f0; */
    display: flex;
    height: calc(100vh - 160px);
    flex-direction: column;

}

.chat-main-big{
    display: grid;
    grid-template-columns: 1fr 300px;
    height: calc(100vh - 160px);
    gap: 1px;
}
/* 角色选择区域 */
.character-selection {
    background: #f9f9f9;
    padding: 1.5rem;
    display: flex;
    height: 120px;
    margin: 5px;
    border-radius: 15px;
}

.character-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* margin-bottom: 1rem; */
}

.character-card:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.character-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
}

.character-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.character-info p {
    font-size: 0.85rem;
    color: #666;
}

/* 聊天主区域 */
.chat-main {
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    margin: 5px;
    border-radius: 15px;
    width: 100%;
}

.chat-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.2rem;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
}

.icon-btn:hover {
    background: #f5f5f5;
}

/* 聊天内容区域 */
.chat-content {
    /* flex: 1; */
    height: calc(100vh - 260px);
    overflow-y: auto;
    padding: 2rem;
}

.welcome-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.welcome-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.8rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #8257e6;
    border-bottom-color: #8257e6;
}

.suggestion-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    padding: 1.5rem;
    background: #ebebeb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 消息列表 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    background: #8257e6;
    color: #f9f9f9;
}

.message.assistant {
    align-self: flex-start;
    background: #f5f5f5;
}

/* 输入区域 */
.chat-input {
    padding: 1rem 2rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input textarea {
    flex: 1;
    height: 44px;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.chat-input textarea:focus {
    outline: none;
    border-color: #8257e6;
}

.send-btn {
    padding: 0.8rem 1.5rem;
    background: #8257e6;
    color: #f9f9f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #9466ff;
}

/* 右侧设置面板 */
.settings-panel {
    background: #f9f9f9;
    padding: 1.5rem;
    /* border-left: 1px solid #eee; */
    overflow-y: auto;
    margin: 5px;
    border-radius: 15px;
    /* 自定义滚动条样式 */
    /* scrollbar-width: thin; */
    scrollbar-color: #8257e6 transparent;
    width: 35%;
    min-width: 150px;
    max-width: 650px;
}

/* Webkit浏览器的滚动条样式 */
.settings-panel::-webkit-scrollbar {
    width: 8px;
}

.settings-panel::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 15px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background-color: #8257e6;
    border-radius: 15px;
    border: 2px solid #f9f9f9;
}

.panel-section {
    margin-bottom: 2rem;
}

.panel-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.panel-section select,
.panel-section textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 6px;
    font-family: inherit;
}

.panel-section textarea {
    height: 100px;
    resize: none;
}

.panel-section label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

input[type="range"] {
    width: 100%;
    accent-color: #8257e6;
}

.clear-btn {
    width: 100%;
    padding: 0.8rem;
    background: #ff4444;
    color: #f9f9f9;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: #ff6666;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 240px 1fr 280px;
    }
}

@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 200px 1fr;
    }
    .settings-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    .character-selection {
        display: none;
    }
    .suggestion-cards {
        grid-template-columns: 1fr;
    }
}








/* 生成中动画样式 */
.generating-animation {
    padding: 10px;
}

.generating-animation .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: #666;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.generating-animation .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.generating-animation .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* 消息样式 */
.message-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
}

/* 代码块样式 */
.code-block {
        font-size: 11px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 0.5em 0;
}

/* 生成动画容器样式 */
.generating-container {
    width: fit-content !important;
    min-width: 60px;
    padding: 10px 20px;
}

.generating-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

/* 调整message样式 */
.message {
    max-width: 80%;
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 10px;
}

/*.message.user {
    align-self: flex-end;
    background-color: #007AFF;
    color: white;
}
*/
.message.assistant {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
}


/* 禁用状态样式 */
.chat-input textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.send-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 可以添加一个提示样式 */
.generating-warning {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff3cd;
    color: #856404;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
}

.chat-input textarea:disabled:hover + .generating-warning {
    display: block;
}

.safety-slider {
    width: 100%;
    margin: 10px 0;
}

.safety-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.safety-labels span {
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.safety-labels span.active {
    color: #007AFF;
    font-weight: bold;
}

.chat-layout {
    display: flex;
    height: 100%;
    width: 100%;
        padding: 5px;
        padding-left: 10px;
}

.character-sidebar {
    border-radius: 15px;
    width: 280px;
    border-right: 1px solid #e0e0e0;
    background: #f5f5f5;
    overflow-y: auto;
    height: 100%;
        margin-top: 5px;
}

.character-list {
    padding: 10px;
}

.character-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.character-item:hover {
    background-color: #e8e8e8;
}

.character-item.active {
    background-color: #e0e0e0;
}

.character-item .character-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
}

.character-item .character-info {
    flex: 1;
}

.character-item .character-info h3 {
    margin: 0;
    font-size: 16px;
}

.character-item .character-info p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-main-big {
    flex: 1;
    display: flex;
    overflow: hidden;
}
