/* 雷达数据接收页面样式 */

.radar-data-container {
    padding: 20px;
    color: #fff;
    max-width: 1400px;
    margin: 0 auto;
}

/* 区块样式 */
.radar-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.radar-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #26bbff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.radar-section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.radar-section-actions label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}

.radar-section-actions input[type="checkbox"] {
    cursor: pointer;
}

/* 配置区域 */
.radar-config {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radar-config-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radar-config-row label {
    min-width: 100px;
    color: rgba(255, 255, 255, 0.8);
}

.radar-config-row input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.radar-config-row input:focus {
    outline: none;
    border-color: #26bbff;
    background: rgba(255, 255, 255, 0.15);
}

.radar-config-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
}

/* 按钮样式 */
.radar-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.radar-btn-primary {
    background: #26bbff;
    color: #0e0e0e;
}

.radar-btn-primary:hover {
    background: #1ea8e6;
}

.radar-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.radar-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.radar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radar-btn-small {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.radar-btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 状态指示器 */
.radar-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.radar-status.connected {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.radar-status.disconnected {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.radar-status.connecting {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.radar-status.error {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.radar-status.status {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

/* 统计信息 */
.radar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.radar-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.radar-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.radar-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #26bbff;
}

/* 资源占用 */
.radar-resource-status {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(38, 187, 255, 0.12);
    color: #26bbff;
    font-size: 12px;
    font-weight: 600;
}

.radar-resource-status.error {
    background: rgba(244, 67, 54, 0.16);
    color: #ff6b6b;
}

.radar-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.radar-resource-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 14px;
    min-width: 0;
}

.radar-resource-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.58);
    margin-bottom: 8px;
}

.radar-resource-primary {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.radar-resource-secondary {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

/* 标签页 */
.radar-data-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.radar-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.radar-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.radar-tab.active {
    color: #26bbff;
    border-bottom-color: #26bbff;
}

.radar-data-content {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.radar-tab-content {
    display: none;
}

.radar-tab-content.active {
    display: block;
}

/* 表格样式 */
.radar-table {
    width: 100%;
    overflow-x: auto;
}

.radar-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.radar-table th {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.radar-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.radar-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radar-table tr.highlight {
    background: rgba(38, 187, 255, 0.1);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}

.badge-local {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.badge-teammate {
    background: rgba(33, 150, 243, 0.3);
    color: #2196f3;
}

.badge-ai {
    background: rgba(156, 39, 176, 0.3);
    color: #9c27b0;
}

.badge-key {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.badge-ammo {
    background: rgba(255, 87, 34, 0.3);
    color: #ff5722;
}

.badge-opened {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.badge-looted {
    background: rgba(158, 158, 158, 0.3);
    color: #9e9e9e;
}

.price-high {
    color: #ffc107;
    font-weight: 600;
}

/* JSON显示 */
.radar-json {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 4px;
    font-size: 12px;
    color: #a0d468;
    overflow-x: auto;
    max-height: 400px;
    font-family: 'Courier New', monospace;
}

/* 空状态 */
.radar-empty {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.radar-info {
    text-align: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.radar-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 10px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.radar-page-info {
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    min-width: 160px;
    text-align: center;
}

.radar-pagination .radar-btn {
    min-width: 72px;
    padding: 6px 10px;
    font-size: 12px;
}

.radar-pagination .radar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 日志 */
.radar-log {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.radar-log-entry {
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 3px;
    display: flex;
    gap: 10px;
}

.radar-log-info {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196f3;
}

.radar-log-error {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.radar-log-time {
    color: rgba(255, 255, 255, 0.5);
    min-width: 70px;
}

.radar-log-message {
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

/* 滚动条样式 */
.radar-data-content::-webkit-scrollbar,
.radar-log::-webkit-scrollbar,
.radar-json::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.radar-data-content::-webkit-scrollbar-track,
.radar-log::-webkit-scrollbar-track,
.radar-json::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.radar-data-content::-webkit-scrollbar-thumb,
.radar-log::-webkit-scrollbar-thumb,
.radar-json::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.radar-data-content::-webkit-scrollbar-thumb:hover,
.radar-log::-webkit-scrollbar-thumb:hover,
.radar-json::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 响应式 */
@media (max-width: 768px) {
    .radar-data-container {
        padding: 10px;
    }
    
    .radar-section {
        padding: 15px;
    }
    
    .radar-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .radar-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .radar-config-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .radar-config-row label {
        min-width: auto;
    }
    
    .radar-config-row input {
        width: 100%;
    }
    
    .radar-table {
        font-size: 11px;
    }
    
    .radar-table th,
    .radar-table td {
        padding: 6px;
    }
}
