/* =============================================================================
   scene-07.css · 编辑器与终端（VS Code 工业质感暗色 · 自绘）
   只保留编辑器 / 终端的工业界面本身：无 macOS 红绿灯、无 Windows 标题栏。
   ========================================================================== */

.scene-s07 {
  background: #04060a;
}

.scene-s07 .s07-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #04060a;
}

/* ---------- 整屏容器 ---------- */
.scene-s07 .s07-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0b0f14;
}

.scene-s07 .s07-screen.is-in {
  animation: s07-in 600ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes s07-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =============================================================================
   顶部独立倒计时状态条（不压标签页、不裁切；半透明、不抢戏）
   ============================================================================= */
.scene-s07 .s07-tcbar {
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 0 26px;
  background: linear-gradient(180deg, rgba(8, 11, 16, 0.96) 0%, rgba(6, 9, 13, 0.70) 100%);
  border-bottom: 1px solid rgba(150, 180, 205, 0.06);
  position: relative;
  z-index: 2;
}

.scene-s07 .s07-tcbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scene-s07 .s07-tc-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9605a;
  box-shadow: 0 0 10px rgba(217, 71, 59, 0.5);
  animation: s07-tcdot 2.6s ease-in-out infinite;
}

@keyframes s07-tcdot {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.scene-s07 .s07-tc-label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.30em;
  color: rgba(226, 216, 202, 0.28);
}

.scene-s07 .s07-tcbar-right {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.scene-s07 .s07-tc-time {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(217, 71, 59, 0.66);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(217, 71, 59, 0.18);
}

.scene-s07 .s07-tc-sub {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(217, 71, 59, 0.30);
}

/* 倒计时进入最后 40s：稍亮、极缓心跳（仍克制，不抢戏） */
.scene-s07 .s07-root.is-urgent .s07-tc-time {
  color: rgba(232, 96, 78, 0.88);
  animation: s07-tc-pulse 2.4s ease-in-out infinite;
}

.scene-s07 .s07-root.is-urgent .s07-tc-label {
  color: rgba(217, 71, 59, 0.42);
}

@keyframes s07-tc-pulse {
  0%, 100% { text-shadow: 0 0 22px rgba(217, 71, 59, 0.14); }
  50% { text-shadow: 0 0 38px rgba(217, 71, 59, 0.34); }
}

/* =============================================================================
   标签页
   ========================================================================== */
.scene-s07 .s07-tabs {
  flex: 0 0 50px;
  height: 50px;
  display: flex;
  align-items: stretch;
  background: #070a0e;
  border-bottom: 1px solid rgba(150, 180, 205, 0.07);
}

.scene-s07 .s07-tabs-left {
  display: flex;
  align-items: stretch;
}

.scene-s07 .s07-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #75828e;
  background: #080b10;
  border-right: 1px solid rgba(140, 170, 195, 0.06);
  white-space: nowrap;
}

.scene-s07 .s07-tab.is-active {
  background: #0b0f14;
  color: #ccd6e0;
}

.scene-s07 .s07-tab.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(124, 201, 216, 0.42), rgba(124, 201, 216, 0.10));
}

.scene-s07 .s07-tab-dirty {
  font-size: 9px;
  color: #c9905f;
  opacity: 0.85;
  transform: translateY(-1px);
}

.scene-s07 .s07-crumb {
  flex: 0 0 26px;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 26px;
  background: #0a0e13;
  border-bottom: 1px solid rgba(150, 180, 205, 0.045);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #5f6b77;
}

.scene-s07 .s07-crumb-sep { color: #414b56; }
.scene-s07 .s07-crumb-fn { color: #8799a8; }

/* =============================================================================
   编辑器
   ========================================================================== */
.scene-s07 .s07-editor {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 66% 50% at 22% 0%, rgba(120, 160, 190, 0.030) 0%, rgba(0, 0, 0, 0) 68%),
    #0b0f14;
}

.scene-s07 .s07-editor::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 12px 20px -14px rgba(0, 0, 0, 0.8);
}

.scene-s07 .s07-lines {
  padding-top: 10px;
}

.scene-s07 .s07-line {
  display: flex;
  align-items: flex-start;
  height: 32px;
  line-height: 32px;
  padding-left: 14px;
  white-space: pre;
  position: relative;
}

/* 缩进参考线（VS Code 工业质感，极淡竖线） */
.scene-s07 .s07-guide {
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: rgba(180, 205, 220, 0.055);
  pointer-events: none;
}

.scene-s07 .s07-line.is-cur {
  background: rgba(255, 255, 255, 0.027);
}

.scene-s07 .s07-line.is-pre {
  opacity: 1;
  transform: none;
  animation: none;
}

.scene-s07 .s07-ln {
  flex: 0 0 62px;
  text-align: right;
  padding-right: 18px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 17px;
  color: #3c4854;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.scene-s07 .s07-line.is-cur .s07-ln { color: #94a3b1; }

.scene-s07 .s07-code {
  position: relative;
  height: 32px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 22px;
  line-height: 32px;
  padding-left: 20px;
  color: #c9d3dd;
  letter-spacing: 0;
  font-variant-ligatures: none;
  text-shadow: 0 0 16px rgba(186, 212, 234, 0.06);
}

.scene-s07 .s07-code.is-shift {
  animation: s07-shift 130ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes s07-shift {
  from { transform: translate3d(0, -18px, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* 光标（VS Code 线性光标，微微呼吸） */
.scene-s07 .s07-caret {
  display: inline-block;
  width: 2px;
  height: 1.16em;
  background: #cfdae4;
  margin-left: 1px;
  vertical-align: -0.19em;
  box-shadow: 0 0 10px rgba(200, 224, 245, 0.35);
  animation: s07-blink 1.06s steps(1) infinite;
}

@keyframes s07-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

/* ---------- Python 语法着色（Dark+ 去饱和变体） ---------- */
.scene-s07 .py-com { color: #5f7d67; }
.scene-s07 .py-str { color: #c58f6b; }
.scene-s07 .py-kw  { color: #b487c0; }
.scene-s07 .py-kw2 { color: #6ba6d9; }
.scene-s07 .py-fn  { color: #d6cb8f; }
.scene-s07 .py-cls { color: #56b1a4; }
.scene-s07 .py-bi  { color: #9fc3d6; }
.scene-s07 .py-num { color: #a8c48c; }
.scene-s07 .py-var { color: #b6cddd; }
.scene-s07 .py-punc { color: #8894a2; }

/* =============================================================================
   终端
   ========================================================================== */
.scene-s07 .s07-term {
  flex: 0 0 344px;
  height: 344px;
  display: flex;
  flex-direction: column;
  background: #06090c;
  border-top: 1px solid rgba(150, 180, 205, 0.09);
  transition: background 2400ms ease;
}

.scene-s07 .s07-term-head {
  flex: 0 0 28px;
  height: 28px;
  display: flex;
  align-items: stretch;
  padding: 0 18px;
  background: #070a0e;
  border-bottom: 1px solid rgba(150, 180, 205, 0.05);
}

.scene-s07 .s07-term-tab {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 12.5px;
  letter-spacing: 0.15em;
  color: #5d6874;
}

.scene-s07 .s07-term-tab.is-active { color: #bcc8d2; }

.scene-s07 .s07-term-tab.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1.5px;
  background: rgba(124, 201, 216, 0.42);
}

.scene-s07 .s07-term-tab em {
  font-style: normal;
  color: #c9a05c;
  margin-left: 5px;
}

.scene-s07 .s07-term-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #46525e;
}

.scene-s07 .s07-term-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  padding-top: 4px;
}

.scene-s07 .s07-term-lines {
  will-change: transform;
}

.scene-s07 .s07-tline {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 20px;
  line-height: 31px;
  white-space: pre;
  color: #b9c4cf;
  padding: 0 26px;
}

.scene-s07 .t-ts { color: #54646f; }
.scene-s07 .t-lv {
  display: inline-block;
  width: 6.4ch;
  margin-left: 1ch;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.scene-s07 .t-info  { color: #6d97aa; }
.scene-s07 .t-warn  { color: #cda05c; }
.scene-s07 .t-error { color: #d5685a; }
.scene-s07 .t-alarm { color: #e06552; text-shadow: 0 0 18px rgba(217, 71, 59, 0.24); }

.scene-s07 .t-lg {
  display: inline-block;
  width: 22ch;
  margin-left: 1ch;
  color: #6d7b88;
}

.scene-s07 .t-msg { color: #b9c4cf; }
.scene-s07 .t-val { color: #8fd0c0; font-weight: 500; }
.scene-s07 .t-raw { color: #8d9aa5; padding-left: 2ch; }

.scene-s07 .s07-tline.is-alarm {
  background: linear-gradient(90deg, rgba(150, 34, 24, 0.075) 0%, rgba(150, 34, 24, 0) 62%);
}

.scene-s07 .s07-tline.is-error {
  background: linear-gradient(90deg, rgba(140, 36, 28, 0.045) 0%, rgba(140, 36, 28, 0) 62%);
}

/* 终端提示符 */
.scene-s07 .t-user,
.scene-s07 .t-host { color: #8fc9a6; }
.scene-s07 .t-path { color: #74b6c4; }
.scene-s07 .t-punc { color: #7c8995; }
.scene-s07 .t-cmd  { color: #e4ebf1; }

.scene-s07 .s07-tcaret {
  display: inline-block;
  width: 0.62em;
  height: 1.16em;
  background: #c6d2dc;
  margin-left: 1px;
  vertical-align: -0.21em;
  opacity: 0.82;
  animation: s07-blink 1.02s steps(1) infinite;
}

/* 末段压力：终端底色泛起极淡的暗红，边缘警戒加深 */
.scene-s07 .s07-root.is-pressure .s07-term {
  background:
    linear-gradient(180deg, rgba(74, 15, 11, 0.15) 0%, rgba(6, 9, 12, 0) 55%),
    #06090c;
}

.scene-s07 .s07-root.is-pressure .s07-edge {
  animation-duration: 4.6s;
}

/* =============================================================================
   状态栏
   ========================================================================== */
.scene-s07 .s07-status {
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #0a0e13;
  border-top: 1px solid rgba(150, 180, 205, 0.10);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #6d7985;
}

.scene-s07 .s07-status-left,
.scene-s07 .s07-status-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.scene-s07 .s07-st {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.scene-s07 .s07-ico {
  width: 13px;
  height: 13px;
  color: #86c9a3;
  opacity: 0.7;
}

.scene-s07 .s07-ind {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.scene-s07 .s07-ind-err { background: #c25d55; }
.scene-s07 .s07-ind-warn { background: #c29858; }

.scene-s07 .s07-st-pos { color: #8b98a4; }

.scene-s07 .s07-st-temp b {
  font-weight: 500;
  color: #cf8f6d;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   屏幕质感叠加：边缘警戒呼吸 / 屏幕反光 / 扫描线
   ========================================================================== */
.scene-s07 .s07-edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 88% 80% at 50% 50%,
    rgba(0, 0, 0, 0) 44%,
    rgba(74, 14, 10, 0.10) 64%,
    rgba(150, 30, 20, 0.26) 84%,
    rgba(52, 8, 6, 0.58) 100%);
  animation: s07-edge 7.4s ease-in-out infinite;
}

@keyframes s07-edge {
  0%, 100% { opacity: 0.68; }
  50% { opacity: 1; }
}

/* 末段热压上升：画面下缘泛起极淡的暗红热光（呼吸） */
.scene-s07 .s07-heat {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2600ms cubic-bezier(0.33, 0, 0.15, 1);
  background:
    radial-gradient(ellipse 78% 34% at 50% 104%, rgba(190, 52, 34, 0.16) 0%, rgba(120, 26, 18, 0.05) 48%, rgba(0, 0, 0, 0) 74%);
}

.scene-s07 .s07-root.is-pressure .s07-heat {
  opacity: 1;
  animation: s07-heat 3.8s ease-in-out infinite;
}

@keyframes s07-heat {
  0%, 100% { filter: brightness(0.82); }
  50% { filter: brightness(1.16); }
}

.scene-s07 .s07-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 58% 40% at 16% -6%, rgba(168, 205, 228, 0.045) 0%, rgba(0, 0, 0, 0) 70%);
}

.scene-s07 .s07-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg,
    rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 3px);
  opacity: 0.3;
}
