﻿body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    background: rgba(15, 23, 42, 0.8);
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    color: #00f2fe;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card h3 {
    margin-top: 0;
    color: #a1a1a1;
    font-size: 16px;
    margin-bottom: 15px;
}

.card p {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 0;
    color: #00f2fe;
    font-family: 'Orbitron', sans-serif;
}

.card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: rgba(0, 242, 254, 0.7);
}

.total {
    border-top: 2px solid rgba(52, 152, 219, 0.7);
}

.healthy {
    border-top: 2px solid rgba(46, 204, 113, 0.7);
}
.healthy i,
.healthy h3,
.healthy p {
    color: #2ecc71 !important;
}

.unhealthy {
    border-top: 2px solid rgba(231, 76, 60, 0.7);
}
.unhealthy i,
.unhealthy h3,
.unhealthy p {
    color: #e74c3c !important;
}

.availability {
    border-top: 2px solid rgba(155, 89, 182, 0.7);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

.pagination button {
    padding: 8px 16px;
    background-color: #1e88e5;  /* 更鲜艳的蓝色 */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination button:hover:not(:disabled) {
    background-color: #1565c0;  /* 更深的蓝色 */
}

.pagination button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#page-info {
    font-size: 16px;
    color: white;
}

#api-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

#api-table th, #api-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#api-table th {
    background: rgba(0, 242, 254, 0.1);
    color: #00f2fe;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

#api-table tr:hover td {
    background: rgba(0, 242, 254, 0.05);
}

.details-btn {
    background: transparent;
    color: #00f2fe;
    border: 1px solid #00f2fe;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.details-btn:hover {
    background: rgba(0, 242, 254, 0.1);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

/* API详情弹窗样式 */
.api-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: rgba(30, 30, 40, 0.9);
    border: 1px solid #00f2fe;
    border-radius: 8px;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #00f2fe;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    color: #fff;
    transform: scale(1.2);
}

.modal-content h3 {
    color: #00f2fe;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.history-title {
    color: #00f2fe;
    margin-top: 25px;
    margin-bottom: 15px;
    text-align: left;
    font-size: 18px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.3);
    padding-bottom: 8px;
}

.history-container {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
}

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

.history-table th, 
.history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table th {
    background: rgba(15, 23, 42, 0.95);  /* 更不透明的背景色 */
    border-bottom: 2px solid rgba(0, 242, 254, 0.3);  /* 添加边框增强视觉分隔 */
    color: #00f2fe;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(5px);  /* 添加模糊效果增强可读性 */
}

/* 历史记录分页样式 */
.history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.history-prev-page,
.history-next-page {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid #00f2fe;
    color: #00f2fe;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    outline: none;
    user-select: none;
}

.history-prev-page:hover:not(:disabled),
.history-next-page:hover:not(:disabled) {
    background: rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
    transform: translateY(-1px);
}

.history-prev-page:active:not(:disabled),
.history-next-page:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 0 4px rgba(0, 242, 254, 0.3);
}

.history-prev-page:disabled,
.history-next-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(0, 242, 254, 0.3);
    color: rgba(0, 242, 254, 0.5);
    background: rgba(0, 242, 254, 0.05);
    transform: none;
    box-shadow: none;
}

.history-page-info {
    color: #e0e0e0;
    font-size: 14px;
    text-align: center;
    min-width: 200px;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table tr:hover td {
    background: rgba(0, 242, 254, 0.05);
}

.history-table .status-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.history-table .status-indicator.healthy {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.5);
}

.history-table .status-indicator.unhealthy {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.history-table .no-history {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
}

/* 自定义滚动条 */
.history-container::-webkit-scrollbar {
    width: 6px;
}

.history-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.3);
    border-radius: 10px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 254, 0.5);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding-bottom: 8px;
}

.modal-label {
    color: #aaa;
    font-weight: bold;
}

.modal-value {
    color: #e0e0e0;
    text-align: center;
    display: block;
    margin: 0 auto;
}

.modal-value.healthy {
    color: #2ecc71;
}

.modal-value.unhealthy {
    color: #e74c3c;
}

@media (max-width: 600px) {
    .modal-content {
        width: 90%;
        padding: 15px;
    }
    
    .modal-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .history-pagination {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .history-prev-page,
    .history-next-page {
        min-width: 100px;
        padding: 10px 20px;
        font-size: 16px;
    }
    
    .history-page-info {
        min-width: auto;
        font-size: 13px;
    }
}

.status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
}

.status::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes breathe-healthy {
    0% {
        box-shadow: 0 0 3px rgba(0, 255, 157, 0.4), 0 0 5px rgba(0, 255, 157, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
    50% {
        box-shadow: 0 0 6px rgba(0, 255, 157, 0.6), 0 0 10px rgba(0, 255, 157, 0.3);
        opacity: 0.9;
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 3px rgba(0, 255, 157, 0.4), 0 0 5px rgba(0, 255, 157, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
}

.status.healthy {
    background-color: #00ff9d;
    animation: breathe-healthy 2.5s infinite ease-in-out;
    z-index: 1;
    filter: drop-shadow(0 0 1px rgba(0, 255, 157, 0.5));
}

.status.healthy::after {
    background-color: rgba(0, 255, 157, 0.5);
    animation: pulse 2s infinite;
    z-index: 0;
}

@keyframes breathe-unhealthy {
    0% {
        box-shadow: 0 0 3px rgba(255, 45, 117, 0.4), 0 0 5px rgba(255, 45, 117, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
    50% {
        box-shadow: 0 0 6px rgba(255, 45, 117, 0.6), 0 0 10px rgba(255, 45, 117, 0.3);
        opacity: 0.9;
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 3px rgba(255, 45, 117, 0.4), 0 0 5px rgba(255, 45, 117, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
}

.status.unhealthy {
    background-color: #ff2d75;
    animation: breathe-unhealthy 2.5s infinite ease-in-out;
    z-index: 1;
    filter: drop-shadow(0 0 1px rgba(255, 45, 117, 0.5));
}

.status.unhealthy::after {
    background-color: rgba(255, 45, 117, 0.5);
    animation: pulse 2s infinite;
    z-index: 0;
}

.status.unknown {
    background-color: #808080;
    animation: breathe-unknown 2.5s infinite ease-in-out;
    z-index: 1;
    filter: drop-shadow(0 0 1px rgba(128, 128, 128, 0.5));
}

.status.unknown::after {
    background-color: rgba(128, 128, 128, 0.5);
    animation: pulse 2s infinite;
    z-index: 0;
}

@keyframes breathe-unknown {
    0% {
        box-shadow: 0 0 3px rgba(128, 128, 128, 0.4), 0 0 5px rgba(128, 128, 128, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
    50% {
        box-shadow: 0 0 6px rgba(128, 128, 128, 0.6), 0 0 10px rgba(128, 128, 128, 0.3);
        opacity: 0.9;
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 3px rgba(128, 128, 128, 0.4), 0 0 5px rgba(128, 128, 128, 0.2);
        opacity: 0.7;
        transform: scale(0.97);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }

    .container {
        padding: 15px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card {
        padding: 15px;
    }

    .card p {
        font-size: 24px;
    }

    #api-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    #api-table th, 
    #api-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #api-table th, 
    #api-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card p {
        font-size: 20px;
    }
}
    th {
        padding: 12px 16px; /* 调整单元格内边距 */
    }
    th img {
        margin-right: 10px;
        width: 22px;
        height: 22px;
        vertical-align: middle; /* 添加垂直对齐属性 */
    }

/* 新增：选项卡样式 */
.analysis-tabs {
    display: flex;
    margin: 30px 0 20px 0;
    border-bottom: 2px solid rgba(0, 242, 254, 0.2);
}

.tab-btn {
    background: transparent;
    border: none;
    color: #a1a1a1;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.05);
}

.tab-btn.active {
    color: #00f2fe;
    border-bottom-color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* 图表容器样式 */
.chart-container {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-container h3 {
    color: #00f2fe;
    margin-bottom: 20px;
    text-align: center;
}

.chart-container canvas {
    max-width: 100%;
    height: 400px !important;
    max-height: 400px !important;
}

/* 性能分析样式 */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.performance-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-card h3 {
    color: #00f2fe;
    margin-bottom: 20px;
    text-align: center;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    color: #a1a1a1;
    font-weight: 500;
}

.metric-value {
    color: #00f2fe;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

.category-analysis {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-analysis h3 {
    color: #00f2fe;
    margin-bottom: 20px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 4px solid #00f2fe;
}

.category-name {
    font-weight: 500;
    color: #e0e0e0;
}

.category-metrics {
    display: flex;
    gap: 20px;
}

.category-metric {
    text-align: center;
}

.category-metric-label {
    font-size: 12px;
    color: #a1a1a1;
    display: block;
}

.category-metric-value {
    font-size: 16px;
    font-weight: bold;
    color: #00f2fe;
    font-family: 'Orbitron', sans-serif;
}

/* SLA统计样式 */
.sla-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sla-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sla-card h3 {
    color: #00f2fe;
    margin-bottom: 20px;
}

.sla-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    font-weight: bold;
}

.sla-status .status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.sla-status .status-indicator.compliant {
    background-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.sla-status .status-indicator.non-compliant {
    background-color: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.sla-details {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sla-details h3 {
    color: #00f2fe;
    margin-bottom: 20px;
}

#sla-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    overflow: hidden;
}

#sla-table th,
#sla-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sla-table th {
    background: rgba(0, 242, 254, 0.1);
    color: #00f2fe;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

#sla-table tr:hover td {
    background: rgba(0, 242, 254, 0.05);
}

.sla-compliant {
    color: #2ecc71 !important;
    font-weight: bold;
}

.sla-non-compliant {
    color: #e74c3c !important;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .analysis-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .sla-overview {
        grid-template-columns: 1fr;
    }
    
    .category-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .category-metrics {
        justify-content: center;
    }
    
    .chart-container {
        padding: 15px;
    }
}

/* 更新时间显示样式 */
.operation-desc {
    text-align: center;
    margin: 20px 0;
    color: #a1a1a1;
}

.operation-desc p {
    margin: 8px 0;
}

.update-time-info {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 242, 254, 0.05);
    border-radius: 8px;
    border-left: 4px solid #00f2fe;
}

.update-time-info p {
    margin: 0;
    color: #00f2fe;
    font-weight: 500;
}

.update-time-info i {
    margin-right: 8px;
}

#last-updated-time,
#trends-updated-time,
#performance-updated-time,
#sla-updated-time {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    color: #e0e0e0;
}