/* ============================================================
   AI工作流板块重构样式
   包含：4个子版块、点击查看按钮、弹窗、移动端3+1布局
   ============================================================ */

/* ============================================================
   1. 按钮微动效动画定义
   ============================================================ */
@keyframes float-up-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes float-up-down-mobile {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* ============================================================
   2. "点击查看"按钮样式
   ============================================================ */
.ai-workflow-view-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: float-up-down 2s ease-in-out infinite;
  z-index: 10;
}

.ai-workflow-view-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* ============================================================
   3. 模态弹窗样式
   ============================================================ */
.ai-workflow-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-workflow-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ai-workflow-modal {
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.ai-workflow-modal-overlay.active .ai-workflow-modal {
  transform: scale(1) translateY(0);
}

.ai-workflow-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-workflow-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.ai-workflow-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ai-workflow-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.ai-workflow-modal-close svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.ai-workflow-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(85vh - 80px);
}

.ai-workflow-detail-section {
  margin-bottom: 20px;
}

.ai-workflow-detail-section:last-child {
  margin-bottom: 0;
}

.ai-workflow-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(108, 193, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ai-workflow-detail-content {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.ai-workflow-screenshot {
  width: 100%;
  height: 180px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-top: 12px;
}

/* 模块4特殊样式 */
.ai-workflow-experiment-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.ai-workflow-experiment-subtitle {
  font-size: 14px;
  color: rgba(108, 193, 255, 0.9);
  margin-top: 8px;
}

.ai-workflow-observation-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.ai-workflow-observation-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.ai-workflow-observation-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: rgba(108, 193, 255, 0.7);
  border-radius: 50%;
}

.ai-workflow-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(135deg, rgba(108, 193, 255, 0.2), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(108, 193, 255, 0.3);
  border-radius: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.ai-workflow-read-more-btn:hover {
  background: linear-gradient(135deg, rgba(108, 193, 255, 0.3), rgba(59, 130, 246, 0.3));
  border-color: rgba(108, 193, 255, 0.5);
  transform: translateY(-2px);
}

/* ============================================================
   4. 移动端响应式布局 (3+1)
   ============================================================ */
@media (max-width: 767px) {
  /* 按钮移动端微动效 */
  .ai-workflow-view-btn {
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 16px;
    animation: float-up-down-mobile 2.5s ease-in-out infinite;
  }

  /* 3+1 Grid布局 */
  .ai-workflow-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 0 4px !important;
  }

  .ai-workflow-grid-mobile > *:nth-child(1),
  .ai-workflow-grid-mobile > *:nth-child(2),
  .ai-workflow-grid-mobile > *:nth-child(3) {
    grid-column: span 1;
  }

  .ai-workflow-grid-mobile > *:nth-child(4) {
    grid-column: span 3 !important;
  }

  /* 卡片精简化 */
  .ai-workflow-grid-mobile > * {
    padding: 12px 8px !important;
    min-height: auto !important;
  }

  .ai-workflow-grid-mobile h3,
  .ai-workflow-grid-mobile .text-lg,
  .ai-workflow-grid-mobile .font-semibold {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .ai-workflow-grid-mobile p,
  .ai-workflow-grid-mobile .text-sm {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }

  /* 图标缩小 */
  .ai-workflow-grid-mobile svg,
  .ai-workflow-grid-mobile img {
    width: 24px !important;
    height: 24px !important;
  }

  /* 04板块底部间距 */
  .ai-workflow-grid-mobile > *:nth-child(4) {
    margin-bottom: 24px !important;
  }

  /* 弹窗移动端适配 */
  .ai-workflow-modal {
    width: 92%;
    max-height: 80vh;
  }

  .ai-workflow-modal-header {
    padding: 16px 20px;
  }

  .ai-workflow-modal-body {
    padding: 20px;
    max-height: calc(80vh - 70px);
  }

  .ai-workflow-modal-title {
    font-size: 16px;
  }

  .ai-workflow-detail-content {
    font-size: 13px;
  }

  .ai-workflow-screenshot {
    height: 140px;
  }
}

/* ============================================================
   5. 电脑端安全屏障
   ============================================================ */
@media (min-width: 768px) {
  /* 确保电脑端保持原有样式，不应用移动端grid */
  .ai-workflow-grid-mobile {
    display: flex !important;
    flex-wrap: wrap !important;
  }
}
