@font-face {
    font-family: 'PingFang SC';
    src: local('PingFang SC');
    font-display: swap;
}

body {
    background-color: #121212; /* 深色背景 */
    color: #e0e0e0;       /* 浅色文字 */
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0; /* 移除默认边距 */
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    margin-top: 84px; /* 导航栏高度64px + 20px 间距 */
    background-color: #1e1e1e; /* 内容区域背景色 */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

h1, h2 {
    color: #ffffff;
    border-bottom: 1px solid #383838;
    padding-bottom: 12px;
    margin-top: 0; /* 避免与 container padding 重叠 */
    margin-bottom: 25px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
}

h3 {
    color: #e0e0e0;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 20px;
}

.input-group {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #2a2a2a; /* 输入区域背景 */
    border-radius: 6px;
    border: 1px solid #383838;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #cccccc;
    font-size: 16px;
}

.input-group .help-text {
    margin-top: 8px;
    font-size: 14px;
    color: #888888;
    font-style: italic;
}

input[type="file"],
button,
textarea {
    padding: 12px 18px;
    border-radius: 5px;
    border: 1px solid #4a4a4a;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #333333;
    color: #e0e0e0;
}

textarea {
    width: calc(100% - 36px);
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #5b00d7;
    box-shadow: 0 0 0 2px rgba(91, 0, 215, 0.2);
}

input[type="file"] {
    background-color: #333333;
    color: #e0e0e0;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background-color: #5b00d7; /* 主题强调色 */
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px; /* 按钮和文字间距 */
    transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #7b61ff; /* 悬浮时颜色变浅 */
}

/* 应用于所有输入框和选择框 */
input, select, textarea, button {
    font-family: inherit;
}

/* 应用于所有中文文本 */
* {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', 'Helvetica Neue', Arial, sans-serif;
}

button {
    background-color: #5b00d7; /* 主题强调色 */
    color: white;
    cursor: pointer;
    border: 1px solid #5b00d7;
    margin-right: 12px;
}

button:hover {
    background-color: #7b61ff;
    border-color: #7b61ff;
}

/* 评价问大家分析按钮样式统一 */
#taobaoDataButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background-color: #5b00d7;
    color: white;
    border: 1px solid #5b00d7;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

#taobaoDataButton:hover {
    background-color: #7b61ff;
    border-color: #7b61ff;
}

.button-group {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

/* 分析结果表格样式 */
#resultTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    table-layout: fixed;
}

#resultTable th, #resultTable td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #383838;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 设置列宽 */
#resultTable th:nth-child(1), 
#resultTable td:nth-child(1) {
    width: 25%;
}

#resultTable th:nth-child(2), 
#resultTable td:nth-child(2) {
    width: 10%;
    text-align: center;
}

#resultTable th:nth-child(3), 
#resultTable td:nth-child(3) {
    width: 15%;
    text-align: center;
}

#resultTable th:nth-child(4), 
#resultTable td:nth-child(4) {
    width: 15%;
    text-align: center;
}

#resultTable th:nth-child(5), 
#resultTable td:nth-child(5) {
    width: 15%;
    text-align: center;
}

#resultTable th {
    background-color: #333333;
    color: #ffffff;
    font-weight: 600;
    position: sticky;
    top: 0;
}

#resultTable tr:hover {
    background-color: #333333;
}

#resultTable tr:last-child td {
    border-bottom: none;
}

/* 品类大词高亮 */
.category-word-highlight {
    color: #7b61ff;
    font-weight: 600;
}

/* 结果控制区域 */
.result-controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.sort-options, .filter-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#categoryFilter {
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #333333;
    color: #e0e0e0;
    border: 1px solid #4a4a4a;
    min-width: 150px;
}

/* 品类大词展示区 */
.category-words-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 6px;
}

.category-words-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.category-tag {
    background-color: rgba(91, 0, 215, 0.15);
    color: #7b61ff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid rgba(91, 0, 215, 0.3);
    display: inline-block;
}

/* 分类标签样式 */
[class^="category-"] {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.category-产品类型 {
    background-color: rgba(52, 152, 219, 0.4);
    color: #5aafee;
}

.category-品牌词 {
    background-color: rgba(155, 89, 182, 0.4);
    color: #c08edb;
}

.category-款式 {
    background-color: rgba(46, 204, 113, 0.4);
    color: #4aeea0;
}

.category-空间 {
    background-color: rgba(230, 126, 34, 0.4);
    color: #ffa453;
}

.category-场景 {
    background-color: rgba(241, 196, 15, 0.4);
    color: #ffde45;
}

.category-材质 {
    background-color: rgba(231, 76, 60, 0.4);
    color: #ff8b7d;
}

.category-风格 {
    background-color: rgba(26, 188, 156, 0.4);
    color: #40e8ca;
}

.category-功能 {
    background-color: rgba(52, 73, 94, 0.4);
    color: #7993b3;
}

.category-工艺 {
    background-color: rgba(127, 140, 141, 0.4);
    color: #a1adad;
}

.category-外观 {
    background-color: rgba(211, 84, 0, 0.4);
    color: #ff9c4a;
}

.category-安全 {
    background-color: rgba(192, 57, 43, 0.4);
    color: #ff6b5d;
}

.category-其他 {
    background-color: rgba(149, 165, 166, 0.4);
    color: #c4d4d6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #resultTable th, #resultTable td {
        padding: 10px;
    }
    
    .sort-options, .filter-options {
        width: 100%;
    }
}

/* 排序和筛选按钮样式 */
.result-controls button {
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
}

.result-controls button.active {
    background-color: #7b61ff;
    border-color: #7b61ff;
}

.result-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(91, 0, 215, 0.3);
}

/* 分类标签筛选下拉框样式 */
.filter-options {
    background-color: #333333;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    background-color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.brand-logo {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.version-tag {
    background-color: rgba(91, 0, 215, 0.15);
    color: #7b61ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(91, 0, 215, 0.3);
    margin-right: 8px;
    transition: all 0.3s ease;
}

/* 版本标签动画效果 */
.version-tag-updated {
    animation: pulse-update 1s ease;
}

.version-tag-new {
    animation: fade-in 0.5s ease;
}

@keyframes pulse-update {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123, 97, 255, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(123, 97, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123, 97, 255, 0); }
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    gap: 6px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图标按钮样式 */
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(30, 30, 35, 0.9);
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-left: 6px;
}

.icon-btn:hover {
    background-color: #5b00d7;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(91, 0, 215, 0.4);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    stroke-width: 1.75;
} 