:root {
    --primary-dark: #0A1A2F;
    --primary-neon: #00FFD1;
    --warning-red: #FF4D4D;
    --glass-bg: rgba(10, 26, 47, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(16, 32, 53, 0.9);
    --danger-color: #FF4757;
    --warning-color: #FFBA00;
    --success-color: #2ED573;
}

/* 主容器样式 */
.hot-topics-container {
    width: 100%;
    min-height: calc(100vh - 80px);
    padding: 20px;
    margin: 0;
    position: relative;
    top: 30px;
}

/* 平台选择栏 */
.platform-selector {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 32, 53, 0.9) 0%, rgba(10, 26, 47, 0.95) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    width: 100%;
}

.platform-btn {
    background: none;
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(0, 255, 209, 0.1);
}

.platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 209, 0.2);
}

.platform-btn.active {
    background: var(--primary-neon);
    color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(0, 255, 209, 0.3);
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.stat-card {
    padding: 25px;
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 32, 53, 0.9) 0%, rgba(10, 26, 47, 0.95) 100%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 209, 0.1);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-neon), transparent);
}

.stat-card h3 {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
}

.stat-card .number, .stat-card .value {
    font-size: 2.5em;
    color: var(--primary-neon);
    margin: 10px 0;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 209, 0.3);
}

/* 热点列表 */
.topics-list {
    background: linear-gradient(135deg, rgba(16, 32, 53, 0.9) 0%, rgba(10, 26, 47, 0.95) 100%);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 100%;
    flex: 1;
    min-height: calc(100vh - 400px);  /* 确保列表有足够的高度 */
    overflow-y: auto;
}

.topics-list h3 {
    color: var(--primary-neon);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 20px;
}

/* 话题项布局 */
.topic-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    width: 100%;
}

.topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

.topic-item.high-risk {
    border-left: 4px solid var(--danger-color);
}

.topic-item.medium-risk {
    border-left: 4px solid var(--warning-color);
}

.rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: var(--primary-neon);
    font-weight: 600;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.topic-content {
    flex: 1;
}

.topic-trend {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    margin-left: 15px;
    font-size: 14px;
    font-weight: 500;
    min-width: 70px;
    text-align: center;
}

.topic-trend.up {
    color: var(--success-color);
}

.topic-trend.down {
    color: var(--danger-color);
}

.topic-trend i {
    font-size: 18px;
    margin-bottom: 5px;
}

.topic-title {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.7);
}

.meta-item i {
    font-size: 16px;
}

.meta-item.sentiment.positive {
    color: var(--success-color);
}

.meta-item.sentiment.negative {
    color: var(--danger-color);
}

.meta-item.sentiment.neutral {
    color: var(--warning-color);
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tag.high-risk {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger-color);
}

.tag.medium-risk {
    background: rgba(255, 186, 0, 0.2);
    color: var(--warning-color);
}

/* 话题详情弹窗样式 */
.topic-detail-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1800px;  /* 增加最大宽度 */
    height: 90vh;
    background: linear-gradient(135deg, rgba(10, 26, 47, 0.95) 0%, rgba(5, 15, 30, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 209, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.topic-detail-dialog.active {
    opacity: 1;
    visibility: visible;
    animation: dialogFadeIn 0.4s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.topic-detail-dialog .dialog-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.topic-detail-dialog .dialog-header h3 {
    color: var(--primary-neon);
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.topic-detail-dialog .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-detail-dialog .close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.topic-detail-dialog .dialog-content {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 25px;
    overflow: hidden;
}

.topic-info {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-neon) rgba(0, 0, 0, 0.2);
}

.topic-info::-webkit-scrollbar {
    width: 6px;
}

.topic-info::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.topic-info::-webkit-scrollbar-thumb {
    background-color: var(--primary-neon);
    border-radius: 3px;
}

.topic-title {
    color: var(--primary-neon);
    font-size: 24px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    line-height: 1.4;
}

.topic-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-item .label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-item .value {
    display: block;
    color: var(--primary-neon);
    font-size: 24px;
    font-weight: 600;
}

.sentiment.negative {
    color: var(--warning-red) !important;
}

.sentiment.positive {
    color: var(--success-color) !important;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tag.high {
    background: rgba(255, 77, 77, 0.2);
    color: var(--warning-red);
}

.trend-analysis {
    margin-top: 20px;
}

.trend-analysis h5 {
    color: var(--primary-neon);
    margin: 0 0 15px 0;
    font-size: 16px;
}

.trend-chart {
    width: 100%;
    height: 200px;
    margin-top: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.trend-analysis p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 14px;
}

/* 备用趋势图样式 */
.fallback-chart {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.chart-title {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    margin-bottom: 5px;
}

.chart-bar {
    width: 8%;
    background: linear-gradient(to top, var(--primary-neon), rgba(0, 255, 209, 0.3));
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-color-secondary);
}

.chart-labels span {
    width: 8%;
    text-align: center;
}

/* 评论区域 */
.comments-section {
    width: 40%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-neon) rgba(0, 0, 0, 0.2);
}

.comments-section::-webkit-scrollbar {
    width: 6px;
}

.comments-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.comments-section::-webkit-scrollbar-thumb {
    background-color: var(--primary-neon);
    border-radius: 3px;
}

.comments-section h4 {
    color: var(--primary-neon);
    margin: 0 0 15px 0;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: normal;
}

.comment-input {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.comment-input:focus-within {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.comment-input textarea {
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    margin-bottom: 12px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.comment-input textarea:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 2px rgba(0, 255, 209, 0.2);
}

.comment-input textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comment-submit {
    background: var(--primary-neon);
    color: var(--primary-dark);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 209, 0.3);
}

.comment-submit:active {
    transform: translateY(0);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.comment-header .user {
    font-weight: 500;
    color: var(--primary-neon);
}

.comment-content {
    color: #fff;
    line-height: 1.5;
    font-size: 14px;
}

/* 提示消息 */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: linear-gradient(135deg, rgba(0, 255, 209, 0.9) 0%, rgba(0, 210, 255, 0.9) 100%);
    color: var(--primary-dark);
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 18px;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 209, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 209, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 209, 0);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .hot-topics-container {
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .topic-detail-dialog {
        width: 98%;
        height: 95vh;
    }
}

@media (max-width: 768px) {
    .hot-topics-container {
        padding: 10px;
    }
    
    .platform-selector {
        padding: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .topic-item {
        padding: 15px;
    }
    
    .topic-detail-dialog {
        width: 95%;
        height: 90vh;
    }
    
    .topic-detail-dialog .dialog-content {
        padding: 15px;
    }
}

/* 实时数据更新效果 */
@keyframes highlight-update {
    0% { background-color: rgba(0, 255, 209, 0.1); }
    50% { background-color: rgba(0, 255, 209, 0.3); }
    100% { background-color: rgba(0, 255, 209, 0.1); }
}

.topic-updated {
    animation: highlight-update 2s ease;
}

/* 统计卡片动画 */
.stat-card .number,
.stat-card .value {
    transition: all 0.5s ease;
}

.stat-card.updating .number,
.stat-card.updating .value {
    color: var(--primary-neon);
    text-shadow: 0 0 10px rgba(0, 255, 209, 0.5);
}

/* 修改body样式确保全屏 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景和光效背景样式调整 */
#particles-bg,
.light-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 响应式设计调整 */
@media (max-width: 1200px) {
    .hot-topics-container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .hot-topics-container {
        padding: 10px;
    }
} 