/* 《无主之地4》舆情监测系统样式文件 */
.danger-card .card-title {
    color: #ff4d4d;
}
/* 页眉时间范围控件容器：居中显示 */
header .time-range-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
/* 创建时间: 2025-09-27 */
/* 功能: 定义舆情监测系统的所有样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e6e6e6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* 仪表盘内的时间范围控件（不同于页眉） */
.dashboard .time-range-controls {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 8px;
}

/* 增大“今日/近7日/近30日”的横向间距 */
.time-range-options {
    display: flex;
    align-items: center;
    gap: 25px; /* 增大横向间距 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-icon {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

/* 新增：logo图片样式 */
.logo-image {
    width: 200px; /* 原50px，放大1.5倍 */
    height: 100px; /* 原50px，放大1.5倍 */
    border-radius: 12px;
    object-fit: cover;
}

.data-sources {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.source-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.source-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

/* 新增：数据源图片样式 */
.source-img {
    width: 100px; /* 原24px，放大1.5倍 */
    height: 48px; /* 原24px，放大1.5倍 */
    border-radius: 6px;
    object-fit: cover;
}

.steam-icon { background: #1e88e5; }
.heixiaohe-icon { background: #ff9800; }
.tieba-icon { background: #4caf50; }
.douyin-icon { background: #000000; }
.bilibili-icon { background: #fb7299; }

.update-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-left: auto;
    align-items: flex-end; /* 使右侧信息整体右对齐 */
}
.update-info .data-sources {
    margin-top: 10px;            /* 与上方文字分隔 */
    gap: 12px;                   /* 标签之间更紧凑 */
    padding: 8px 14px;           /* 缩小内边距以适配右侧空间 */
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    color: #8f94fb;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.info-card {
    grid-column: span 1;
}

/* 左侧面板：包含时间范围控件与危机指数 */
.left-panel {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    /* gap: 12px; */
    gap: 30px;
}
/* 让左侧面板内的危机指数卡片填充剩余空间 */
.left-panel .danger-card {
    flex: 1 1 auto;
}

/* 调整危机指数卡片的最小高度，避免空白过多 */
.danger-card {
    grid-column: span 1;
    min-height: 260px; /* 从之前统一高度降低到更紧凑 */
    /* background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 77, 77, 0.05)); */
    /* border: 1px solid rgba(255, 77, 77, 0.2); */
}

.time-range-card {
    grid-column: span 2;
}

.metric-card {
    grid-column: span 1;
}

.topic-card {
    grid-column: span 2;
}

.wordcloud-card {
    grid-column: span 2;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.metric-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.danger-level {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.danger-metric {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.danger-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #ff7e5f;
    margin-bottom: 5px;
}

.danger-metric-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.danger-status {
    padding: 15px;
    background: rgba(255, 77, 77, 0.2);
    border-radius: 10px;
    /* border-left: 4px solid #ff4d4d; */
    font-weight: 700;
    font-size: 16px;
    color: #ffb3b3;
    text-align: center;
}
/* Danger status background colors by level */
/* .danger-status.status-keep { background: rgba(34, 197, 94, 0.25); border-left-color: #22c55e; color: #eaffea; }
.danger-status.status-watch { background: rgba(250, 204, 21, 0.25); border-left-color: #facc15; color: #1f2937; }
.danger-status.status-attention { background: rgba(251, 146, 60, 0.25); border-left-color: #fb923c; color: #fff4ea; }
.danger-status.status-alert { background: rgba(239, 68, 68, 0.35); border-left-color: #ef4444; color: #ffe5e5; } */
.danger-status.status-keep { background: rgba(34, 197, 94, 0.25)}
.danger-status.status-watch { background: rgba(250, 204, 21, 0.25)}
.danger-status.status-attention { background: rgba(251, 146, 60, 0.25)}
.danger-status.status-alert { background: rgba(239, 68, 68, 0.35)}

.time-option {
    padding: 10px 24px; /* 增大内边距以匹配更大字号 */
    background: transparent; /* 非激活态移除背景 */
    border: 1px solid rgba(255, 255, 255, 0.35); /* 仅保留描边 */
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff; /* 提升对比度 */
    font-size: 18px; /* 增大字号 */
    font-weight: 600; /* 增大字重 */
}

.time-option:hover {
    text-decoration: underline; /* 悬停下划线 */
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35); /* 轻微发光 */
}

.time-option.active {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    box-shadow: 0 4px 15px rgba(142, 148, 251, 0.45);
    color: #ffffff;
    font-weight: 700; /* 激活态加粗 */
    border-color: transparent; /* 激活态去描边，避免冲突 */
}

/* 固定 Top关键词卡片的最小高度，保证视觉一致性 */
.chart-container {
    min-height: 360px; /* 词条不足时也不缩小 */
    height: auto; /* 优先使用最小高度 */
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.topic-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: rgba(78, 84, 200, 0.2);
    transform: translateY(-3px);
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.topic-name {
    font-weight: 500;
    font-size: 16px;
}

.topic-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.topic-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.keyword {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.wordcloud-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wordcloud-canvas {
    width: 100%;
    height: 100%;
}

.sync-problem {
    margin-top: 15px;
    padding: 12px;
    background: rgba(78, 84, 200, 0.2);
    border-radius: 8px;
    border-left: 4px solid #8f94fb;
    font-weight: 500;
    font-size: 16px;
    color: #a1a6ff;
    text-align: center;
}

.footer-tags {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.footer-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    color: #e6e6e6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-img {
    width: 45px; /* 原20px，放大1.5倍 */
    height: 45px; /* 原20px，放大1.5倍 */
    border-radius: 50%;
    object-fit: cover;
}

.footer-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
}

.special-focus {
    background: linear-gradient(135deg, rgba(255, 126, 95, 0.3), rgba(254, 180, 123, 0.3));
    border: 1px solid rgba(255, 126, 95, 0.5);
    color: #ffb3b3;
}

@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-range-card {
        grid-column: span 2;
    }
    
    .topic-card, .wordcloud-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .card {
        grid-column: span 1 !important;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    .update-info {
        margin-left: 0;
        margin-top: 10px;
    }

    /* 移动端适配：缩小时间选项间距 */
    .time-range-options {
        gap: 18px;
    }
}

/* 词云卡片下载链接布局优化 */
.card-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.card-header .download-link {
    color: #fff;
    font-size: 14px;
    text-decoration: underline;
}

/* 平台筛选按钮样式 */
.platform-filter-container {
    margin-bottom: 15px;
}

.platform-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.platform-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.platform-filter-btn.active {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(142, 148, 251, 0.3);
}