/* 基础样式 */
:root {
    --primary-color: #007acc;
    --background-color: #1e1e1e;
    --text-color: #d4d4d4;
    --border-color: #454545;
    --hover-color: #2a2d2e;
    --button-hover-color: #292929;
    --toolbar-height: 40px;
    --status-bar-height: 22px;
    --error-color: #ff6b6b;
    --success-color: #69db7c;
    --tooltip-bg: #f0f0f0;
    --tooltip-text: #000000;
    --dialog-overlay: rgba(0, 0, 0, 0.5);
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #c1c1c1;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* 工具栏样式 */
.toolbar {
    height: var(--toolbar-height);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.toolbar-group {
    display: flex;
    gap: 5px;
}

.toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 16px;
}

.toolbar button:hover {
    background-color: var(--button-hover-color);
}

/* 主容器样式 */
.main-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 80px);
    overflow: hidden;
    margin-bottom: var(--status-bar-height);
}

/* 垂直布局（输出框在底部） */
.main-container.vertical-layout {
    flex-direction: column;
}

#editor-container {
    flex: 1;
    min-width: 200px;
    min-height: 200px;
    transition: width 0.2s, height 0.2s;
}

#editor-container::after {
    content: '拖放文件到此处打开';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#editor-container.drag-over::after {
    opacity: 1;
}

/* 输出容器样式 */
.output-container {
    position: relative;
    width: 400px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: width 0.2s, height 0.2s;
}

/* 垂直布局时的输出容器样式 */
.vertical-layout .output-container {
    width: 100%;
    height: 300px;
    border-left: none;
    border-top: 1px solid var(--border-color);
}

.output-header {
    padding: 8px 12px;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.output-controls {
    display: flex;
    gap: 8px;
}

.output-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.output-controls button:hover {
    background-color: var(--button-hover-color);
}

/* 输出内容区域样式 */
#output-content {
    flex: 1;
    padding: 10px;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    color: var(--text-color) !important;  /* 强制使用白色文本 */
    background: var(--background-color);   /* 使用默认背景色 */
    line-height: 1.5;
    font-size: 14px;
}

/* 移除错误消息的特殊样式 */
.error-message {
    color: var(--text-color) !important;  /* 强制使用白色文本 */
    background: none !important;          /* 移除红色背景 */
    border-left: none !important;         /* 移除左边框 */
    padding: 10px;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 确保所有输出内容使用相同样式 */
#output-content * {
    color: var(--text-color) !important;  /* 强制所有子元素使用白色文本 */
    background: none !important;          /* 移除所有背景色 */
}

/* 状态栏样式 */
.status-bar {
    height: var(--status-bar-height);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    user-select: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.separator {
    color: rgba(255, 255, 255, 0.5);
}

.copyright {
    font-size: 12px;
    opacity: 0.8;
}

.copyright a {
    color: white;
    text-decoration: none;
    margin-right: 10px;
}

.copyright a:hover {
    text-decoration: underline;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: var(--tooltip-bg);
    color: var(--tooltip-text);
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    
    /* 确保提示框不会超出屏幕 */
    @media (max-width: 768px) {
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }
}

/* 左侧按钮的工具提示右对齐 */
.toolbar-group:first-child .tooltip::after {
    left: 0;
    transform: translateX(0);
}

/* 右侧按钮的工具提示左对齐 */
.toolbar-group:last-child .tooltip::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

/* 调整箭头位置 */
.toolbar-group:first-child .tooltip::after::before {
    left: 10%;
}

.toolbar-group:last-child .tooltip::after::before {
    left: 90%;
}

.status-bar .tooltip::after {
    top: auto;
    bottom: 120%;
    &::before {
        top: auto;
        bottom: -4px;
    }
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 设置面板样式 */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    max-width: 90vw;
    z-index: 1000;
    transition: all 0.3s ease;
}

.settings-panel.hidden {
    display: none;
}

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

.settings-header h2 {
    margin: 0;
    font-size: 18px;
}

.settings-header button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 20px;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.setting-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    flex: 1;
}

.setting-item input[type="range"] {
    width: 100px;
}

.setting-item select {
    width: 120px;
    padding: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbar button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .output-container {
        position: fixed;
        bottom: var(--status-bar-height);
        left: 0;
        width: 100%;
        height: 200px;
        border-left: none;
        border-top: 1px solid var(--border-color);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .output-container.show {
        transform: translateY(0);
    }

    .output-header {
        cursor: ns-resize;
    }

    .status-bar {
        font-size: 10px;  /* 缩小字体 */
        padding: 0 5px;   /* 减小内边距 */
    }

    /* 隐藏次要信息 */
    .status-bar .separator,
    .status-bar .copyright a:not(:first-child),
    #cursor-position {
        display: none;
    }

    /* 调整版权信息 */
    .copyright {
        font-size: 10px;
    }

    .copyright a {
        margin-right: 5px;
    }

    /* 确保状态栏两端对齐 */
    .status-left, .status-right {
        gap: 8px;  /* 减小元素间距 */
    }
}

/* 超窄屏幕适配 */
@media (max-width: 360px) {
    .status-bar {
        font-size: 9px;
    }
    
    /* 只显示最重要的信息 */
    .status-bar .copyright a:not(:first-child),
    .status-bar .separator {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 输出框标题样式 */
.output-header {
    padding: 8px 12px;
    background-color: #2d2d2d;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 1px solid #1e1e1e;
    user-select: none;
}

/* 成功信息样式 */
.success-message {
    color: var(--success-color);
}

/* 添加过渡效果 */
.toolbar,
.output-container,
.output-header,
.status-bar,
.settings-panel,
button,
select,
input {
    transition: all 0.3s ease;
}

/* 对话框样式 */
.dialog-overlay {
    background: var(--dialog-overlay);
}

.dialog {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.dialog-button {
    background: var(--button-hover-color);
    color: var(--text-color);
}

.dialog-button.primary {
    background: var(--primary-color);
    color: white;
}

/* 关于本站面板样式 */
.about-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    scrollbar-width: thin;  /* Firefox */
    scrollbar-color: var(--border-color) transparent;  /* Firefox */
}

.about-panel.hidden {
    display: none;
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.about-header h2 {
    margin: 0;
    font-size: 20px;
}

.about-header button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 4px;
}

.about-header button:hover {
    background-color: var(--button-hover-color);
}

.about-content {
    font-size: 14px;
    line-height: 1.6;
}

.about-content h3 {
    color: var(--primary-color);
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.about-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.about-content li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
    font-size: 14px;
}

.about-content li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 5px;
}

.about-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    opacity: 0.8;
}

.about-footer p {
    margin: 5px 0;
    color: var(--text-color);
}

.about-footer a {
    color: var(--text-color);
    text-decoration: none;
}

.about-footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* 语言选择面板样式 */
.language-select-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    width: 600px;
    max-width: 90vw;
    z-index: 1000;
}

.language-select-panel.hidden {
    display: none;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.language-card {
    background-color: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lang-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.lang-name {
    font-size: 14px;
}

/* 添加一个小图标 */
.ai-chat-header h3::before {
    content: '🤖';
    margin-right: 8px;
}

/* 工具栏右侧按钮组 */
.toolbar-right {
    margin-left: auto;
    margin-right: 10px;
    display: flex;
    gap: 10px;
}

.toolbar-right button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 16px;
}

.toolbar-right button:hover {
    background-color: var(--button-hover-color);
}

/* 客户端下载按钮特殊样式 */
#download-client {
    font-size: 18px; /* 稍微调大图标 */
}

/* 语言选择面板样式 */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 4px;
}

.close-btn:hover {
    background-color: var(--hover-color);
}

/* 调整手柄样式 */
.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 10;
    transition: background-color 0.2s;
}

/* 水平布局时的调整手柄 */
.resize-handle {
    left: -3px;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
}

/* 垂直布局时的调整手柄 */
.vertical-layout .resize-handle {
    left: 0;
    top: -3px;
    width: 100%;
    height: 6px;
    cursor: row-resize;
}

/* 悬停和拖动时的样式 */
.resize-handle:hover {
    background: var(--primary-color);
    opacity: 0.3;
}

.resizing {
    user-select: none;
    cursor: none;  /* 拖动时隐藏鼠标 */
}

.resizing .resize-handle {
    background: var(--primary-color);
    opacity: 0.4;
}

/* 拖动时禁用文本选择 */
.resizing * {
    user-select: none !important;
}

/* 通知容器样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 通知样式 */
.notification {
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    min-width: 200px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    animation: slideIn 0.3s forwards;
}

/* 通知类型样式 */
.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--error-color);
}

.notification.info {
    background-color: var(--primary-color);
}

.notification.warning {
    background-color: #f0ad4e;
}

/* 通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 淡出动画 */
.notification.fade-out {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* 移动端隐藏通知 */
@media (max-width: 768px) {
    .notification-container {
        display: none;
    }
}

/* 当AI聊天打开时调整状态栏 */
.main-container.ai-chat-open + .status-bar {
    left: 400px;  /* 改为 400px 以匹配 AI 对话框宽度 */
    transition: left 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-container.ai-chat-open + .status-bar {
        left: 0;  /* 移动端时状态栏始终从左侧开始 */
    }
}

/* 文件标签样式 */
.editor-tabs {
    display: flex;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4px 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
    height: 32px;
}

.editor-tabs::-webkit-scrollbar {
    display: none;
}

.editor-tab {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    max-width: 200px;
    position: relative;
    top: 1px;
    min-width: 100px;
}

.editor-tab.active {
    background: var(--background-color);
    border-bottom: 1px solid var(--background-color);
}

.editor-tab:hover {
    background: var(--button-hover-color);
}

.tab-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-close {
    margin-left: 8px;
    border: none;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    opacity: 0.6;
}

.tab-close:hover {
    opacity: 1;
    color: var(--error-color);
}

/* 语言选择对话框样式 */
.language-select-dialog .language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    padding: 10px;
}

.language-select-dialog .language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-select-dialog .language-card:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

.language-select-dialog .lang-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.language-select-dialog .lang-name {
    font-size: 14px;
}

/* 右键菜单样式 */
.context-menu {
    position: fixed;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 0;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.context-menu .menu-item {
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 13px;
    transition: background-color 0.2s;
}

.context-menu .menu-item:hover {
    background-color: var(--hover-color);
}

/* 欢迎界面样式 */
.editor-welcome-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background-color);
    z-index: 10;
}

.welcome-screen {
    text-align: center;
    color: var(--text-color);
    padding: 20px;
    max-width: 600px;
}

.welcome-content h2 {
    margin-bottom: 30px;
    font-size: 24px;
}

.welcome-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.welcome-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

.welcome-button .icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.welcome-button .text {
    font-size: 16px;
    margin-bottom: 5px;
}

.welcome-button .shortcut {
    font-size: 12px;
    opacity: 0.7;
}

.welcome-tips {
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.welcome-tips ul {
    list-style: none;
    padding: 0;
}

.welcome-tips li {
    margin: 10px 0;
    opacity: 0.8;
}

/* AI 分析标题样式 */
.ai-analysis-title {
    text-align: center;
    padding: 8px 0;  /* 减小内边距 */
    color: var(--text-color);
    opacity: 0.8;
    border-bottom: 1px solid var(--border-color);
    margin: 8px 0;   /* 减小外边距 */
}

/* 错误信息和 AI 分析样式 */
.error-content {
    white-space: pre-wrap;
    margin-bottom: 8px;  /* 减小底部外边距 */
}

.ai-analysis-title {
    text-align: center;
    padding: 10px 0;
    color: var(--text-color);
    opacity: 0.8;
    border-bottom: 1px solid var(--border-color);
    margin: 15px 0;
}

.ai-analysis-content {
    padding-top: 8px;  /* 减小顶部内边距 */
    padding-bottom: 0; /* 移除底部内边距 */
}

/* 调整 AI 分析内容中第一个元素的上边距 */
.ai-analysis-content > *:first-child {
    margin-top: 0;
}

/* 代码块样式 */
.ai-analysis-content pre {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    position: relative;
    overflow-x: auto;
    
    /* 添加自定义滚动条样式 */
    &::-webkit-scrollbar {
        height: 6px;
    }
    
    &::-webkit-scrollbar-track {
        background: transparent;
    }
    
    &::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }
    
    &::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

.ai-analysis-content pre code {
    font-family: 'Fira Code', monospace;
    display: block;
    padding: 0;
    color: var(--text-color);
}

/* 代码块语言标识 */
.ai-analysis-content pre code:before {
    content: attr(class);
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.6;
    background: var(--border-color);
    border-bottom-left-radius: 4px;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Firefox 滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--background-color);
}

/* 输出框滚动条样式 */
.output-content {
    &::-webkit-scrollbar {
        width: 8px;
    }
    
    &::-webkit-scrollbar-track {
        background: transparent;
    }
    
    &::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
    
    &::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

/* 代码安全检查相关样式 */
.security-error {
    color: #ffffff;
    background-color: #9C1A1A !important;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.security-error h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff !important;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.security-error p {
    margin: 10px 0;
    color: #ffffff !important;
}

.security-error pre {
    background-color: rgba(0, 0, 0, 0.2) !important;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
    color: #ffcccc !important;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Fira Code', monospace;
}

/* 新增违规项目样式 */
.violation-item {
    margin: 15px 0;
    padding-left: 10px;
    border-left: 3px solid #ff9999;
}

.violation-item strong {
    color: #ffdddd !important;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.violation-code {
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: #ff8888 !important;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
    max-height: 150px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
}

.solution-code {
    background-color: rgba(0, 0, 0, 0.25) !important;
    color: #aaffaa !important;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
    max-height: 150px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
}

.full-analysis {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #ffeeee !important;
    padding: 12px;
    border-radius: 4px;
    margin: 5px 0;
    max-height: none !important;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.security-error details {
    margin-top: 15px;
}

.security-error summary {
    cursor: pointer;
    color: #dddddd;
    font-size: 14px;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.security-error summary:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

/* 加载中消息样式 */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-color);
    font-size: 16px;
    opacity: 0.8;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
} 