/* Server Monitor CSS */

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

html, body {
    background-color: #fff;
    color: #636b6f;
    font-family: 'Raleway', sans-serif;
    font-weight: 100;
    margin: 0;
    padding: 20px 0;
    min-height: 100vh;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 30px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 30px;
    position: relative;
}

.header h1 {
    font-size: 72px;
    font-weight: 100;
    color: #636b6f;
    margin-bottom: 20px;
    display: inline-block;
}

.back-home {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 14px;
    color: #636b6f;
    text-decoration: none;
    letter-spacing: .1rem;
    transition: color 0.3s;
}

.back-home:hover {
    color: #000;
}

.update-time {
    color: #636b6f;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .1rem;
}

.status-badge {
    display: inline-block;
    padding: 6px 18px;
    margin-left: 15px;
    border: 1px solid #636b6f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1rem;
    text-transform: uppercase;
}

.status-healthy {
    color: #10b981;
    border-color: #10b981;
}

.status-warning {
    color: #f59e0b;
    border-color: #f59e0b;
}

.status-critical {
    color: #ef4444;
    border-color: #ef4444;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 30px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #636b6f;
    box-shadow: 0 2px 8px rgba(99, 107, 111, 0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .1rem;
    text-transform: uppercase;
    color: #636b6f;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.metric {
    margin-bottom: 20px;
}

.metric-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
    letter-spacing: .05rem;
    text-transform: uppercase;
}

.metric-value {
    font-size: 32px;
    font-weight: 100;
    color: #636b6f;
    line-height: 1.2;
}

.metric-unit {
    font-size: 16px;
    color: #9ca3af;
    margin-left: 8px;
    font-weight: 400;
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.progress-healthy {
    background: #10b981;
}

.progress-warning {
    background: #f59e0b;
}

.progress-critical {
    background: #ef4444;
}

.service-status {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.service-status:last-child {
    border-bottom: none;
}

.service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
}

.service-running {
    background: #10b981;
}

.service-stopped {
    background: #ef4444;
}

.service-name {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    color: #636b6f;
}

.service-info {
    font-size: 12px;
    color: #9ca3af;
}

.chart-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 40px;
    margin-bottom: 40px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .1rem;
    text-transform: uppercase;
    color: #636b6f;
    margin-bottom: 30px;
}

.footer {
    text-align: center;
    color: #9ca3af;
    margin-top: 60px;
    padding: 40px 0;
    font-size: 12px;
    letter-spacing: .05rem;
}

.footer a {
    color: #636b6f;
    text-decoration: none;
}

.footer a:hover {
    color: #333;
}

canvas {
    max-width: 100%;
    height: auto !important;
}

.loading {
    text-align: center;
    color: #636b6f;
    font-size: 18px;
    padding: 60px;
    font-weight: 400;
}

/* 热力图样式 */
.heatmap-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 30px;
    margin-bottom: 60px;
    overflow: visible;
}

.heatmap-title {
    font-size: 18px;
    font-weight: 600;
    color: #636b6f;
    margin-bottom: 20px;
    text-align: center;
}

.heatmap-subtitle {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 20px;
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: visible;
    padding: 5px;
}

.heatmap-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.heatmap-label {
    width: 50px;
    font-size: 11px;
    color: #9ca3af;
    text-align: right;
    padding-right: 8px;
    flex-shrink: 0;
}

.heatmap-cells {
    display: flex;
    gap: 2px;
    overflow: visible;
}

.heatmap-cell {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #ebedf0;
    cursor: pointer;
    transition: transform 0.1s;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.heatmap-cell[data-pressure="0"] { background: #ebedf0; }
.heatmap-cell[data-level="0"] { background: #ebedf0; }
.heatmap-cell[data-level="1"] { background: #0d5f2c; }
.heatmap-cell[data-level="2"] { background: #1b7a3d; }
.heatmap-cell[data-level="3"] { background: #2ea44f; }
.heatmap-cell[data-level="4"] { background: #57d176; }
.heatmap-cell[data-level="5"] { background: #a8e6cf; }
.heatmap-cell[data-level="6"] { background: #fff59d; }
.heatmap-cell[data-level="7"] { background: #ffcc80; }
.heatmap-cell[data-level="8"] { background: #ff9800; }
.heatmap-cell[data-level="9"] { background: #f4511e; }
.heatmap-cell[data-level="10"] { background: #c62828; }

.heatmap-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    font-size: 11px;
    color: #9ca3af;
}

.heatmap-legend-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.heatmap-day-labels {
    display: flex;
    margin-left: 58px;
    gap: 2px;
    margin-bottom: 5px;
}

.heatmap-day-label {
    width: 18px;
    font-size: 9px;
    color: #9ca3af;
    text-align: center;
}

.heatmap-tooltip {
    position: fixed;
    background: #24292f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 48px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .chart-container {
        padding: 20px;
    }
}
