/* 外层容器 */
.aisc-card-wrapper {
  margin: 40px 0;
  clear: both;
  display: flex;
  justify-content: center;
}

/* 主卡片：添加单屏高度限制 */
.aisc-card {
  position: relative;
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 120px); /* 单屏高度，预留上下边距 */
  overflow-y: auto; /* 内容超出时显示滚动条 */
  background: radial-gradient(circle at top left, #ffffff 0%, #f7f9ff 40%, #f3f4f7 100%);
  border-radius: 18px;
  padding: 24px 26px 22px;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.16),
    0 4px 10px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* 滚动条样式优化（可选） */
.aisc-card::-webkit-scrollbar {
  width: 6px;
}

.aisc-card::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 3px;
}

.aisc-card::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.3);
  border-radius: 3px;
}

.aisc-card::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 70, 229, 0.5);
}

/* 渐变背景层 */
.aisc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.18), rgba(129, 140, 248, 0.25), rgba(45, 212, 191, 0.22));
  opacity: 0.55;
  mix-blend-mode: soft-light;
  pointer-events: none;
  border-radius: 18px; /* 添加圆角确保不溢出 */
}

/* 子元素层级 */
.aisc-card > * {
  position: relative;
  z-index: 1;
}

/* 输入框和选择框 */
.aisc-card input,
.aisc-card select {
  width: 100%;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  background-color: rgba(255, 255, 255, 0.95);
}

.aisc-card input:focus,
.aisc-card select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
  background-color: #ffffff;
}

/* 按钮 + 点击动画基础 */
.aisc-card button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  background-image: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  white-space: nowrap;
}

.aisc-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
  filter: brightness(1.03);
}

.aisc-card button:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

/* 波纹元素 */
.aisc-card button .aisc-btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: aisc-ripple 0.5s ease-out;
  pointer-events: none;
}

@keyframes aisc-ripple {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* 布局辅助（AI 使用的2列网格） - 减少间距提高紧凑度 */
.aisc-card .aisc-field-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
  gap: 6px 12px; /* 减小垂直间距从8px到6px */
  align-items: center;
  margin-bottom: 8px; /* 减小底部边距从10px到8px */
}

.aisc-card .aisc-field-row label {
  font-size: 13px;
  color: #4b5563;
}

/* 结果块 - 减少内边距 */
.aisc-card .aisc-result-block {
  margin-top: 12px; /* 减小从16px到12px */
  padding: 10px 12px; /* 减小从12px 14px到10px 12px */
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* 移动端响应 */
@media (max-width: 640px) {
  .aisc-card {
    padding: 18px 16px 16px;
    border-radius: 16px;
    max-height: calc(100vh - 80px); /* 移动端预留更少边距 */
  }

  .aisc-card .aisc-field-row {
    grid-template-columns: 1fr;
    gap: 4px; /* 移动端更紧凑 */
    margin-bottom: 6px;
  }
}
