/* ── 场景二：iPhone + Mac终端并排 ── */
#scene2-demo {
  min-height: 680px;
  overflow: visible;
}
#scene2-demo .s2-wrapper {
  min-height: 680px;
}
.scene2-row {
  max-width: none !important;
}
.scene2-row .scene-text {
  flex: 0 0 24%;
  max-width: 24%;
}
#sec-features > .scene2-row {
  max-width: none !important;
}
.s2-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 680px;
  position: relative;
  padding-top: 0;
}

/* iPhone */
.s2-iphone {
  width: 390px;
  height: 844px;
  border-radius: 44px;
  background: #fff;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transform: scale(0.88);
  transform-origin: top center;
}
.s2-phone-notch {
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  margin: 12px auto 0;
  position: relative;
  z-index: 20;
}
.s2-phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 28px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1C1C1E;
  flex-shrink: 0;
}
.s2-phone-status-r { display: flex; align-items: center; gap: 5px; }
.s2-phone-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.s2-phone-nav span {
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
}
.s2-phone-nav > div { display: flex; align-items: center; gap: 8px; }
.s2-phone-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.s2-chat-title { padding: 20px 16px 12px; }
.s2-chat-title h2 { font-size: 20px; font-weight: 700; color: #1f2937; margin-bottom: 2px; }
.s2-chat-title span { font-size: 14px; color: #9ca3af; }
.s2-ai-hint { font-size: 12px; color: #9ca3af; }
.s2-ai-sub { font-size: 14px; color: #6b7280; }
.s2-ai-main { font-size: 15px; color: #374151; margin-top: 12px; }
.s2-ai-greeting { padding: 0 16px 12px; }
.s2-user-msg {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px;
}
.s2-user-msg::after {
  content: attr(data-text);
}
.s2-phone-content > .s2-user-msg {
  background: none;
}
.s2-user-msg {
  background: #f0f0f0;
  border-radius: 16px;
  border-top-right-radius: 4px;
  padding: 10px 16px;
  max-width: 80%;
  margin-left: auto;
  margin-right: 16px;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.5;
  display: block;
}
.s2-ai-reply, .s2-ai-reply2 {
  padding: 8px 16px;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.6;
}
.s2-ai-reply code, .s2-ai-reply2 code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 13px;
  font-family: monospace;
  color: #374151;
}
.s2-sys-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  color: #9ca3af;
  font-size: 13px;
}
.s2-tools { padding: 4px 16px; }
.s2-tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 4px;
  background: #fff;
}
.s2-tool-item span { font-size: 14px; font-weight: 500; color: #1f2937; }
.s2-warning {
  display: flex;
  gap: 12px;
  margin: 8px 16px;
  padding: 12px 16px;
  background: #fff7ed;
  border-radius: 12px;
}
.s2-warn-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.s2-warning p { font-size: 13px; color: #ea580c; line-height: 1.5; }
.s2-phone-online {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.s2-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.s2-phone-online span { font-size: 13px; color: #6b7280; }
.s2-phone-input {
  padding: 0 16px 8px;
  flex-shrink: 0;
}
.s2-phone-input input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  border: none;
  background: #f3f4f6;
  font-size: 15px;
  color: #374151;
  outline: none;
  font-family: 'Noto Sans SC', sans-serif;
}
.s2-phone-input input::placeholder { color: #9ca3af; }
.s2-phone-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 32px 20px;
  flex-shrink: 0;
}
.s2-phone-toolbar > div { display: flex; gap: 20px; }
.s2-gear-btn { background: none; border: none; cursor: pointer; padding: 4px; position: relative; }
.s2-gear-btn.highlight svg { color: #2563eb; }
.s2-send-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.s2-send-circle.active { background: #4b5563; }

/* Mac Terminal */
.s2-mac {
  width: 840px;
  height: 820px;
  border-radius: 10px;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transform: scale(0.88);
  transform-origin: top center;
}
.s2-mac-titlebar {
  display: flex;
  align-items: center;
  height: 40px;
  background: #2d2d2d;
  border-bottom: 1px solid rgba(0,0,0,0.5);
  padding: 0 14px;
  position: relative;
  flex-shrink: 0;
}
.s2-mac-dots { display: flex; gap: 8px; }
.s2-mac-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.s2-mac-tab {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #1e1e1e;
  border-radius: 6px 6px 0 0;
}
.s2-mac-tab-icon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #e8a33a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #fff;
  font-weight: 700;
}
.s2-mac-tab span { color: #ccc; font-size: 12px; white-space: nowrap; }
.s2-mac-tab-close { color: #666; font-size: 11px; margin-left: 4px; }
.s2-mac-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 0;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #d4d4d4;
}
.s2-mac-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #2a2a2a;
  color: #6b7280;
  font-size: 11.5px;
  flex-shrink: 0;
}
.s2-t-gray { color: #aaa; }
.s2-term-sub { padding-left: 20px; color: #b0b0b0; margin-top: 2px; font-size: 12px; }
.s2-term-prompt, .s2-term-prompt2 { background: #3a3a3a; padding: 3px 16px; margin-bottom: 6px; }
.s2-term-response { padding: 4px 16px 4px; }
.s2-term-tools { padding: 4px 16px; }
.s2-term-tools > div { margin-bottom: 4px; }
.s2-term-perm { border-top: 1px solid #3b82f6; padding: 12px 16px; }
.s2-perm-header { color: #a0a0a0; margin-bottom: 8px; font-size: 12px; }
.s2-perm-desc { padding-left: 8px; color: #b0b0b0; margin-bottom: 8px; font-size: 12px; }
.s2-perm-question { margin-bottom: 8px; }
.s2-perm-options { }
.s2-perm-opt { display: flex; gap: 8px; align-items: flex-start; margin-top: 3px; cursor: pointer; }
.s2-perm-arrow { color: transparent; min-width: 10px; font-family: monospace; }
.s2-perm-opt.selected .s2-perm-arrow { color: #60a5fa; }
.s2-perm-num { color: #9ca3af; }
.s2-perm-label { color: #9ca3af; font-weight: 400; }
.s2-perm-opt.selected .s2-perm-label { color: #4ade80; font-weight: 600; }
.s2-perm-opt.selected .s2-perm-label span { color: #d4d4d4; }
.s2-term-exec { padding: 8px 16px; }
.s2-term-processing { padding: 4px 16px; }
.s2-term-fetch { padding: 4px 16px; }
.s2-term-result { padding: 4px 16px; }
.s2-result-block { margin: 8px 0; }
.s2-result-title { font-size: 14px; font-weight: 700; color: #d4d4d4; margin-bottom: 6px; }
.s2-result-sub { font-size: 13px; font-weight: 600; color: #d4d4d4; margin-bottom: 6px; }
.s2-result-line { color: #b0b0b0; font-size: 12px; margin-bottom: 2px; }
.s2-result-line b { color: #fff; font-weight: 700; }
.s2-term-meta { color: #6b7280; margin-top: 8px; font-size: 11px; }

/* Demo button */
.s2-demo-btn {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 4px 20px rgba(37,99,235,0.45);
  transition: all 0.15s;
  z-index: 10;
}
.s2-demo-btn:active { transform: translateX(-50%) scale(0.95); }
.s2-demo-btn.s2-demo-active {
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.s2-demo-icon { font-size: 13px; }



/* ── 设置面板 ── */
.s2-settings-overlay {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: 130px;
  background: rgba(0,0,0,0.12);
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 10;
  display: none;
}
.s2-settings-overlay.visible { opacity: 1; }
.s2-settings-sheet {
  position: absolute;
  left: 0; right: 0;
  bottom: 130px;
  background: #f2f2f7;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  z-index: 20;
  transform: translateY(100%);
  transition: transform 0.36s cubic-bezier(0.32,0.72,0,1);
  display: none;
}
.s2-settings-sheet.visible { transform: translateY(0); }
.s2-settings-group {
  margin: 12px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.s2-settings-label {
  padding: 12px 16px 4px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}
.s2-settings-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.s2-settings-option:hover { background: #f9fafb; }
.s2-settings-option.selected .s2-settings-radio { border-color: #2563eb; }
.s2-settings-option.selected .s2-settings-radio-dot { display: block; }
.s2-settings-option.selected .s2-settings-option-label { color: #2563eb; }
.s2-settings-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.s2-settings-radio-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2563eb;
  display: none;
}
.s2-settings-option-label { font-size: 11px; line-height: 1; color: #1C1C1E; }
.s2-settings-divider { margin-left: 48px; height: 1px; background: #f3f4f6; }

/* ── KeyHintPill ── */
.s2-key-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 50;
}
.s2-key-hint.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.s2-key-hint-pill {
  padding: 8px 20px;
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  white-space: nowrap;
}

/* ── 齿轮高亮脉冲 ── */
@keyframes s2-gear-ping {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}
.s2-gear-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37,99,235,0.35);
  animation: s2-gear-ping 0.8s ease-out infinite;
}
/* ── 移动端适配 ── */
@media (max-width: 767px) {
  /* 文本列恢复全宽（覆盖上方 24% 限制；移动端 .scene-row 已转纵排，
     24% 的 max-width 会把文本块压到 ~66px 宽） */
  .scene2-row .scene-text {
    flex: none;
    max-width: 100%;
  }
  /* iPhone + Mac 纵排：并排 zoom 后仍约 673px，远超手机视口 */
  .s2-wrapper {
    flex-direction: column;
    gap: 32px;
    min-height: 0;
  }
  #scene2-demo,
  #scene2-demo .s2-wrapper {
    min-height: 0;
  }
}
