/* IP测试面板 - 虚拟人物/虚拟卡样式 */
.ip-test-panel {
    padding: 8px 12px;
    overflow: visible;
}

.ip-test-panel.active {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* IP测试行 */
.ip-test-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: background 0.2s;
    cursor: default;
}

.ip-test-row:not(:last-child) {
    border-bottom: 1px solid #e8eaed;
}

/* 图标 */
.ip-test-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-test-icon .material-icons {
    font-size: 16px;
    color: #5f6368;
    transition: color 0.2s;
}

/* 有数据时图标变蓝 */
.ip-test-row.has-data .ip-test-icon .material-icons {
    color: #1a73e8;
}

/* 内容区域 */
.ip-test-content {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.ip-test-label {
    font-size: 12px;
    color: #70757a;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.ip-test-value {
    font-size: 13px;
    color: #202124;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 威胁分数颜色 */
.ip-test-value.threat-low {
    color: #34a853;
}

.ip-test-value.threat-medium {
    color: #fbbc04;
}

.ip-test-value.threat-high {
    color: #ea4335;
}

/* 操作按钮 */
.ip-test-copy-btn,
.ip-test-refresh-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
    padding: 0;
}

.ip-test-copy-btn:hover,
.ip-test-refresh-btn:hover {
    background: #f8f9fa;
    opacity: 1;
}

.ip-test-copy-btn .material-icons,
.ip-test-refresh-btn .material-icons {
    font-size: 14px;
    color: #5f6368;
    transition: all 0.3s;
}

/* 刷新按钮旋转动画 */
.ip-test-refresh-btn .material-icons.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 复制成功状态 */
.ip-test-copy-btn.copied {
    background: #34c759;
    opacity: 1;
}

.ip-test-copy-btn.copied .material-icons {
    color: white;
}

/* 响应式 */
@media (max-width: 768px) {
    .ip-test-panel {
        max-width: calc(100vw - 32px);
    }
}

/* 详情按钮 */
.ip-test-details-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
    padding: 0;
}

.ip-test-details-btn:hover {
    background: #e8f0fe;
    opacity: 1;
}

.ip-test-details-btn .material-icons {
    font-size: 16px;
    color: #1a73e8;
}

/* IP详情模态窗口 - 与IBAN验证面板一致的风格 */
.ip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s;
}

.ip-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.ip-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 360px;
    max-height: 80vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 12px;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.ip-modal-overlay.show .ip-modal {
    transform: scale(1);
}

/* 模态窗口表头 */
.ip-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0 6px 0;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 4px;
}

.ip-modal-header .header-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ip-modal-header .header-title .material-icons {
    font-size: 18px;
    color: #1a73e8;
}

.ip-modal-header .header-title span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* 风险分数圆环 - 实心圆圈 */
.threat-score-circle {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-right: -4px;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-fill {
    fill: #34a853;
    transition: fill 0.3s ease;
}

.score-text {
    font-size: 16px;
    font-weight: 700;
    fill: white;
    text-anchor: middle;
    dominant-baseline: central;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* 两位数时字体稍小 */
.score-text.two-digits {
    font-size: 13px;
}

/* 三位数时字体更小 */
.score-text.three-digits {
    font-size: 10px;
}

/* 信息行 - 与IBAN验证面板一致 */
.ip-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ip-info-row:last-of-type {
    border-bottom: none;
}

.ip-info-row.section-title {
    padding-top: 12px;
    border-bottom: none;
}

.ip-row-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态窗口内复制按钮 */
.ip-modal-copy-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
    padding: 0;
}

.ip-modal-copy-btn:hover {
    background: #f8f9fa;
    opacity: 1;
}

.ip-modal-copy-btn .material-icons {
    font-size: 14px;
    color: #5f6368;
    transition: all 0.3s;
}

.ip-row-icon .material-icons {
    font-size: 16px;
    color: #1a73e8;
}

.ip-row-content {
    flex: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.ip-row-label {
    font-size: 12px;
    color: #70757a;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.ip-row-value {
    font-size: 13px;
    color: #202124;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.ip-section-title {
    font-size: 13px;
    font-weight: 500;
    color: #202124;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* 威胁检测网格 - 5列2行，扁平风格 */
.threat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px 8px;
    padding: 4px 0;
}

.threat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 2px 0;
}

.threat-name {
    font-size: 11px;
    color: #5f6368;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
}

/* 威胁图标 - 圆圈+圆点样式（与IBAN一致） */
.threat-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #dadce0;
    position: relative;
    transition: border-color 0.2s;
}

.threat-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s;
}

/* 安全状态 - 绿色 */
.threat-item.safe .threat-icon {
    border-color: #34a853;
}

.threat-item.safe .threat-icon::after {
    background: #34a853;
}

/* 检测到威胁 - 红色 */
.threat-item.detected .threat-icon {
    border-color: #ea4335;
}

.threat-item.detected .threat-icon::after {
    background: #ea4335;
}

.threat-item.detected .threat-name {
    color: #ea4335;
}

/* 响应式 */
@media (max-width: 768px) {
    .ip-modal {
        width: 95%;
        padding: 10px;
    }
    
    .threat-grid {
        gap: 2px 4px;
    }
    
    .threat-name {
        font-size: 10px;
    }
}
