/**
 * 角色工作流 - 互动式教程样式
 * 赛博朋克风格动态教程
 */

/* ========== 变量定义 ========== */
:root {
  --g-bg: #0a0a0a;
  --g-primary: #00f3ff;
  --g-secondary: #ff00c1;
  --g-accent: #00f3ff;
  --g-text: #ffffff;
  --g-text-dim: #888888;
  --g-border: rgba(0, 243, 255, 0.3);
  --g-glow: rgba(0, 243, 255, 0.5);
  --g-font: 'JetBrains Mono', monospace;
}

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--g-font);
  background: var(--g-bg);
  color: var(--g-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== 视觉层 ========== */
.g-noise-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
}

.g-scanline {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.05) 51%);
  background-size: 100% 4px;
  z-index: 999;
  pointer-events: none;
}

/* ========== 进度指示器 ========== */
.g-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g-border);
}

.g-progress-bar {
  height: 2px;
  background: var(--g-border);
  margin-bottom: 15px;
  position: relative;
}

.g-progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--g-primary);
  box-shadow: 0 0 10px var(--g-glow);
  transition: width 0.3s ease;
}

.g-progress-chapters {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.g-chapter-dot {
  width: 30px;
  height: 30px;
  border: 1px solid var(--g-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--g-text-dim);
  cursor: pointer;
  transition: all 0.3s ease;
}

.g-chapter-dot.active {
  border-color: var(--g-primary);
  color: var(--g-primary);
  box-shadow: 0 0 15px var(--g-glow);
}

.g-chapter-dot.completed {
  background: var(--g-primary);
  color: var(--g-bg);
  border-color: var(--g-primary);
}

/* ========== 返回按钮 ========== */
.g-back-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 100;
  padding: 10px 20px;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--g-border);
  color: var(--g-text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.g-back-btn:hover {
  border-color: var(--g-primary);
  color: var(--g-primary);
}

/* ========== 主内容区 ========== */
.g-main {
  position: relative;
  z-index: 10;
}

.g-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 60px;
  scroll-snap-align: start;
  position: relative;
}

.g-section-content {
  max-width: 1200px;
  width: 100%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.g-section.visible .g-section-content {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 章节头部 ========== */
.g-chapter-header {
  text-align: center;
  margin-bottom: 60px;
}

.g-chapter-num {
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid var(--g-border);
  font-size: 12px;
  color: var(--g-primary);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.g-chapter-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 0 30px var(--g-glow);
}

.g-chapter-subtitle {
  font-size: 18px;
  color: var(--g-text-dim);
}

/* ========== 通用按钮 ========== */
.g-btn-cyber {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(135deg, var(--g-primary), #00a8b3);
  border: none;
  color: #000;
  font-family: var(--g-font);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
}

.g-btn-cyber::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.g-btn-cyber:hover::before {
  left: 100%;
}

.g-btn-cyber:hover {
  box-shadow: 0 0 30px var(--g-glow);
  transform: translateY(-2px);
}

.g-btn-large {
  padding: 20px 60px;
  font-size: 18px;
}

/* ========== 章节底部 ========== */
.g-section-footer {
  text-align: center;
  margin-top: 60px;
}

.g-insight {
  font-size: 16px;
  color: var(--g-text-dim);
  font-style: italic;
  margin-bottom: 30px;
  line-height: 1.8;
}

/* ========== 序章：系统故障 ========== */
.g-intro-screen {
  position: relative;
  margin-bottom: 60px;
}

.g-chaos-list {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-border);
  padding: 20px;
  animation: chaos-shake 0.5s ease-in-out infinite;
  animation-play-state: paused;
}

.g-section-intro.visible .g-chaos-list {
  animation-play-state: running;
}

@keyframes chaos-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-1deg); }
  75% { transform: translateX(5px) rotate(1deg); }
}

.g-chaos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g-border);
}

.g-chaos-title {
  font-size: 14px;
}

.g-chaos-count {
  background: var(--g-secondary);
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.g-chaos-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.g-chaos-item {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--g-text-dim);
  animation: item-flash 2s ease-in-out infinite;
}

.g-chaos-item:nth-child(odd) {
  animation-delay: 0.5s;
}

@keyframes item-flash {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; border-color: var(--g-secondary); }
}

/* 故障覆盖层 */
.g-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.9);
  opacity: 0;
  animation: error-appear 1s ease forwards 2s;
}

@keyframes error-appear {
  to { opacity: 1; }
}

.g-error-box {
  text-align: center;
  padding: 40px;
  border: 2px solid var(--g-secondary);
  background: rgba(255, 0, 193, 0.1);
  animation: error-glitch 0.3s ease-in-out infinite;
}

@keyframes error-glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
}

.g-error-icon {
  font-size: 48px;
  color: var(--g-secondary);
  margin-bottom: 20px;
}

.g-error-title {
  font-size: 24px;
  color: var(--g-secondary);
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.g-error-msg {
  color: var(--g-text-dim);
  margin-bottom: 10px;
  opacity: 0;
  animation: msg-appear 0.5s ease forwards;
}

.g-error-msg:nth-child(1) { animation-delay: 2.5s; }
.g-error-msg:nth-child(2) { animation-delay: 3s; }
.g-error-msg:nth-child(3) { animation-delay: 3.5s; }

@keyframes msg-appear {
  to { opacity: 1; }
}

/* 序章文字 */
.g-intro-text {
  text-align: center;
}

.g-glitch-text {
  font-size: 42px;
  font-weight: 700;
  position: relative;
  margin-bottom: 20px;
}

.g-glitch-text::before,
.g-glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.g-glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 var(--g-secondary);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-1 3s infinite linear alternate-reverse;
}

.g-glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 var(--g-primary);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% { clip: rect(12px, 9999px, 32px, 0); }
  25% { clip: rect(80px, 9999px, 90px, 0); }
  50% { clip: rect(40px, 9999px, 45px, 0); }
  75% { clip: rect(60px, 9999px, 70px, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-2 {
  0% { clip: rect(60px, 9999px, 70px, 0); }
  25% { clip: rect(10px, 9999px, 20px, 0); }
  50% { clip: rect(90px, 9999px, 95px, 0); }
  75% { clip: rect(30px, 9999px, 40px, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

.g-intro-desc {
  font-size: 18px;
  color: var(--g-text-dim);
  margin-bottom: 40px;
  line-height: 1.8;
}


/* ========== 第一章：角色觉醒 ========== */
.g-role-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.g-role-cards {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.g-role-card {
  width: 280px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-border);
  padding: 30px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.g-section-role.visible .g-role-card {
  opacity: 1;
  transform: translateY(0);
}

.g-section-role.visible .g-role-card:nth-child(1) { transition-delay: 0.2s; }
.g-section-role.visible .g-role-card:nth-child(2) { transition-delay: 0.4s; }
.g-section-role.visible .g-role-card:nth-child(3) { transition-delay: 0.6s; }

.g-role-card:hover {
  border-color: var(--g-primary);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 243, 255, 0.2);
}

.g-role-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--g-primary), var(--g-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.g-role-card:hover .g-role-card-glow {
  opacity: 1;
  box-shadow: 0 0 20px var(--g-glow);
}

.g-role-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.g-role-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.g-role-goal {
  font-size: 14px;
  color: var(--g-primary);
  margin-bottom: 15px;
}

.g-role-skills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.g-role-skills span {
  padding: 4px 10px;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--g-border);
  font-size: 12px;
  color: var(--g-text-dim);
}

/* 角色说明 */
.g-role-explain {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.g-explain-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}

.g-section-role.visible .g-explain-item {
  opacity: 1;
  transform: translateX(0);
}

.g-section-role.visible .g-explain-item:nth-child(1) { transition-delay: 0.8s; }
.g-section-role.visible .g-explain-item:nth-child(2) { transition-delay: 1s; }
.g-section-role.visible .g-explain-item:nth-child(3) { transition-delay: 1.2s; }

.g-explain-icon {
  font-size: 24px;
}

.g-explain-text {
  font-size: 16px;
  color: var(--g-text-dim);
}

/* ========== 第二章：金字塔模型 ========== */
.g-pyramid-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.g-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.g-pyramid-level {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-border);
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.g-section-pyramid.visible .g-pyramid-level {
  opacity: 1;
  transform: scale(1);
}

.g-section-pyramid.visible .g-level-1 { transition-delay: 0.2s; }
.g-section-pyramid.visible .g-level-2 { transition-delay: 0.5s; }
.g-section-pyramid.visible .g-level-3 { transition-delay: 0.8s; }

.g-level-1 {
  width: 200px;
  height: 80px;
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  border-color: var(--g-primary);
  box-shadow: 0 0 20px var(--g-glow);
}

.g-level-2 {
  width: 350px;
  height: 80px;
  clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

.g-level-3 {
  width: 500px;
  height: 80px;
}

.g-level-content {
  text-align: center;
  padding: 10px;
}

.g-level-icon {
  margin-right: 8px;
}

.g-level-name {
  font-size: 18px;
  font-weight: 600;
}

.g-level-split {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.g-level-items {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--g-text-dim);
}

.g-level-label {
  position: absolute;
  right: -150px;
  font-size: 12px;
  color: var(--g-primary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease 1s;
}

.g-section-pyramid.visible .g-level-label {
  opacity: 1;
}

/* 流动箭头 */
.g-pyramid-flow {
  display: flex;
  flex-direction: column;
  gap: 30px;
  opacity: 0;
  transition: opacity 0.5s ease 1.2s;
}

.g-section-pyramid.visible .g-pyramid-flow {
  opacity: 1;
}

.g-flow-down,
.g-flow-up {
  display: flex;
  align-items: center;
  gap: 10px;
}

.g-flow-arrow {
  font-size: 24px;
  color: var(--g-primary);
  animation: arrow-bounce 1s ease-in-out infinite;
}

.g-flow-up .g-flow-arrow {
  animation-delay: 0.5s;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.g-flow-text {
  font-size: 14px;
  color: var(--g-text-dim);
}

/* ========== 第三章：双线成长 ========== */
.g-dual-demo {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.g-dual-panel {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: all 0.6s ease;
}

.g-section-dual.visible .g-panel-project {
  opacity: 1;
  transform: translateX(0);
}

.g-section-dual.visible .g-panel-ability {
  opacity: 1;
  transform: translateX(0);
}

.g-panel-project {
  transform: translateX(-30px);
  transition-delay: 0.2s;
}

.g-panel-ability {
  transform: translateX(30px);
  transition-delay: 0.4s;
}

.g-panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--g-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.g-panel-icon {
  font-size: 24px;
}

.g-panel-title {
  font-size: 18px;
  font-weight: 600;
}

.g-panel-content {
  flex: 1;
  padding: 20px;
}

.g-panel-footer {
  padding: 20px;
  border-top: 1px solid var(--g-border);
  text-align: center;
}

.g-panel-footer p {
  font-size: 14px;
  color: var(--g-text-dim);
  margin-bottom: 5px;
}

/* 副本样式 */
.g-dungeon-name {
  font-size: 16px;
  color: var(--g-primary);
  margin-bottom: 20px;
}

.g-dungeon-tasks {
  margin-bottom: 20px;
}

.g-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--g-text-dim);
}

.g-task-item.done {
  color: var(--g-text);
}

.g-task-check {
  color: var(--g-primary);
}

.g-dungeon-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
  overflow: hidden;
}

.g-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--g-primary), var(--g-secondary));
  animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
  0%, 100% { box-shadow: 0 0 5px var(--g-glow); }
  50% { box-shadow: 0 0 15px var(--g-glow); }
}

.g-dungeon-status {
  font-size: 12px;
  color: var(--g-primary);
}

/* 技能树样式 */
.g-skill-name {
  font-size: 16px;
  color: var(--g-secondary);
  margin-bottom: 20px;
}

.g-skill-level {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.g-skill-label,
.g-exp-label,
.g-habit-label {
  font-size: 12px;
  color: var(--g-text-dim);
}

.g-skill-stars {
  display: flex;
  gap: 5px;
}

.g-star {
  font-size: 20px;
  color: var(--g-text-dim);
}

.g-star.active {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.g-skill-exp {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.g-exp-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.g-exp-fill {
  width: 64%;
  height: 100%;
  background: linear-gradient(90deg, var(--g-secondary), #ff6b6b);
  animation: exp-grow 2s ease-out forwards;
}

@keyframes exp-grow {
  from { width: 0; }
  to { width: 64%; }
}

.g-exp-text {
  font-size: 12px;
  color: var(--g-text-dim);
}

.g-skill-habits {
  display: flex;
  align-items: center;
  gap: 10px;
}

.g-habit-item {
  padding: 4px 10px;
  background: rgba(255, 0, 193, 0.1);
  border: 1px solid var(--g-secondary);
  font-size: 12px;
  color: var(--g-secondary);
}

/* VS 分隔 */
.g-dual-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--g-text-dim);
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}

.g-section-dual.visible .g-dual-vs {
  opacity: 1;
}


/* ========== 第四章：卡片与复盘 ========== */
.g-cards-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.g-loot-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  position: relative;
}

.g-boss-defeated {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease;
}

.g-section-cards.visible .g-boss-defeated {
  opacity: 1;
  transform: scale(1);
}

.g-boss-text {
  font-size: 24px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  animation: victory-pulse 1s ease-in-out infinite;
}

@keyframes victory-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.g-chest {
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.g-section-cards.visible .g-chest {
  opacity: 1;
}

.g-chest-box {
  font-size: 64px;
  animation: chest-shake 0.5s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes chest-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.g-chest-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
  transform: translate(-50%, -50%);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
}

/* 掉落卡片 */
.g-loot-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.g-loot-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--g-primary);
  opacity: 0;
  transform: translateY(-30px);
  transition: all 0.5s ease;
}

.g-section-cards.visible .g-loot-card[data-delay="0"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.5s;
}

.g-section-cards.visible .g-loot-card[data-delay="1"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.8s;
}

.g-section-cards.visible .g-loot-card[data-delay="2"] {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 2.1s;
}

.g-card-icon {
  font-size: 20px;
}

.g-card-text {
  font-size: 14px;
  color: var(--g-text);
}

/* 卡片价值 */
.g-cards-value {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.g-value-item {
  text-align: center;
  max-width: 200px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.g-section-cards.visible .g-value-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 2.4s; }
.g-section-cards.visible .g-value-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 2.6s; }
.g-section-cards.visible .g-value-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 2.8s; }

.g-value-icon {
  font-size: 36px;
  margin-bottom: 15px;
}

.g-value-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--g-primary);
}

.g-value-desc {
  font-size: 14px;
  color: var(--g-text-dim);
  line-height: 1.6;
}

/* 复盘闭环 */
.g-review-loop {
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease 3s;
}

.g-section-cards.visible .g-review-loop {
  opacity: 1;
}

.g-loop-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--g-secondary);
}

.g-loop-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.g-loop-node {
  padding: 10px 20px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-border);
  font-size: 14px;
}

.g-loop-start {
  border-color: var(--g-primary);
  color: var(--g-primary);
}

.g-loop-arrow {
  color: var(--g-primary);
  font-size: 20px;
  animation: arrow-flow 1s ease-in-out infinite;
}

@keyframes arrow-flow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== 终章：系统就绪 ========== */
.g-section-final {
  background: radial-gradient(circle at center, rgba(0, 243, 255, 0.05), transparent 70%);
}

.g-final-screen {
  text-align: center;
}

.g-system-ready {
  margin-bottom: 50px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease;
}

.g-section-final.visible .g-system-ready {
  opacity: 1;
  transform: scale(1);
}

.g-ready-icon {
  width: 80px;
  height: 80px;
  border: 3px solid var(--g-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--g-primary);
  margin: 0 auto 30px;
  box-shadow: 0 0 30px var(--g-glow);
  animation: ready-pulse 2s ease-in-out infinite;
}

@keyframes ready-pulse {
  0%, 100% { box-shadow: 0 0 30px var(--g-glow); }
  50% { box-shadow: 0 0 50px var(--g-glow), 0 0 80px var(--g-glow); }
}

.g-ready-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 0 30px var(--g-glow);
}

.g-ready-subtitle {
  font-size: 18px;
  color: var(--g-text-dim);
}

/* 公式 */
.g-formula {
  margin-bottom: 50px;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.g-section-final.visible .g-formula {
  opacity: 1;
}

.g-formula-box {
  display: inline-block;
  padding: 30px 50px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--g-primary);
  position: relative;
}

.g-formula-label {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--g-bg);
  padding: 0 10px;
  font-size: 12px;
  color: var(--g-primary);
}

.g-formula-content {
  font-size: 20px;
  color: var(--g-text);
  letter-spacing: 1px;
}

/* 总结 */
.g-summary {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.g-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.g-section-final.visible .g-summary-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }
.g-section-final.visible .g-summary-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 1s; }
.g-section-final.visible .g-summary-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 1.2s; }
.g-section-final.visible .g-summary-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 1.4s; }

.g-summary-icon {
  font-size: 24px;
}

.g-summary-text {
  font-size: 16px;
  color: var(--g-text-dim);
}

/* CTA */
.g-final-cta {
  opacity: 0;
  transition: opacity 0.5s ease 1.6s;
}

.g-section-final.visible .g-final-cta {
  opacity: 1;
}

.g-cta-text {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--g-text);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .g-section {
    padding: 80px 20px 40px;
  }
  
  .g-chapter-title {
    font-size: 32px;
  }
  
  .g-glitch-text {
    font-size: 28px;
  }
  
  .g-role-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .g-role-card {
    width: 100%;
    max-width: 300px;
  }
  
  .g-role-explain {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .g-pyramid-level {
    width: 100% !important;
    max-width: 350px;
  }
  
  .g-level-label {
    position: static;
    margin-top: 10px;
    text-align: center;
  }
  
  .g-pyramid-flow {
    flex-direction: row;
    margin-top: 20px;
  }
  
  .g-dual-demo {
    flex-direction: column;
  }
  
  .g-dual-panel {
    max-width: 100%;
  }
  
  .g-dual-vs {
    transform: rotate(90deg);
  }
  
  .g-loop-diagram {
    flex-direction: column;
  }
  
  .g-loop-arrow {
    transform: rotate(90deg);
  }
  
  .g-formula-content {
    font-size: 14px;
  }
  
  .g-summary {
    flex-direction: column;
    align-items: center;
  }
  
  .g-progress {
    padding: 15px 20px;
  }
  
  .g-chapter-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  
  .g-back-btn {
    bottom: 20px;
    left: 20px;
    padding: 8px 15px;
    font-size: 12px;
  }
}
