/* ========= 全局样式 ========= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background: #030614;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.platform {
    width: 100vw;
    height: 100vh;
    background: #0c1120;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========= 头部导航栏 ========= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: #0b111e;
    border-bottom: 1px solid #202b3e;
    flex-shrink: 0;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.insignia {
    background: #0a4c7a;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 26px;
    color: white;
    box-shadow: 0 0 0 2px rgba(0, 160, 255, 0.5);
}

.title h2 {
    color: #ecf3ff;
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.title span {
    color: #7b91b0;
    font-size: 0.9rem;
}

.global-status {
    display: flex;
    gap: 24px;
}

.status-chip {
    background: #16202f;
    border-radius: 40px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #2d3e59;
    color: #bdd0f0;
    font-size: 1rem;
}

.dot-online {
    width: 12px;
    height: 12px;
    background: #2bc48a;
    border-radius: 50%;
    box-shadow: 0 0 10px #2bc48a;
}

.dot-warning {
    width: 12px;
    height: 12px;
    background: #f97316;
    border-radius: 50%;
    box-shadow: 0 0 10px #f97316;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-btn {
    background: #1e3153;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #d6e8ff;
    cursor: pointer;
    border: 2px solid #3e6b9e;
    transition: all 0.2s;
    position: relative;
}

.menu-btn:hover {
    background: #2a4985;
    transform: scale(1.05);
    border-color: #70b9ff;
}

.menu-btn.active {
    background: #2d7fd3;
    border-color: #aad0ff;
}

.user-badge {
    background: #182337;
    border-radius: 40px;
    padding: 8px 20px 8px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #3e5270;
}

.avatar {
    background: #2565ae;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

/* ========= 弹窗菜单 ========= */
.menu-dropdown {
    position: absolute;
    top: 95px;
    right: 32px;
    width: 300px;
    background: #132237;
    border-radius: 28px;
    border: 2px solid #2d5a9a;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 0 2px #70b9ff inset;
    z-index: 100;
    display: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.menu-dropdown.show {
    display: block;
    animation: menuSlide 0.2s ease;
}

@keyframes menuSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-header {
    background: #0a3460;
    padding: 20px 24px;
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
    border-bottom: 2px solid #4f9eff;
}

.menu-item {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d0e4ff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    font-size: 1.1rem;
}

.menu-item i {
    font-style: normal;
    font-size: 1.6rem;
    width: 36px;
}

.menu-item:hover {
    background: #1e3f64;
    color: white;
    border-left: 4px solid #70b9ff;
}

.menu-item.active-menu {
    background: #2a4985;
    color: white;
    border-left: 4px solid #ffb347;
}

.menu-divider {
    height: 1px;
    background: #2d4a7a;
    margin: 8px 0;
}

/* ========= 右侧内容区 ========= */
.content-area {
    flex: 1;
    background: #0e1422;
    overflow-y: auto;
    padding: 0;
    height: 0;
    min-height: 0;
}

/* ========= 消息弹窗区域 ========= */
.message-panel {
    position: fixed;
    bottom: 100px;
    right: 32px;
    width: 420px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
}

.message-card {
    background: #1a2a45;
    border-radius: 28px;
    border: 2px solid #3e70b0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 0 2px #70b9ff inset;
    overflow: hidden;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    animation: messageSlide 0.3s ease;
    width: 100%;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.message-header {
    background: #0a3460;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 2px solid #4f9eff;
    cursor: pointer;
}

.message-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-toggle {
    background: #ffffff20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 1px solid #aac9ff;
    transition: all 0.2s;
}

.message-toggle:hover {
    background: #ff4757;
    border-color: white;
}

.message-content {
    padding: 20px;
    background: #132237;
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.message-content.collapsed {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.robot-list-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #253f60;
    color: #d6e8ff;
    font-size: 1.1rem;
}

.robot-list-item:last-child {
    border-bottom: none;
}

.hotspot-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #253f60;
    color: #d6e8ff;
    font-size: 1.1rem;
}

.hotspot-list-item:last-child {
    border-bottom: none;
}

.hotspot-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-red {
    background: #ff4757;
    box-shadow: 0 0 12px #ff4757;
}

.badge-orange {
    background: #ffb347;
    box-shadow: 0 0 12px #ffb347;
}

.badge-green {
    background: #2bc48a;
    box-shadow: 0 0 12px #2bc48a;
}

.badge-blue {
    background: #70b9ff;
    box-shadow: 0 0 12px #70b9ff;
}

/* ========= 底部审计栏 ========= */
.audit-bar {
    background: #0a101d;
    border-top: 1px solid #202d44;
    padding: 16px 32px;
    display: flex;
    gap: 48px;
    color: #5f78a2;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ========= 模态框通用样式 ========= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ========= 注册设备弹窗样式 ========= */
.register-modal {
    width: 550px;
    background: #132237;
    border-radius: 42px;
    border: 2px solid #3e70b0;
    box-shadow: 0 30px 60px rgba(0, 50, 100, 0.7), 0 0 0 2px #70b9ff inset;
    overflow: hidden;
    animation: modalPop 0.3s ease;
}

.register-header {
    background: #0a3460;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 2px solid #4f9eff;
}

.register-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.register-close {
    background: #ffffff20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: 2px solid #aac9ff;
    transition: all 0.2s;
}

.register-close:hover {
    background: #ff4757;
    border-color: white;
}

.register-body {
    padding: 28px;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    color: #b0c6f0;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: #0a1a2c;
    border: 2px solid #2d4a7a;
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: #70b9ff;
    box-shadow: 0 0 0 3px #70b9ff40;
}

.form-select {
    width: 100%;
    padding: 14px 18px;
    background: #0a1a2c;
    border: 2px solid #2d4a7a;
    border-radius: 30px;
    color: white;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.form-select option {
    background: #132237;
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.register-footer {
    padding: 24px 28px;
    background: #0a1c30;
    border-top: 2px solid #2d5a9a;
    display: flex;
    gap: 16px;
}

.register-btn-primary {
    flex: 1;
    background: #1b5e8c;
    padding: 16px;
    border-radius: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    border-bottom: 5px solid #0d3550;
    cursor: pointer;
    transition: all 0.1s;
}

.register-btn-primary:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

.register-btn-secondary {
    flex: 1;
    background: #364973;
    padding: 16px;
    border-radius: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #d6e8ff;
    border-bottom: 5px solid #1f2d4a;
    cursor: pointer;
}

.register-btn-secondary:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

/* ========= 机器人详情弹窗样式 ========= */
.robot-detail-modal {
    width: 850px;
    background: #111c30;
    border-radius: 48px;
    border: 2px solid #3e70b0;
    box-shadow: 0 30px 60px rgba(0, 50, 100, 0.7), 0 0 0 2px #70b9ff inset;
    overflow: hidden;
    animation: modalPop 0.3s ease;
}

.modal-header {
    background: #0a3460;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 2px solid #4f9eff;
}

.modal-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 20px;
}

.close-btn {
    background: #ffffff20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border: 2px solid #aac9ff;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #ff4757;
    border-color: white;
}

.modal-body {
    padding: 32px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
}

.video-stream {
    background: #0a1828;
    border-radius: 32px;
    border: 3px solid #2d5a9a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-label {
    background: #1a3b68;
    padding: 14px 20px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #4a8ad4;
    font-size: 1.1rem;
}

.live-badge {
    background: #c02f3f;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.video-container {
    background: #0a1424;
    width: 100%;
    position: relative;
    background: #000000;
    aspect-ratio: 16/9;
}

.robot-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0a1424;
}

.video-stats {
    background: #0f1f33;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    color: #aac9ff;
    font-size: 0.9rem;
    border-top: 2px solid #2d5a9a;
}

.robot-info-panel {
    background: #0a1828;
    border-radius: 32px;
    padding: 24px;
    border: 2px solid #2d5a9a;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #253f60;
    color: #d6e8ff;
    font-size: 1.2rem;
}

.info-label {
    color: #8fb4ff;
}

.info-value {
    font-weight: 600;
}

.task-tag {
    background: #1a4c7a;
    padding: 14px 18px;
    border-radius: 30px;
    margin-top: 22px;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    border-left: 8px solid #ffb347;
}

.modal-footer {
    padding: 24px 32px;
    background: #0a1c30;
    border-top: 2px solid #2d5a9a;
    display: flex;
    gap: 18px;
}

.action-btn {
    flex: 1;
    padding: 18px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
}

.primary-action {
    background: #1b5e8c;
    color: white;
    border-bottom: 5px solid #0d3550;
}

.primary-action:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

.secondary-action {
    background: #364973;
    color: #d6e8ff;
    border-bottom: 5px solid #1f2d4a;
}

.secondary-action:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

/* ========= 机器人详情弹窗 - 全景视频样式 ========= */
.robot-detail-modal {
    width: 950px;  /* 稍微加宽以容纳两个视频 */
    background: #111c30;
    border-radius: 48px;
    border: 2px solid #3e70b0;
    box-shadow: 0 30px 60px rgba(0, 50, 100, 0.7), 0 0 0 2px #70b9ff inset;
    overflow: hidden;
    animation: modalPop 0.3s ease;
}

.modal-body {
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 改为两列等宽 */
    gap: 28px;
}

/* 视频列样式 */
.video-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 第一视角视频容器 */
.video-stream {
    background: #0a1828;
    border-radius: 32px;
    border: 3px solid #2d5a9a;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 全景视频容器 */
.panorama-stream {
    background: #0a1828;
    border-radius: 32px;
    border: 3px solid #4a9fc5;  /* 不同的边框颜色区分 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-label {
    background: #1a3b68;
    padding: 14px 20px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #4a8ad4;
    font-size: 1.1rem;
}

.panorama-label {
    background: #1a5f6b;  /* 不同的背景色区分 */
    padding: 14px 20px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #4ac5d4;
    font-size: 1.1rem;
}

.panorama-badge {
    background: #4a9fc5;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    animation: pulse-blue 1.5s infinite;
}

@keyframes pulse-blue {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.video-container {
    background: #0a1424;
    width: 100%;
    position: relative;
    background: #000000;
    aspect-ratio: 16/9;
}

.robot-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #0a1424;
}

.video-stats {
    background: #0f1f33;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    color: #aac9ff;
    font-size: 0.9rem;
    border-top: 2px solid #2d5a9a;
}

.panorama-stats {
    background: #0f2f33;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    color: #aafff0;
    font-size: 0.9rem;
    border-top: 2px solid #4ac5d4;
}

/* 信息面板样式调整 */
.info-panel {
    grid-column: span 2;  /* 信息面板占满两列 */
    background: #0a1828;
    border-radius: 32px;
    padding: 24px;
    border: 2px solid #2d5a9a;
    margin-top: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #253f60;
    color: #d6e8ff;
    font-size: 1.1rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #8fb4ff;
}

.info-value {
    font-weight: 600;
}

.task-tag {
    background: #1a4c7a;
    padding: 14px 18px;
    border-radius: 30px;
    margin-top: 22px;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    border-left: 8px solid #ffb347;
}

.modal-footer {
    padding: 24px 32px;
    background: #0a1c30;
    border-top: 2px solid #2d5a9a;
    display: flex;
    gap: 18px;
}

.action-btn {
    flex: 1;
    padding: 18px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
}

.primary-action {
    background: #1b5e8c;
    color: white;
    border-bottom: 5px solid #0d3550;
}

.primary-action:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}

.secondary-action {
    background: #364973;
    color: #d6e8ff;
    border-bottom: 5px solid #1f2d4a;
}

.secondary-action:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
}