body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.workspace-container {
    display: flex;
    height: 100vh;
}

/* 左侧区域 - 20%宽度 */
.left-panel {
    width: 20%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 用户企业信息区 - 左上角 10%高度 */
.user-info-area {
    height: 10%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-details h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.user-details p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 用户企业关键词栏 - 左下角 90%高度 */
.keyword-column {
    height: 90%;
    padding: 15px;
    overflow-y: auto;
}

.keyword-column-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.keyword-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keyword-item {
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.keyword-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.keyword-item.active {
    background: rgba(255, 255, 255, 0.3);
    border-left-color: white;
}

.keyword-text {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

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

/* 右侧区域 - 80%宽度 */
.right-panel {
    width: 80%;
    background: white;
    overflow-y: auto;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-title {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.content-area {
    padding: 30px;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.welcome-message i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
}

.welcome-message h3 {
    margin-bottom: 10px;
    color: #333;
}

/* 关键词内容区样式 */
.keyword-content {
    display: none;
}

.keyword-content.active {
    display: block;
}

.rank-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.rank-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.rank-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.rank-item {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    min-width: 120px;
}

.rank-model {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.rank-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.chart-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.chart-container {
    height: 400px;
    width: 100%;
}

.history-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.history-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.history-controls {
    margin-bottom: 20px;
}

.btn-workspace {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.btn-workspace:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-danger-workspace {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.btn-danger-workspace:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    color: white;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.history-model {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.history-model::before {
    content: '\f1b2';
    font-family: 'FontAwesome';
    margin-right: 8px;
    color: #667eea;
    font-size: 14px;
}

.history-date {
    font-size: 13px;
    color: #666;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.history-rank {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 6px 14px;
    border-radius: 6px;
}

.history-text {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 历史记录文本内容样式 - 用于Markdown渲染的内容 */
.history-text-content {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 14px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    overflow: scroll;
    height: 240px;
}

/* Markdown内容样式优化 */
.history-text-content h1,
.history-text-content h2,
.history-text-content h3,
.history-text-content h4,
.history-text-content h5,
.history-text-content h6 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.history-text-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.history-text-content h2 {
    font-size: 20px;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 6px;
}

.history-text-content h3 {
    font-size: 18px;
}

.history-text-content p {
    margin-bottom: 12px;
}

.history-text-content ul,
.history-text-content ol {
    margin-bottom: 12px;
    padding-left: 25px;
}

.history-text-content li {
    margin-bottom: 6px;
}

.history-text-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.history-text-content pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    border-left: 3px solid #667eea;
    margin-bottom: 12px;
}

.history-text-content pre code {
    background: transparent;
    padding: 0;
    color: #333;
}

.history-text-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.history-text-content a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.history-text-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.history-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.history-text-content table th,
.history-text-content table td {
    border: 1px solid #e1e5e9;
    padding: 8px 12px;
    text-align: left;
}

.history-text-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.history-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

.search-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.search-result-item {
    background: white;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-left: 3px solid #28a745;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background: #f0f9ff;
    border-left-color: #20c997;
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.15);
}

.search-result-item::before {
    content: '\f0c1';
    font-family: 'FontAwesome';
    margin-right: 10px;
    color: #28a745;
    font-size: 14px;
    flex-shrink: 0;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    transition: color 0.3s ease;
}

.search-result-item:hover .search-result-title {
    color: #28a745;
}

/* 滚动条样式 */
.keyword-column::-webkit-scrollbar {
    width: 6px;
}

.keyword-column::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.keyword-column::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.keyword-column::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}