/* 基础样式 */
:root {
    --primary-color: #2196F3;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* 顶部导航栏样式 */
.top-nav {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 500;
}

.nav-title .mdi {
    font-size: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-link .mdi {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-link:hover .mdi {
    transform: translateX(3px);
}

/* 仪表盘容器 */
.dashboard-container {
    padding: 20px;
    max-width: 1400px;
    margin: 20px auto;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(225deg, transparent 0%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 51%, transparent 51%, transparent 100%);
    background-size: 200% 200%;
    background-position: 100% 100%;
    transition: all 0.5s ease;
}

.stats-card:hover::after {
    background-position: 0% 0%;
}

.stats-icon {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stats-icon .mdi {
    font-size: 32px;
}

.stats-info {
    flex: 1;
}

.stats-info h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.total-count, .monthly-count, .source-count {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* 图表容器样式 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-wrapper.wide {
    grid-column: 1 / -1;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header .mdi {
    color: var(--primary-color);
}

.chart {
    height: 300px;
    width: 100%;
}

/* 统计卡片新样式 */
.stats-icon.purple {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.stats-icon.orange {
    background: linear-gradient(135deg, #FF9800, #FF5722);
}

.stats-icon.green {
    background: linear-gradient(135deg, #4CAF50, #009688);
}

.sub-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.trend-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    margin-top: 5px;
}

.trend-indicator.up {
    color: #4CAF50;
}

.trend-indicator.down {
    color: #f44336;
}

.active-manager {
    font-size: 1.5em;
    font-weight: bold;
    color: #9C27B0;
}

.avg-monthly {
    font-size: 1.5em;
    font-weight: bold;
    color: #FF9800;
}

.latest-update {
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-content {
        padding: 12px 16px;
    }

    .nav-title {
        font-size: 1rem;
    }
}

/* 添加错误提示样式 */
.error-message {
    color: #f44336;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* 新增统计卡片样式 */
.stats-icon.red {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.stats-icon.blue {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.stats-icon.teal {
    background: linear-gradient(135deg, #009688, #00796B);
}

/* 表格样式 */
.table-section {
    margin-top: 30px;
}

.table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.table-header {
    margin-bottom: 20px;
}

.table-header h3 {
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #666;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* 分析部分样式 */
.analysis-section {
    margin-top: 30px;
}

.danger-manager, .attack-type, .top-discoverer {
    font-size: 1.5em;
    font-weight: bold;
}

.danger-manager {
    color: #f44336;
}

.attack-type {
    color: #2196F3;
}

.top-discoverer {
    color: #009688;
} 