* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

:root {
    --primary: #165DFF;
    --success: #52C41A;
    --warning: #FAAD14;
    --danger: #FF4D4F;
    --gray: #666;
    --light: #f5f7fa;
    --border: #e5e6eb;
    --card-radius: 12px;
}

body {
    background: var(--light);
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav a.active {
    color: var(--primary);
    border-color: var(--primary);
}

.login {
    cursor: pointer;
}

.user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 主体 */
main {
    padding: 30px 0;
}

.page-title {
    font-size: 26px;
    margin-bottom: 24px;
    font-weight: 600;
}

/* 卡片 */
.card {
    background: white;
    border-radius: var(--card-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单 */
.form-row {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
}

.required {
    color: var(--danger);
}

/* 标签组 */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: var(--light);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-close {
    cursor: pointer;
    color: #999;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* 进度 */
.progress {
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 65%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray);
}

/* 平台标签 */
.platform {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.plat-wenxin {
    background: #e6f7ff;
    color: #1890ff;
}

.plat-qianwen {
    background: #fff7e6;
    color: #3726ff;
}

.plat-yuanbao {
    background: #e6ffef;
    color: #52c41a;
}

.plat-doubao {
    background: #f0f0ff;
    color: #722ed1;
}

.plat-deepseek {
    background: #fff1f0;
    color: #4d6bfe;
}

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 10px;
    border-radius: var(--card-radius);
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.stat-title {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 8px;
}

.stat-num {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
}

.up {
    color: var(--success);
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--light);
    font-weight: 600;
}

/* 排名 */
.rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
}

.no-rank {
    color: var(--gray);
    font-size: 13px;
}

/* 标签切换 */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.tab {
    cursor: pointer;
    font-weight: 500;
    color: #666;
}

.tab.active {
    color: var(--primary);
}

/* 底部 */
footer {
    background: white;
    padding: 24px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
    margin-top: 40px;
}

/* 响应式 */
@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        display: none;
    }
}

.layui-form input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    height: auto;
}

.layui-input-affix {
    line-height: 45px;
}

.layui-input-wrap {
    line-height: unset;
}

/* 标签输入 */
.tag-input-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    min-height: 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.layui-form input.tag-input {
    border: none;
    flex: 1;
    min-width: 120px;
    padding: 6px;
    outline: none;
}

.layui-form input.tag-input:focus {
    box-shadow: none;
}

.tag {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.6;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-input {
    border: none;
    flex: 1;
    min-width: 120px;
    padding: 6px;
    outline: none;
}

/* 推荐标签 */
.recommend-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.rec-tag {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.layui-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    line-height: unset;
    background-color: #1a73e8;
}


/* 卡片容器 */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 每个平台一张卡片 */
.platform-card {
    background: white;
    border-radius: 16px;
    transition: transform 0.2s;
    border-bottom: 2px solid #f0f0f0;
}

.platform-card:active {
    transform: scale(0.98);
}

/* 卡片头部：平台名称 */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.platform-name {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 平台图标 */
.platform-icon {
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.platform-icon img {
    width: 25px;
    height: 25px;
}

/* 排名徽章 */
.rank-badge {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.rank-badge.not-ranked {
    background: #fef3e8;
    color: #e67e22;
}

/* 卡片内容：数据网格 */
.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.stat-value.small {
    font-size: 16px;
}

/* 提及率高亮 */
.high-rate {
    color: #27ae60;
}

/* 进度条（可选） */
.rate-bar {
    margin-top: 12px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
}

.layui-tabs-header li {
    padding: 0 10px;
}

#generate-detection-question {
    cursor: pointer;
    background: #1a73e8;
    color: #fff;
    border-radius: 10px;
    padding: 10px;
}