:root { color-scheme: dark light; }
body { background-color: var(--bg-color, #fff); color: var(--text-color, #000); }
.loading { display: flex; justify-content: center; align-items: center; height: 100vh; }
.spinner { width: 48px; height: 48px; border: 4px solid rgba(59, 130, 246, 0.3); border-radius: 50%; border-top-color: rgb(59, 130, 246); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* 添加首屏关键样式 */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card {
  background-color: var(--card-bg, #fff);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* 移动端优化样式 */
@media (max-width: 768px) {
  .hero-section { min-height: 50vh; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .card { padding: 1rem; }
  .grid { gap: 1rem; }
  .spinner { width: 36px; height: 36px; border-width: 3px; }
}
/* 添加触摸优化 */
@media (pointer: coarse) {
  button, a { 
    min-height: 44px; 
    min-width: 44px;
    touch-action: manipulation;
  }
  input, select, textarea {
    font-size: 16px; /* 防止iOS缩放 */
  }
} 

/* 提示词弹窗在小屏和低高度窗口内自适应 */
@media (max-width: 768px), (max-height: 820px) {
  [role="dialog"] {
    width: min(98vw, 72rem) !important;
    max-height: 92vh !important;
    display: flex;
    flex-direction: column;
    padding: 1rem !important;
  }

  [role="dialog"] > button {
    top: 0.75rem !important;
    right: 0.75rem !important;
  }

  [role="dialog"] > div.mt-4 {
    margin-top: 1rem !important;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto !important;
    padding-right: 0.25rem !important;
  }

  [role="dialog"] > div.mt-4 > div:first-child {
    padding: 0.75rem !important;
  }

  [role="dialog"] > div.mt-4 > div:first-child > div:first-child {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }

  [role="dialog"] > div.mt-4 > div:first-child > div:first-child button,
  [role="dialog"] > div.mt-4 > div:last-child button {
    width: 100%;
    justify-content: center;
  }

  [role="dialog"] pre {
    max-height: min(52vh, 32rem) !important;
  }

  [role="dialog"] > div.mt-4 > div:last-child {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch !important;
    background: hsl(var(--background) / 0.96);
    padding-top: 1rem;
    backdrop-filter: blur(10px);
  }

  [role="dialog"] > div.mt-4 > div:last-child > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}
