/* ========== 全局设置 ========== */
body {
    background-color: #FFFFFF;
    color: #212529;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 24px 0;
}

.header {
    padding: 20px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf9 100%);
    border-radius: 16px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #dce4f0;
}

.header h1 {
    color: #82318e;
    font-weight: 800;
    margin-bottom: 12px;
}

.header p {
    color: #5a6268;
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    color: #82318e;
    font-weight: 700;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
    margin-top: 2rem;
}

/* ========== 天气卡片 ========== */
.weather-card {
    background: #FFFFFF;
    border: 2px solid #A9A9A9;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
}

.weather-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: #808080;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #9370DB;
}

.city-name,
.province {
    font-size: 1.7rem;
    font-weight: 800;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.city-name {
    background: #87CEFA;
    border: 1px solid #a0ddeb;
}

.province {
    background: #9370DB;
    border: 1px solid #8c66cc;
}

.weather-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.info-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #6c757d;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
    text-align: right;
}

.temperature {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #e17055 !important;
}

.weather-condition {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #00b894 !important;
}

.collect-time {
    color: #636e72 !important;
    font-size: 0.92em !important;
    font-weight: normal !important;
}

/* ========== 系统状态表格 ========== */
.sync-status-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.95rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 1.5rem auto;
    max-width: 1100px;
}

.sync-status-table th,
.sync-status-table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid #e0e0e0;
}

.sync-status-table th {
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 45px;
}

.sync-status-table tr:last-child td {
    border-bottom: none;
}

.status-cell {
    color: #28a745;
    font-weight: 600;
}

/* 列宽分配 */
.sync-status-table th:nth-child(1),
.sync-status-table td:nth-child(1) { width: 110px; }

.sync-status-table th:nth-child(2),
.sync-status-table td:nth-child(2) { width: 440px; }

.sync-status-table th:nth-child(3),
.sync-status-table td:nth-child(3) {
    width: 580px;
    word-break: break-all;
    white-space: normal;
}

.sync-status-table th:nth-child(4),
.sync-status-table td:nth-child(4) { width: 110px; }

/* ========== 时间显示容器 ========== */
.sync-time-cell {
    min-width: 0;
    width: 100%;
    white-space: normal;
    vertical-align: top;
    flex: 1;
}

.sync-time-viewport {
    height: 1.5em;
    overflow: hidden;
    position: relative;
}

.sync-time-scroller {
    display: block;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

.sync-time-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.update-label {
    flex-shrink: 0;
    width: 180px;
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== ✅ 关键：悬停就地切换相对/绝对时间（修复截断 + 悬停空白） ========== */
.update-time-wrapper {
    position: relative;
    display: inline-block;
    min-width: 100px;
    max-width: 180px;
    height: 1.5em;
    cursor: default;
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: max-width 0.2s ease;
    box-sizing: border-box;
    flex-shrink: 0;
}

.update-time-wrapper .relative-time,
.update-time-wrapper .absolute-time {
    display: block;
    width: auto;
    min-width: 100%;
    height: 100%;
    line-height: 1.5em;
    padding: 0 4px;
    box-sizing: border-box;
    white-space: nowrap;
}

.update-time-wrapper .relative-time {
    visibility: visible;
}

.update-time-wrapper .absolute-time {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(240, 240, 240, 0.85);
    color: #333;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.95rem;
    display: none;
    z-index: 10;
    width: auto;
    min-width: 100%;
    max-width: 250px;
    overflow: visible;
}

.update-time-wrapper:hover {
    max-width: 250px !important;
    min-width: 150px !important;
    width: auto !important;
}

.update-time-wrapper:hover .relative-time {
    visibility: hidden;
}

.update-time-wrapper:hover .absolute-time {
    display: block;
}

/* ========== 备案信息 ========== */
.beian-island {
    background: #FFFFFF;
    border: 2px solid #A9A9A9;
    border-radius: 14px;
    padding: 16px 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 2.5rem auto 1rem auto;
    text-align: center;
}

.beian-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    font-weight: 600;
}

.beian-link {
    color: #495057 !important;
    text-decoration: none !important;
}

.beian-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.beian-icon {
    width: 14px;
    height: 18px;
    vertical-align: text-bottom;
}

/* ========== 响应式：小屏堆叠 ========== */
@media (max-width: 768px) {
    .sync-status-table {
        table-layout: auto;
        font-size: 0.85rem;
    }

    .sync-status-table th,
    .sync-status-table td {
        padding: 8px 10px;
        width: auto !important;
        display: block;
        text-align: left;
    }

    .sync-status-table thead {
        display: none;
    }

    .sync-status-table tr {
        display: block;
        margin-bottom: 1rem;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
    }

    .sync-status-table td::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        display: inline-block;
        width: 120px;
    }

    .sync-status-table td:nth-child(1)::before { content: "Name: "; }
    .sync-status-table td:nth-child(2)::before { content: "Last Update: "; }
    .sync-status-table td:nth-child(3)::before { content: "Upstream: "; }
    .sync-status-table td:nth-child(4)::before { content: "Status: "; }
}
.chart-container-1 {
    display: flex;
    flex-direction: column; /* 将子元素按列排列 */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中，如果父容器有固定高度或是在视口中央则有效 */
    width: 100%; /* 确保容器宽度占满其父元素 */
    height: 800px; /* 或者设置一个具体的高度 */
    padding: 20px; /* 可选：给容器内部增加一些填充 */
}
.chart-container-2 {
    display: flex;
    flex-direction: column; /* 将子元素按列排列 */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中，如果父容器有固定高度或是在视口中央则有效 */
    width: 100%; /* 确保容器宽度占满其父元素 */
    height: 800px; /* 或者设置一个具体的高度 */
    padding: 20px; /* 可选：给容器内部增加一些填充 */
}
.chart-container-3 {
    display: flex;
    flex-direction: column; /* 将子元素按列排列 */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中，如果父容器有固定高度或是在视口中央则有效 */
    width: 100%; /* 确保容器宽度占满其父元素 */
    height: 800px; /* 或者设置一个具体的高度 */
    padding: 20px; /* 可选：给容器内部增加一些填充 */
}
.chart-container-5 {
    display: flex;
    flex-direction: column; /* 将子元素按列排列 */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中，如果父容器有固定高度或是在视口中央则有效 */
    width: 100%; /* 确保容器宽度占满其父元素 */
    height: 800px; /* 或者设置一个具体的高度 */
    padding: 20px; /* 可选：给容器内部增加一些填充 */
}