/* ============================================
   AI智慧消防安全管控平台 - Windows测试版
   消防主题视觉设计
   ============================================ */

/* ========== 全局基础 ========== */
* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: #f0f2f5;
    color: #333;
    overflow: hidden;
    height: 100vh;
}
#app { display:flex; flex-direction:column; height:100vh; }

/* ========== Hero横幅 ========== */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 25%, #d32f2f 50%, #e53935 75%, #ff5722 100%);
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(198,40,40,0.4);
}

/* 火焰粒子背景 */
.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.fire-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: fireFloat 4s ease-in-out infinite;
}

.fire-p1 {
    width: 120px; height: 120px;
    background: radial-gradient(circle, #ff9800, transparent);
    top: -20px; left: 10%;
    animation-delay: 0s;
}
.fire-p2 {
    width: 80px; height: 80px;
    background: radial-gradient(circle, #ffc107, transparent);
    top: -10px; left: 35%;
    animation-delay: 1s;
}
.fire-p3 {
    width: 100px; height: 100px;
    background: radial-gradient(circle, #ff5722, transparent);
    top: -15px; left: 65%;
    animation-delay: 2s;
}
.fire-p4 {
    width: 60px; height: 60px;
    background: radial-gradient(circle, #ffea00, transparent);
    top: -5px; left: 85%;
    animation-delay: 0.5s;
}

.hero-shield {
    position: absolute;
    right: 40px; top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.08;
    filter: blur(1px);
}

@keyframes fireFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.12; }
    50% { transform: translateY(-15px) scale(1.1); opacity: 0.2; }
}

/* Hero内容 */
.hero-content { position: relative; z-index: 2; padding: 14px 28px 10px; }

.hero-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.hero-logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-icon {
    font-size: 40px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    animation: heroIconPulse 2s ease-in-out infinite;
}

@keyframes heroIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.hero-title-block { display: flex; flex-direction: column; gap: 2px; }

.hero-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin: 0;
}

.hero-subtitle {
    font-size: 13px;
    opacity: 0.85;
    letter-spacing: 6px;
    font-weight: 300;
}

.hero-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    background: rgba(76,175,80,0.25);
    padding: 4px 14px;
    border-radius: 14px;
    border: 1px solid rgba(76,175,80,0.4);
}

.hero-status-dot {
    width: 8px; height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,175,80,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(76,175,80,0); }
}

.hero-time {
    font-size: 13px;
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
    background: rgba(0,0,0,0.15);
    padding: 4px 12px;
    border-radius: 8px;
}

/* 标语横排 */
.hero-slogans {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.slogan-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: sloganGlow 3s ease-in-out infinite;
}

.slogan-fire {
    background: rgba(255,87,34,0.35);
    animation-delay: 0s;
}
.slogan-safe {
    background: rgba(76,175,80,0.3);
    animation-delay: 0.5s;
}
.slogan-prevent {
    background: rgba(255,193,7,0.3);
    animation-delay: 1s;
}
.slogan-ai {
    background: rgba(33,150,243,0.3);
    animation-delay: 1.5s;
}
.slogan-life {
    background: rgba(233,30,99,0.3);
    animation-delay: 2s;
}

@keyframes sloganGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(255,255,255,0.05); }
    50% { box-shadow: 0 0 16px rgba(255,255,255,0.12); }
}

.slogan-icon { font-size: 16px; }

/* ========== 安全滚动条 ========== */
.safety-bar {
    background: linear-gradient(90deg, #fff3e0, #fffde7, #fff3e0);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #ffe0b2;
    height: 36px;
    display: flex;
    align-items: center;
}

.safety-bar-scroll {
    display: flex;
    gap: 40px;
    animation: scrollSafety 30s linear infinite;
    white-space: nowrap;
    font-size: 13px;
    color: #e65100;
    font-weight: 500;
    padding: 0 20px;
}

@keyframes scrollSafety {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== 主体布局 ========== */
.main-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 210px;
    background: linear-gradient(180deg, #1a237e 0%, #0d1442 40%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    box-shadow: 4px 0 16px rgba(0,0,0,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    color: #fff;
}

.sidebar-logo span:first-child {
    font-size: 30px;
    filter: drop-shadow(0 2px 6px rgba(244,67,54,0.5));
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-logo-text small {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
}

.sidebar-logo-text strong {
    font-size: 15px;
    letter-spacing: 2px;
    color: #4fc3f7;
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    margin: 0 14px 6px;
}

/* 导航项 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(79,195,247,0.1);
    color: #4fc3f7;
    border-left-color: #4fc3f7;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.nav-text { flex: 1; }

.nav-active-bar {
    display: none;
    width: 6px; height: 6px;
    background: #4fc3f7;
    border-radius: 50%;
}
.nav-item.active .nav-active-bar { display: block; }

/* 导航分隔线 */
.nav-divider {
    padding: 8px 16px 4px;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-divider-text {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 侧边栏底部标语 */
.sidebar-bottom {
    margin-top: auto;
    padding: 14px;
}

.sidebar-slogan {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-slogan span {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 1px;
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    background: #f0f2f5;
}

.page-content {
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity:0; transform: translateY(12px); }
    to { opacity:1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* 页面标题 */
.page-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 4px;
}

.page-desc {
    font-size: 13px;
    color: #888;
}


/* ========== 底部栏 + 告警指示器 + 告警弹窗 + 滚动条 + 响应式 ========== */
/* ========== 告警指示器 (修改2) ========== */
.alert-indicator {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(0,0,0,0.12);
    transition: all 0.3s;
}

.alert-indicator:hover {
    background: rgba(0,0,0,0.2);
}

.alert-bell {
    font-size: 18px;
    transition: transform 0.3s;
}

/* 告警脉冲动画 */
.alert-indicator.alert-pulse {
    background: rgba(244,67,54,0.25);
    animation: alertIndicatorPulse 0.8s ease-in-out infinite;
}

.alert-indicator.alert-pulse .alert-bell {
    animation: alertBellShake 0.5s ease-in-out infinite;
}

@keyframes alertIndicatorPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244,67,54,0.6);
    }
    50% {
        box-shadow: 0 0 12px 4px rgba(244,67,54,0.3);
    }
}

@keyframes alertBellShake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(15deg); }
    60% { transform: rotate(-10deg); }
    80% { transform: rotate(10deg); }
}

/* 告警计数徽章 */
.alert-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #f44336;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 5px;
    border: 2px solid #fff;
    transition: transform 0.3s;
}

.alert-count-badge.alert-count-bounce {
    animation: alertCountBounce 0.4s ease;
}

@keyframes alertCountBounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
}

/* 告警级别颜色 */
.alert-indicator.alert-level-1 { background: rgba(244,67,54,0.3); }
.alert-indicator.alert-level-2 { background: rgba(255,152,0,0.25); }
.alert-indicator.alert-level-3 { background: rgba(255,193,7,0.2); }

/* ========== 强制告警弹窗 (修改2) ========== */
.alert-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    animation: alertOverlayIn 0.3s ease;
}

@keyframes alertOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-popup-overlay.alert-popup-fadeout {
    animation: alertOverlayOut 0.3s ease forwards;
}

@keyframes alertOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.alert-popup-card {
    position: relative;
    max-width: 520px;
    width: 90%;
    padding: 36px 32px 28px;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    animation: alertCardIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertCardIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 级别背景 */
.alert-popup-critical {
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 50%, #f44336 100%);
    border: 3px solid #ff5252;
}

.alert-popup-warning {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 50%, #ff9800 100%);
    border: 3px solid #ffb74d;
}

.alert-popup-info {
    background: linear-gradient(135deg, #f57f17 0%, #fbc02d 50%, #ffeb3b 100%);
    border: 3px solid #fff176;
    color: #333;
}

/* 红色闪烁 */
.alert-popup-card.alert-flash {
    animation:
        alertCardIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        alertCriticalFlash 0.8s ease-in-out 0.4s infinite;
}

@keyframes alertCriticalFlash {
    0%, 100% { border-color: #ff5252; }
    50% { border-color: #ffcdd2; box-shadow: 0 0 30px rgba(244,67,54,0.5); }
}

.alert-popup-icon {
    font-size: 56px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.alert-popup-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.alert-popup-message {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 8px;
    line-height: 1.5;
}

.alert-popup-id {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 20px;
    font-family: monospace;
    letter-spacing: 1px;
}

.alert-popup-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 36px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 2px;
    outline: none;
}

.alert-popup-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.alert-popup-btn:active {
    transform: scale(0.97);
}

/* 告警弹窗操作按钮行 */
.alert-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* 最小化按钮 — 灰色次要按钮 */
.alert-btn-minimize {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    padding: 10px 24px;
}

.alert-btn-minimize:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}

/* 已确认状态 */
.alert-acknowledged {
    opacity: 0.85;
}

.alert-acknowledged .alert-popup-btn {
    opacity: 0.5;
    pointer-events: none;
}

/* 最小化后的浮动条 */
.alert-minimized-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    animation: slideDown 0.3s ease;
}

.alert-minimized-bar.alert-popup-critical {
    background: linear-gradient(90deg, #b71c1c, #d32f2f);
}

.alert-minimized-bar.alert-popup-warning {
    background: linear-gradient(90deg, #e65100, #ef6c00);
}

.alert-minimized-bar.alert-popup-info {
    background: linear-gradient(90deg, #f57f17, #f9a825);
}

.alert-minimized-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.alert-minimized-restore {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.alert-minimized-restore:hover {
    background: rgba(255,255,255,0.35);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

.btn-evacuate, .alert-btn-evacuate {
    background: rgba(255,255,255,0.15);
    border-color: #ff5252;
    font-size: 18px;
    padding: 14px 48px;
}

.btn-confirm, .alert-btn-confirm {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.5);
}

.btn-ack, .alert-btn-ack {
    background: rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.2);
    color: #333;
}

/* ========== 底部栏 ========== */
.footer-bar {
    height: 36px;
    background: linear-gradient(90deg, #1a237e, #0d1442);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: 12px;
    flex-shrink: 0;
    z-index: 100;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-sep {
    opacity: 0.3;
}

.footer-right span {
    transition: color 0.2s;
}
.footer-right span:hover {
    color: #4fc3f7;
    cursor: default;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 7px; height: 7px; }

::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .simulate-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-logo-text, .nav-text, .sidebar-slogan, .sidebar-divider { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .kpi-row { grid-template-columns: 1fr; }
    .chart-row { grid-template-columns: 1fr; }
    .zone-cards { grid-template-columns: 1fr; }
    .hero-title { font-size: 16px; letter-spacing: 1px; }
    .hero-subtitle { display: none; }
    .hero-slogans { gap: 4px; }
    .slogan-item { font-size: 11px; padding: 4px 10px; }
    .bim-toolbar { flex-direction: column; }
    .bim-stats-bar { gap: 12px; font-size: 10px; }
    .bim-legend-panel { display: none; }
}

