/* public/assets/css/system/ble-radar.css */

.radar-wrapper { padding: 32px; border-radius: var(--radius-lg); position: relative; }
.radar-header { text-align: center; margin-bottom: 32px; }
.radar-title { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px; }
.radar-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

.radar-workspace { max-width: 900px; margin: 0 auto; background: #0f172a; border: 1px solid #1e293b; border-radius: 20px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); color: #f8fafc; }

/* 顶部操作面板 */
.radar-control-panel { display: flex; justify-content: space-between; align-items: center; background: #1e293b; padding: 16px 24px; border-radius: 12px; margin-bottom: 32px; border: 1px solid #334155; }
.radar-device-info { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; font-family: monospace; }
.radar-status-dot { width: 12px; height: 12px; border-radius: 50%; background: #64748b; box-shadow: 0 0 8px rgba(100, 116, 139, 0.5); transition: 0.3s; }
.radar-status-dot.active { background: #3b82f6; box-shadow: 0 0 12px rgba(59, 130, 246, 0.8); }
.radar-status-dot.hot { background: #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }

.radar-actions { display: flex; gap: 12px; }
.radar-btn-primary { padding: 10px 20px; font-weight: 700; background: #3b82f6; color: #fff; border: none; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.radar-btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.radar-btn-outline { padding: 10px 20px; font-weight: 600; background: transparent; color: #94a3b8; border: 1px solid #475569; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.radar-btn-outline:hover { color: #f8fafc; border-color: #f8fafc; background: rgba(255,255,255,0.05); }
.radar-btn-danger { padding: 10px 20px; font-weight: 700; background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 8px; cursor: pointer; transition: 0.2s; }
.radar-btn-danger:hover { background: #ef4444; color: #fff; }

/* 🌟 核心雷达 CSS */
.radar-visual-zone { display: flex; justify-content: center; align-items: center; padding: 40px 0; margin-bottom: 32px; }
.radar-circle-container { width: 320px; height: 320px; border-radius: 50%; position: relative; overflow: hidden; background: #0b1120; border: 2px solid #1e293b; box-shadow: 0 0 30px rgba(0,0,0,0.5); transition: background-color 0.3s; }

.radar-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(59, 130, 246, 0.3); transition: border-color 0.3s; }
.ring-1 { width: 80px; height: 80px; }
.ring-2 { width: 160px; height: 160px; }
.ring-3 { width: 240px; height: 240px; }
.ring-4 { width: 320px; height: 320px; border: 2px solid rgba(59, 130, 246, 0.5); }

/* 雷达扫描指针 */
.radar-sweep { position: absolute; top: 50%; left: 50%; width: 160px; height: 160px; transform-origin: 0 0; background: conic-gradient(from 0deg, rgba(59, 130, 246, 0) 0%, rgba(59, 130, 246, 0.8) 100%); animation: sweep 3s linear infinite; animation-play-state: paused; opacity: 0.3; transition: background 0.3s; }
.radar-container.is-scanning .radar-sweep { animation-play-state: running; opacity: 1; }

@keyframes sweep { to { transform: rotate(360deg); } }

/* 中心点图标 */
.radar-center-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #3b82f6; z-index: 10; transition: color 0.3s; }

/* 发现目标的红点 */
.radar-blip { position: absolute; width: 14px; height: 14px; background: #ef4444; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0; z-index: 5; box-shadow: 0 0 10px #ef4444; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.radar-blip.visible { animation: blipPulse 1.5s infinite; }

@keyframes blipPulse { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); } }

/* 热度状态覆盖 (当距离很近时触发) */
.radar-container.hot .radar-ring { border-color: rgba(239, 68, 68, 0.3); }
.radar-container.hot .ring-4 { border-color: rgba(239, 68, 68, 0.5); }
.radar-container.hot .radar-sweep { background: conic-gradient(from 0deg, rgba(239, 68, 68, 0) 0%, rgba(239, 68, 68, 0.8) 100%); animation-duration: 1.5s; }
.radar-container.hot .radar-center-icon { color: #ef4444; }
.radar-container.hot { background: #1a0808; box-shadow: 0 0 40px rgba(239, 68, 68, 0.2); }

/* 数据卡片 */
.radar-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.radar-stat-card { background: #1e293b; padding: 20px; border-radius: 12px; border: 1px solid #334155; text-align: center; }
.radar-stat-label { font-size: 0.85rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.radar-stat-value { font-size: 2rem; font-weight: 800; font-family: 'Courier New', Courier, monospace; color: #f8fafc; }

/* 距离进度条 */
.radar-progress-bar { width: 100%; height: 6px; background: #0f172a; border-radius: 3px; margin-top: 12px; overflow: hidden; }
.radar-progress-fill { height: 100%; background: #3b82f6; width: 0%; transition: width 0.3s, background 0.3s; }
.radar-progress-fill.hot { background: #ef4444; }

.radar-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); max-width: 900px; margin: 0 auto; }
.radar-info-card h3 { color: var(--text-main); font-size: 1.15rem; margin-bottom: 16px; }
.radar-desc-text { font-size: 0.95rem; color: var(--text-muted); margin: 0; }

@media (max-width: 768px) {
    .radar-control-panel { flex-direction: column; gap: 16px; align-items: stretch; text-align: center; }
    .radar-device-info { justify-content: center; }
    .radar-actions { flex-direction: column; }
    .radar-stats-grid { grid-template-columns: 1fr; }
    .radar-circle-container { width: 260px; height: 260px; }
    .ring-1 { width: 65px; height: 65px; }
    .ring-2 { width: 130px; height: 130px; }
    .ring-3 { width: 195px; height: 195px; }
    .ring-4 { width: 260px; height: 260px; }
    .radar-sweep { width: 130px; height: 130px; }
}