/* 简化版查询结果页面样式 */

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f8fafc;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 消息框样式 */
.messages {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.messages > div {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 消息头部 */
.message-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(10px);
}

.message-icon {
  font-size: 24px;
  margin-right: 12px;
}

.message-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

/* 消息数据 */
.message-data {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.message-label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 4px;
}

.message-data > div {
  font-size: 14px;
  color: #334155;
}

/* 消息标签 */
.message-tags {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(10px);
}

.message-tag {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  background: #e2e8f0;
  color: #64748b;
}

/* 操作按钮 */
.action-buttons {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
  text-align: center;
}

.action-buttons > div {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.action-button-primary {
  background: #3b82f6;
  color: white;
}

.action-button-secondary {
  background: #10b981;
  color: white;
}

.action-button-tertiary {
  background: #f59e0b;
  color: white;
}

.action-button-favorite {
  background: #ec4899;
  color: white;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 数据源切换 */
.data-source {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}

.segmented {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.segmented-item {
  flex: 1;
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segmented-item:hover {
  background: #e2e8f0;
}

.segmented-item-selected {
  background: white;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 原始数据 */
.raw-data {
  max-width: 1200px;
  margin: 24px auto 48px;
  padding: 0 20px;
}

.raw-data pre {
  background: #1e293b;
  color: #f8fafc;
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* 查询时间 */
.query-time {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 16px;
  padding: 0 24px 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .messages {
    padding: 0 16px;
  }
  
  .message-header {
    padding: 20px;
  }
  
  .message-data {
    padding: 20px;
    grid-template-columns: 1fr;
  }
  
  .message-tags {
    padding: 16px 20px;
  }
  
  .action-buttons > div {
    flex-direction: column;
    align-items: stretch;
    padding: 0 16px;
  }
  
  .action-button {
    justify-content: center;
  }
  
  .data-source,
  .raw-data {
    padding: 0 16px;
  }
  
  .segmented-item {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .raw-data pre {
    padding: 20px;
    font-size: 12px;
  }
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.6);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.messages > div,
.action-buttons,
.data-source,
.raw-data {
  animation: fadeIn 0.5s ease forwards;
}

.messages > div {
  animation-delay: 0.1s;
}

.action-buttons {
  animation-delay: 0.2s;
}

.data-source {
  animation-delay: 0.3s;
}

.raw-data {
  animation-delay: 0.4s;
}