/* 设备型号识别工具样式 */

/* ============ 结果区域 ============ */
.result-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* 状态徽章（复用 qq-check 体系） */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

.status-badge .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.normal {
  background: #ecfdf5;
  color: #047857;
}

.status-badge.normal .status-dot {
  background: #10b981;
}

.status-badge.unknown {
  background: #fef2f2;
  color: #b91c1c;
}

.status-badge.unknown .status-dot {
  background: #ef4444;
}

.status-badge.loading {
  background: #eef2ff;
  color: var(--primary);
}

.status-badge.loading .status-dot {
  background: var(--primary);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============ 设备主信息高亮区 ============ */
.device-hero {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), rgba(79, 70, 229, 0.08));
  border-radius: var(--border-radius);
  border: 1px solid rgba(79, 70, 229, 0.1);
}

.device-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
}

.device-model {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  word-break: break-word;
}

.device-detail {
  font-size: 14px;
  color: var(--gray-500);
  word-break: break-all;
}

/* ============ 详情网格 ============ */
.result-detail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.detail-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px 14px;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
  word-break: break-all;
}

/* ============ UA 折叠区 ============ */
.raw-ua {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.raw-ua summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--gray-600);
  font-weight: 500;
  user-select: none;
}

.raw-ua summary:hover {
  background: var(--gray-100);
}

.raw-ua pre {
  background: var(--gray-900);
  color: #e5e7eb;
  padding: 14px 16px;
  font-size: 0.82rem;
  line-height: 1.6;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  border-top: 1px solid var(--gray-200);
}

/* ============ 错误提示 ============ */
.error-detail {
  display: none;
  background: #fef2f2;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid #fecaca;
}

.error-detail.show {
  display: block;
}

/* 重试按钮默认隐藏，失败时显示 */
.btn-retry {
  display: none;
}

.btn-retry.show {
  display: inline-flex;
}

/* ============ 免责声明 ============ */
.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  margin-top: 20px;
  line-height: 1.6;
}

/* ============ 响应式 ============ */
@media (max-width: 600px) {
  .device-hero {
    padding: 24px 16px;
  }

  .device-icon {
    font-size: 48px;
  }

  .device-model {
    font-size: 22px;
  }

  .result-detail {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .result-head {
    flex-direction: column;
    align-items: stretch;
  }

  .result-head .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .result-detail {
    grid-template-columns: 1fr;
  }
}
