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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f8fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.report-time {
    color: #666;
    font-size: 14px;
}

.overview {
    background: white;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.overview-header {
    margin-bottom: 10px;
}

.overview-header .status-banner {
    margin-bottom: 0;
}

.overview-cards {
    display: flex;
    gap: 10px;
}

.overview-card {
    flex: 1;
    padding: 0;
    border-radius: 6px;
    display: flex;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.2s ease;
    overflow: hidden;
    min-height: 60px;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.overview-card .status-bar {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    padding: 6px 0;
}

.overview-card .content {
    flex: 1;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.overview-card.ok .status-bar {
    background: #28a745;
}

.overview-card.down .status-bar {
    background: #dc3545;
}

.overview-card.paused .status-bar {
    background: #ffc107;
}

.overview-value {
    font-size: 22px;
    font-weight: 600;
}

.overview-card.ok .overview-value {
    color: #28a745;
}

.overview-card.down .overview-value {
    color: #dc3545;
}

.overview-card.paused .overview-value {
    color: #ffc107;
}

.overview-label {
    font-size: 13px;
    color: #6c757d;
}

.status-banner {
    background: #f0f9f0;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #d4edda;
}

.status-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-banner-icon {
    width: 32px;
    height: 32px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.status-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.status-banner-desc {
    font-size: 13px;
    color: #5a8c5a;
}

.monitors-section {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.monitors-section h2 {
    font-size: 18px;
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    font-weight: 600;
}

.section-en {
    color: #999;
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
}

.table-container {
    width: 100%;
}

.monitor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.monitor-table th,
.monitor-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.monitor-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* 状态列宽度固定，防止文字换行 */
.monitor-table th:first-child,
.monitor-table td:first-child {
    min-width: 80px;
    white-space: nowrap;
}

.monitor-table tbody tr:hover {
    background: #f8f9fa;
}

.monitor-table .loading {
    text-align: center;
    color: #999;
    padding: 30px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.up {
    color: #28a745;
}

.status-badge.up::before {
    background: #28a745;
}

.status-badge.down {
    color: #dc3545;
}

.status-badge.down::before {
    background: #dc3545;
}

.status-badge.paused {
    color: #ffc107;
}

.status-badge.paused::before {
    background: #ffc107;
}

.status-badge.unknown {
    color: #6c757d;
}

.status-badge.unknown::before {
    background: #6c757d;
}

.uptime-badge {
    color: #28a745;
    font-weight: 600;
    text-align: center;
    font-size: 18px;
    margin-bottom: 5px;
}

.uptime-dots-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 5px 0;
}

.uptime-dots-wrapper > .uptime-date-label {
    font-size: 11px;
    color: #666;
    margin: 0 5px 0 0;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.uptime-dots-container {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-height: 52px;
}

.uptime-dots {
    display: flex;
    gap: 2px;
    flex: 1;
    flex-wrap: wrap;
    padding: 2px 0;
    max-height: 52px;
    overflow: hidden;
}

.uptime-date-label.today {
    font-size: 11px;
    color: #666;
    margin: 0 0 0 5px;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

.uptime-stats {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

.uptime-dot {
    width: 6px;
    height: 24px;
    border-radius: 2px;
    background: #e9ecef;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.uptime-dot:hover {
    transform: scaleY(1.2);
    opacity: 0.8;
}

.uptime-dot.up {
    background: #28a745;
}

.uptime-dot.down {
    background: #dc3545;
}

.uptime-dot.maintenance {
    background: #ffc107;
}

.logs-section {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.logs-section h2 {
    font-size: 18px;
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    font-weight: 600;
}

.logs-container {
    position: relative;
}

.log-order-btn {
    position: absolute;
    top: -5px;
    right: 0;
    padding: 5px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    color: #495057;
    transition: all 0.2s ease;
}

.log-order-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.logs-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.logs-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.logs-list li.loading {
    text-align: center;
    color: #999;
    padding: 30px;
}

.log-time {
    color: #6c757d;
    margin-right: 10px;
    font-size: 12px;
}

.log-status {
    margin-right: 10px;
    font-weight: 600;
    font-size: 12px;
}

.log-status.up {
    color: #28a745;
}

.log-status.down {
    color: #dc3545;
}

.log-monitor {
    color: #495057;
}

.log-message {
    color: #6c757d;
    margin-left: 10px;
    font-size: 12px;
}

/* 浮动窗口样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 90%;
    width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #495057;
}

.modal-content {
    padding: 20px;
}

.close-btn {
    padding: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #c82333;
    transform: rotate(90deg);
}

.details-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.details-header h3 {
    font-size: 18px;
    color: #495057;
    margin: 0;
}

.details-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .details-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .details-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

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

.chart-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chart-item canvas {
    flex: 1;
    min-height: 0;
}

.chart-item h4 {
    font-size: 16px;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

.detail-logs {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.detail-logs li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.detail-logs li.loading {
    text-align: center;
    color: #999;
    padding: 30px;
}

.detail-logs li.error {
    text-align: center;
    color: #dc3545;
    padding: 30px;
}

/* 加载动画 */
@keyframes loading-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: loading-pulse 1.5s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .overview-cards {
        flex-direction: column;
    }
    
    .monitor-table th,
    .monitor-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .details-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* 监控名称点击效果 */
.monitor-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.monitor-row:hover {
    background-color: #f8f9fa;
}

.monitor-table td:nth-child(3) {
    transition: color 0.2s ease;
}

.monitor-table td:nth-child(3):hover {
    color: #007bff;
    text-decoration: underline;
}