:root {
    --primary-color: #07C160;
    --bg-color: #F7F7F7;
    --message-bg-user: #95EC69;
    --message-bg-ai: #FFFFFF;
    --border-color: #efefef;
    --text-color: #333333;
    --text-color-light: #999999;
    --empty-chat-bg: url('');
}

/* 基础布局 */
#ai-chat-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 80vh;
    background-color: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

#ai-chat-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* 消息区域 */
#ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-color);
    position: relative;
    min-height: 400px;
}

/* 控制面板 */
#ai-chat-controls {
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

/* 输入区域 */
#ai-chat-input-container {
    padding: 12px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

#ai-chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    outline: none;
    resize: vertical;
    min-height: 40px;
    max-height: 150px;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

#ai-chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.1);
}

/* 登录提示样式 */
.ai-chat-login-notice {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 20px;
}

.ai-chat-login-content {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-chat-login-content i {
    font-size: 48px;
    color: #999;
    margin-bottom: 20px;
}

.ai-chat-login-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.ai-chat-login-content p {
    color: #666;
    margin-bottom: 20px;
}

.ai-chat-login-btn {
    display: inline-block;
    padding: 10px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ai-chat-login-btn:hover {
    background-color: #06AE56;
    color: white;
}

/* API密钥设置提示样式 */
.ai-chat-api-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-api-notice a {
    color: #533f03;
    text-decoration: underline;
}
.wp-list-table th, 
.wp-list-table td {
    padding: 12px 8px;
}
/* 思考中模态框样式 */
.thinking-content {
    max-width: 300px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.thinking-animation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.thinking-circle {
    width: 50px;
    height: 50px;
    position: absolute;
    border: 3px solid #0084ff;
    border-radius: 50%;
    animation: thinking-circle 2s linear infinite;
}

.thinking-pulse {
    width: 40px;
    height: 40px;
    background: rgba(0, 132, 255, 0.3);
    border-radius: 50%;
    animation: thinking-pulse 1.5s ease-in-out infinite;
}

.thinking-animation em {
    color: #333;
    font-style: normal;
    font-size: 16px;
    margin-top: 10px;
    text-shadow: 0 0 5px rgba(0, 132, 255, 0.5);
}

@keyframes thinking-circle {
    0% {
        transform: rotate(0deg);
        border-color: #0084ff transparent transparent transparent;
    }
    50% {
        border-color: transparent #0084ff transparent transparent;
    }
    100% {
        transform: rotate(360deg);
        border-color: #0084ff transparent transparent transparent;
    }
}

@keyframes thinking-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

#ai-chat-template {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
}
#ai-chat-template-btn {
    padding: 8px 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.2s;
}
#ai-chat-api-key-btn,
#ai-chat-clear-btn {
    padding: 8px 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.2s;
}

#ai-chat-api-key-btn:hover,
#ai-chat-clear-btn:hover {
    background-color: #06AE56;
}

#ai-chat-api-key-input {
    width: 95%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 16px;
}

.ai-chat-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ai-chat-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.ai-chat-btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}
#ai-chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
}

#ai-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.25);
}

.message-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    max-width: 70%;
    clear: both;
}

.user-wrapper {
    float: right;
    align-items: flex-end;
}

.ai-wrapper {
    float: left;
    align-items: flex-start;
}

.ai-wrapper .message {
    max-width: 90%;
}

.ai-wrapper .message img{
    max-width: 100%;
    display: block;
    margin: 20px auto;
} 
.nickname {
    font-size: 12px;
    color: var(--text-color-light);
    margin-bottom: 4px;
}

.message {
    position: relative;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.user-message {
    background: var(--message-bg-user);
    border-radius: 18px 4px 18px 18px;
    width: 100%;
}

.ai-message {
    background: var(--message-bg-ai);
    border-radius: 4px 18px 18px 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-content {
    margin-right: 24px;
    padding-left: unset;
}

.message-time {
    font-size: 12px;
    color: var(--text-color-light);
    margin-top: 4px;
}

.copy-message {
    opacity: 0;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    padding: 5px 5px;
    cursor: pointer;
    color: var(--text-color-light);
    position: absolute;
    right: 8px;
    top: 0px;
}

.message:hover .copy-message {
    opacity: 1;
}

.copy-message:hover {
    color: var(--primary-color);
}

/* Modal 样式 */
.ai-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.ai-chat-modal-content {
    background: white;
    padding: 24px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.ai-chat-modal-content h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text-color);
}

.ai-chat-modal-content p {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-color-light);
}

/* 代码块样式 */
.message pre {
    background: #F8F9FA;
    border-radius: 4px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
}

.message code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
}
/* 响应式布局 */
@media (max-width: 768px) {
    .ai-wrapper .message {
    max-width: 100%;
}
    #ai-chat-container {
        height: 100vh;
        border-radius: 0;
    }

    .message-wrapper {
        max-width: 85%;
    }

    #ai-chat-controls {
        flex-wrap: wrap;
    }

    #ai-chat-template {
        flex-basis: 100%;
        margin-bottom: 10px;
    }

    #ai-chat-api-key-btn,
    #ai-chat-clear-btn {
        flex: 1;
    }
}

/* 滚动条样式 */
#ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#ai-chat-messages::-webkit-scrollbar-track {
    background: var(--bg-color);
}

#ai-chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--text-color-light);
    border-radius: 3px;
}
.ai-message .fa-check{
    color: #000000
}
/* 模板选择模态框样式 */
.template-modal-content {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: modal-in 0.3s ease-out;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.template-item {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.1);
    border-color: var(--primary-color);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.template-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

.template-model {
    font-size: 12px;
    color: var(--text-color-light);
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.template-description {
    margin: 0;
    font-size: 14px;
    color: var(--text-color-light);
    line-height: 1.4;
}

.close-modal {
    width: 100%;
    padding: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.close-modal:hover {
    background: #06AE56;
}



/* 模板按钮样式 */
#ai-chat-template-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
}

.current-template {
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    color: #ffffff;
}

/* 响应式布局调整 */
@media (max-width: 480px) {
    #ai-chat-template-btn {
        padding: 6px 8px;
    }
    
    .current-template {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 选中状态样式 */
.template-item.selected {
    border: 2px solid var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.15);
}

/* 模板选择模态框样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
}

.modal-close {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .thinking-content {
        max-width: 180px !important;
    }
    
    .thinking-animation em {
        font-size: 13px;
    }
}

/* 空对话背景样式 */
.empty-chat {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 20px;
}

.empty-chat-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* 未登录提示样式优化 */
.not-logged-in-notice {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.not-logged-in-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), #34d399);
}

.login-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.login-btn, .register-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    background: var(--primary-color);
    color: white;
}

.register-btn {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-btn:hover, .register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 空对话样式优化 */
#ai-chat-messages {
    position: relative;
    min-height: 400px;
}

.empty-chat-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.9);
    border-radius: 12px;
}

.empty-chat-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}



.empty-chat-content h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.empty-chat-content p {
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 容器布局 */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 0px);
    position: relative;
    background: #f7f7f7;
    border-radius: 2px;
    /*box-shadow: 0px 0px 0px 10px rgb(243 243 243);*/
}

/* 消息区域 */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
}

/* 空对话样式 */
.empty-chat-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* 许点击穿透 */
}

.empty-chat-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

.empty-chat-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    pointer-events: auto; /* 允内容交互 */
}

/* 控制面板和输入框区域 */
.ai-chat-controls-wrapper {
    position: relative;
    z-index: 10; /* 确保控制面板在最上层 */
    background: #f7f7f7;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 10px;
}

#ai-chat-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ai-chat-input-wrapper {
    display: flex;
    gap: 10px;
    position: relative;
}

#ai-chat-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
}

#ai-chat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#ai-chat-send:hover {
    background: #06AE56;
    transform: translateY(-2px);
}

/* 确保模态框在最顶层 */
.ai-chat-modal {
    z-index: 1000;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ai-chat-container {
        height: calc(100vh - 100px);
    }
    
    .empty-chat-content {
        padding: 20px;
        margin: 10px;
    }
}

/* 未登录提示现代风格样式 */
.not-logged-in-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    padding: 20px;
}

.not-logged-in-notice {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notice-header {
    text-align: center;
    margin-bottom: 40px;
}

.notice-icon {
    margin-bottom: 20px;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(52, 211, 153, 0.2);
}

.icon-wrapper i {
    font-size: 36px;
    color: white;
}

.notice-header h3 {
    font-size: 28px;
    color: #1a202c;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.subtitle {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.feature-list {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 24px;
    color: white;
}

.feature-text {
    flex: 1;
}

.feature-text h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #2d3748;
}

.feature-text p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.auth-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.login-btn, .register-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    color: white;
    box-shadow: 0 8px 16px rgba(52, 211, 153, 0.2);
}

.register-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-btn:hover, .register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 640px) {
    .not-logged-in-notice {
        padding: 24px;
    }

    .notice-header h3 {
        font-size: 24px;
    }

    .feature-item {
        padding: 12px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-icon i {
        font-size: 20px;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .login-btn, .register-btn {
        padding: 12px 20px;
    }
}

/* 未登录页面容器 */
.not-logged-in-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6f8fd 0%, #e9edf7 100%);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 主卡片样式 */
.not-logged-in-notice {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.not-logged-in-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), #34d399);
}

/* 头部样式 */
.notice-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.notice-icon {
    margin-bottom: 25px;
    position: relative;
}

.icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(52, 211, 153, 0.25);
    position: relative;
    transition: transform 0.3s ease;
}

.icon-wrapper:hover {
    transform: translateY(-5px);
}

.icon-wrapper i {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notice-header h3 {
    font-size: 32px;
    color: #1a202c;
    margin: 0 0 10px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #64748b;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

/* 特性列表 */
.feature-list {
    display: grid;
    gap: 20px;
    margin: 40px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    background: white;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 28px;
    color: white;
}

.feature-text {
    flex: 1;
}

.feature-text h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1a202c;
    font-weight: 600;
}

.feature-text p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
}

/* 按钮样式 */
.auth-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.login-btn, .register-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 30px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    color: white;
    box-shadow: 0 12px 20px rgba(52, 211, 153, 0.2);
}

.register-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.login-btn:hover, .register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.login-btn i, .register-btn i {
    font-size: 20px;
}

/* 模板选择模态框样式 */
.template-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    background: white;
    border-radius: 24px;
    padding: 30px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    font-size: 24px;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.05);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.template-item {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.template-item.selected {
    border: 2px solid var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.template-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #34d399);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.template-icon i {
    font-size: 24px;
    color: white;
}

.template-content {
    flex: 1;
}

.template-header {
    margin-bottom: 10px;
}

.template-header h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #1a202c;
}

.template-model {
    font-size: 14px;
    color: #64748b;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.template-description {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.no-templates {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.no-templates i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .not-logged-in-notice {
        padding: 30px;
        border-radius: 20px;
    }

    .icon-wrapper {
        width: 80px;
        height: 80px;
    }
}
/* 优化模板选择样式 */
.template-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.template-item:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.template-item.selected {
    border: 2px solid var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

/* 添加空对话背景图变量 */
:root {
    --empty-chat-bg: url('');
}
.feature-icon .emoji-icon {
    font-size: 28px;
}

.auth-buttons .emoji-icon {
    font-size: 20px;
}
/* 添加新的样式 */
.empty-chat-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-chat-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--empty-chat-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
}
/* 模板选择样式优化 */
.template-modal-content {
    max-width: 800px !important;
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .template-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .emoji-icon {
        font-size: 24px;
    }
    
    .icon-wrapper .emoji-icon {
        font-size: 36px;
    }
}

/* 空对话状态样式 */
.empty-chat-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-chat-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--empty-chat-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.empty-chat-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* 模板选择样式优化 */
.template-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-item:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.template-item.selected {
    border: 2px solid var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.template-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

.template-model {
    font-size: 12px;
    color: #666;
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 4px;
}

.template-description {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* API密设置模态框样式 */
.api-key-input-wrapper {
    margin-bottom: 20px;
}

.api-key-input-wrapper input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.api-key-input-wrapper .description {
    color: var(--text-color-light);
    font-size: 13px;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.ai-chat-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #cbcbcb;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ai-chat-btn:hover {
    background: #f5f5f5;
}

.ai-chat-btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.ai-chat-btn-primary:hover {
    background: #06AE56;
}

.api-key-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.api-key-cancel-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.api-key-cancel-btn:hover {
    background: #f5f5f5;
}

.api-key-save-btn {
    background: var(--primary-color);
    border: none;
    color: white;
}

.api-key-save-btn:hover {
    background: #06AE56;
}

.api-key-get-link {
    display: inline-block;
    margin: 10px 0;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.api-key-get-link:hover {
    text-decoration: underline;
}

/* 当有消息时隐藏空对话背景和提示 */
#ai-chat-messages.has-messages .empty-chat-wrapper {
    display: none;
}

.code-block-wrapper {
    position: relative;
    margin: 1em 0;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dddddd;
    padding: 8px 15px;
    border-radius: 6px 6px 0 0;
    color: #fff;
}

.code-language {
    font-size: 0.9em;
    color: #b3b3b3;
}

.copy-code-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.code-block-wrapper pre {
    margin: 0;
    border-radius: 0 0 6px 6px;
}