/* 面板样式文件 */

/* 统一面板样式 */
.panel {
    background: rgba(0, 20, 40, 0.85);
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 150, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 200px;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 150, 255, 0.2);
    border-color: rgba(0, 150, 255, 0.5);
}



.panel h2 {
    margin-bottom: 15px;
    color: #00aaff;
    border-bottom: 2px solid rgba(0, 170, 255, 0.4);
    padding-bottom: 8px;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.6);
}

/* 左侧面板特定样式 */
.left-panel .panel:first-child {
    flex: 1.2;
    min-height: 600px;
    max-height: 600px;
    height: 600px;
}

.left-panel .panel:nth-child(2) {
    flex: 2.5;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
}

/* 右侧面板特定样式 */
.right-panel .panel:first-child {
    flex: 1.5;
    min-height: 250px;
}

.right-panel .panel:last-child {
    flex: 1.2;
    min-height: 220px;
}

/* 音频报警面板样式 */
.audio-alert-panel {
    background: rgba(0, 30, 60, 0.9);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    border: 1px solid rgba(0, 200, 100, 0.3);
    box-shadow: 0 4px 20px rgba(0, 200, 100, 0.1);
}

.audio-alert-panel h3 {
    color: #00cc66;
    margin-bottom: 12px;
    font-size: 1.1em;
    text-shadow: 0 0 8px rgba(0, 204, 102, 0.5);
    border-bottom: 1px solid rgba(0, 204, 102, 0.3);
    padding-bottom: 6px;
}

.alert-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.alert-controls .btn {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    padding: 8px 12px;
}

.alert-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #ccc;
}

.alert-info span:first-child {
    color: #aaa;
}

.alert-info span:last-child {
    color: #00cc66;
    font-weight: bold;
}

.status-text {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.status-text.waiting {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

.status-text.detecting {
    background: rgba(0, 204, 102, 0.2);
    color: #00cc66;
}

.status-text.detected {
    background: rgba(255, 0, 102, 0.2);
    color: #ff0066;
    animation: pulse 1s infinite;
}

/* 无人机检测报警消息样式 */
.drone-alert-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(255, 0, 102, 0.95);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(255, 0, 102, 0.4);
    border: 2px solid rgba(255, 0, 102, 0.8);
    animation: slideInRight 0.5s ease-out, pulse 1s infinite 0.5s;
    backdrop-filter: blur(10px);
}

.alert-content {
    text-align: center;
    font-weight: bold;
}

.alert-content strong {
    font-size: 1.2em;
    display: block;
    margin: 5px 0;
}

.alert-content small {
    opacity: 0.8;
    font-size: 0.9em;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* 实时数据网格 */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    max-height: 520px;
    overflow-y: hidden;
    height: 520px;
}

/* 隐藏滚动条 */
.data-grid::-webkit-scrollbar {
    display: none;
}

.data-grid {
    -ms-overflow-style: none;  /* IE和Edge */
    scrollbar-width: none;  /* Firefox */
}

.data-item {
    background: rgba(0, 30, 60, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 2px solid #0099ff;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 150, 255, 0.25);
    font-size: 0.85em;
}

.data-item:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(0, 150, 255, 0.3);
    border-left-color: #66ccff;
    background: rgba(0, 40, 80, 0.8);
}

.data-item label {
    display: block;
    font-weight: bold;
    color: #aaa;
    margin-bottom: 0px;
    font-size: 0.7em;
    line-height: 1.0;
}

.data-item span {
    font-size: 0.85em;
    color: #00ccff;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 204, 255, 0.4);
    line-height: 1.1;
    display: block;
}

/* 地图容器 */
.map-container {
    flex: 1;
    min-height: 500px; /* 添加最小高度 */
    height: 100%; /* 确保占满容器高度 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
    border: 2px solid rgba(0, 150, 255, 0.4);
    position: relative;
}

.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(0, 30, 60, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.map-info {
    font-size: 12px;
    color: #00aaff;
}

.map-type-controls {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    justify-content: center;
}

/* 原始数据文本框 */
#rawData {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border: 2px solid rgba(0, 150, 255, 0.4);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    background: rgba(0, 20, 40, 0.95);
    color: #00ff88;
    resize: none;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.4);
    line-height: 1.4;
}

/* 报警记录面板 */
.alert-records {
    border-top: 1px solid rgba(0, 150, 255, 0.3);
    padding-top: 16px;
}

.alert-records h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alert-records-list {
    flex: 1;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid rgba(255, 107, 107, 0.4);
    border-radius: 10px;
    padding: 12px;
    background-color: rgba(40, 0, 0, 0.95);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.alert-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: alertSlideIn 0.3s ease-out;
}

.alert-record-item:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateX(2px);
}

.alert-record-item:last-child {
    margin-bottom: 0;
}

.alert-osid {
    color: #ff9999;
    font-weight: bold;
    font-size: 13px;
}

.alert-time {
    color: #ffcccc;
    font-size: 11px;
    opacity: 0.8;
}

.no-alerts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    opacity: 0.7;
}

.alert-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 107, 107, 0.2);
}

.alert-count {
    font-size: 12px;
    color: #ff9999;
}

.alert-count span {
    font-weight: bold;
    color: #ffcccc;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.command-history-panel {
    border-top: 1px solid rgba(0, 150, 255, 0.3);
    padding-top: 12px;
}

.command-history-panel h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #00aaff;
}

.command-history {
    flex: 1;
    min-height: 100px;
    overflow-y: auto;
    border: 2px solid rgba(0, 150, 255, 0.4);
    border-radius: 10px;
    padding: 12px;
    background-color: rgba(0, 20, 40, 0.95);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.command-history div {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
}

.command-history div:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.command-entry { margin-bottom: 4px; }
.command-sent { color: #00aaff; font-weight: bold; }
.command-response { color: #00ff88; margin-left: 8px; font-style: italic; }

/* 报警记录面板 */
.alert-records {
    border-top: 1px solid rgba(0, 150, 255, 0.3);
    padding-top: 16px;
}

.alert-records h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alert-records-list {
    flex: 1;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid rgba(255, 107, 107, 0.4);
    border-radius: 10px;
    padding: 12px;
    background-color: rgba(40, 0, 0, 0.95);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.alert-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: alertSlideIn 0.3s ease-out;
}

.alert-record-item:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateX(2px);
}

.alert-record-item:last-child {
    margin-bottom: 0;
}

.alert-osid {
    color: #ff9999;
    font-weight: bold;
    font-size: 13px;
}

.alert-time {
    color: #ffcccc;
    font-size: 11px;
    opacity: 0.8;
}

.no-alerts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    opacity: 0.7;
}

.alert-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 107, 107, 0.2);
}

.alert-count {
    font-size: 12px;
    color: #ff9999;
}

.alert-count span {
    font-weight: bold;
    color: #ffcccc;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 统一配置面板 */
.unified-config {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.config-section {
    background: rgba(0, 20, 40, 0.6);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 150, 255, 0.2);
}

.config-section h4 {
    margin: 0 0 10px 0;
    color: #00ccff;
    font-size: 12px;
    border-bottom: 1px solid rgba(0, 204, 255, 0.3);
    padding-bottom: 5px;
}

.unified-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.unified-controls button {
    flex: 1;
    padding: 8px 12px;
    font-size: 11px;
    min-width: 80px;
}

.unified-status {
    background: rgba(0, 40, 80, 0.8);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 150, 255, 0.4);
}

.connection-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background: rgba(0, 20, 40, 0.6);
    border-radius: 4px;
    border-left: 2px solid #0099ff;
}

.detail-label {
    color: #aaa;
    font-size: 10px;
}

.detail-value {
    color: #00ccff;
    font-weight: bold;
    font-size: 10px;
}