/* 网站监控系统 - 自定义样式 */

:root {
    --status-up: #28a745;
    --status-down: #dc3545;
    --status-warning: #ffc107;
    --status-unknown: #6c757d;
}

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

/* 卡片样式 */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: none;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f1f3f5;
    padding: 1rem 1.25rem;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* 状态指示器 */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-up .status-indicator {
    background-color: var(--status-up);
}

.status-down .status-indicator {
    background-color: var(--status-down);
}

.status-warning .status-indicator {
    background-color: var(--status-warning);
}

.status-unknown .status-indicator {
    background-color: var(--status-unknown);
}

/* 表格样式 */
.table {
    background-color: #fff;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f1f3f5;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-group .btn {
    border-radius: 4px;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 4px;
}

#unread-alerts-badge {
    font-size: 0.75rem;
    vertical-align: top;
}

/* 告警列表 */
.list-group-item {
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.list-group-item-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* 统计卡片 */
.card.text-white h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.card.text-white .card-title {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 表单样式 */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
}

/* 页脚 */
footer {
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .card.text-white h2 {
        font-size: 2rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* 加载动画 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* 链接样式 */
a {
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* 小号文本 */
.text-muted {
    color: #6c757d !important;
}

small,
.small {
    font-size: 0.875em;
}
