/* Figma 节点 11012:1720 — 章节底部 Next 按钮（默认禁用） */

/* Figma 节点 11013:2006 — 选中选项后可点击态 */

body:has(.figma-game-header) .figma-chapter-nav {

  display: flex;

  align-items: center;

  gap: 10px;

  position: sticky;

  bottom: 0;

  z-index: 999;

  justify-content: flex-end;

  padding: 20px 20px 40px;

  background: rgba(0, 0, 0, 0.95);

  border-top: none;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  box-shadow: none;

}



body:has(.figma-game-header) .figma-chapter-nav .prev-btn {

  flex-shrink: 0;

  width: 260px;

  margin-right: auto;

}



body:has(.figma-game-header) .figma-chapter-nav .next-btn {

  flex-shrink: 0;

  width: 260px;

  margin-left: auto;

}



/* Figma 节点 11013:2593 — Back 按钮 */

body:has(.figma-game-header) .figma-back-btn {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 32px;

  box-sizing: border-box;

  width: 260px;

  height: 60px;

  min-width: 260px;

  min-height: 60px;

  padding: 0 24px;

  border: 1px solid #8800dd;

  border-radius: 12px;

  background: rgba(136, 0, 221, 0.2);

  color: #ffffff;

  cursor: pointer;

  text-decoration: none;

  transition: background-color 0.2s ease, border-color 0.2s ease;

}



body:has(.figma-game-header) .figma-back-btn:hover {

  background: rgba(136, 0, 221, 0.28);

  border-color: #9610ee;

  transform: none;

  box-shadow: none;

}



body:has(.figma-game-header) .figma-back-btn:active {

  transform: none;

}



.figma-back-btn__arrow {

  position: relative;

  flex-shrink: 0;

  width: 20px;

  height: 20px;

}



.figma-back-btn__arrow img {

  position: absolute;

  inset: 0;

  display: block;

  width: 100%;

  height: 100%;

  max-width: none;

}



.figma-back-btn__info {

  display: flex;

  flex-shrink: 0;

  align-items: center;

  justify-content: center;

}



.figma-back-btn__label {

  flex-shrink: 0;

  font-family: 'Lexend', sans-serif;

  font-size: 18px;

  font-weight: 700;

  line-height: 20px;

  color: #ffffff;

  white-space: nowrap;

}



body:has(.figma-game-header) .figma-next-btn {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 32px;

  box-sizing: border-box;

  width: 260px;

  height: 60px;

  min-width: 260px;

  min-height: 60px;

  padding: 0 24px;

  border: none;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.1);

  color: rgba(255, 255, 255, 0.5);

  cursor: pointer;

  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;

}



body:has(.figma-game-header) .figma-next-btn.nav-btn.disabled {

  opacity: 1 !important;

  border: none !important;

  background: rgba(255, 255, 255, 0.1) !important;

  box-shadow: none !important;

  cursor: not-allowed;

}



body:has(.figma-game-header) .figma-next-btn.nav-btn.disabled::after {

  display: none !important;

}



body:has(.figma-game-header) .figma-next-btn.nav-btn.disabled:hover {

  background: rgba(255, 255, 255, 0.1) !important;

  transform: none;

  box-shadow: none !important;

  opacity: 1 !important;

}



/* Figma 11013:2006 — 已选选项，Next 可点击 */

body:has(.figma-game-header) .figma-next-btn:not(.disabled) {

  background: #8800dd !important;

  color: #ffffff !important;

  cursor: pointer;

}



body:has(.figma-game-header) .figma-next-btn:not(.disabled):hover {

  background: #9610ee !important;

  transform: none;

  box-shadow: none;

  border: none;

}



body:has(.figma-game-header) .figma-next-btn:not(.disabled):active {

  transform: none;

}



body:has(.figma-game-header) .figma-next-btn.disabled {

  cursor: not-allowed;

}



/* Figma 节点 11013:2617 — Coming Soon! 终章占位按钮 */

body:has(.figma-game-header) .figma-next-btn--coming-soon {

  background: rgba(255, 255, 255, 0.1) !important;

  border: none !important;

  box-shadow: none !important;

  color: rgba(255, 255, 255, 0.5) !important;

  cursor: not-allowed;

  pointer-events: none;

}



body:has(.figma-game-header) .figma-next-btn--coming-soon:hover,

body:has(.figma-game-header) .figma-next-btn--coming-soon:active {

  background: rgba(255, 255, 255, 0.1) !important;

  transform: none;

  box-shadow: none !important;

}



body:has(.figma-game-header) .figma-next-btn--coming-soon .figma-next-btn__play {

  display: none !important;

}



body:has(.figma-game-header) .figma-next-btn--coming-soon .figma-next-btn__info {

  gap: 0;

}



body:has(.figma-game-header) .figma-next-btn--coming-soon .figma-next-btn__label {

  color: rgba(255, 255, 255, 0.5) !important;

}



body:has(.figma-game-header) .figma-next-btn--coming-soon .figma-next-btn__arrow img {

  opacity: 0.5;

}



.figma-next-btn__info {

  display: flex;

  flex-shrink: 0;

  align-items: center;

  justify-content: center;

  gap: 12px;

}



.figma-next-btn__play {

  display: flex;

  flex-shrink: 0;

  align-items: center;

  justify-content: center;

  width: 24px;

  height: 24px;

}



.figma-next-btn__play img {

  display: block;

  width: 100%;

  height: 100%;

  max-width: none;

}



body:has(.figma-game-header) .figma-next-btn.disabled .figma-next-btn__play img,

body:has(.figma-game-header) .figma-next-btn.disabled .figma-next-btn__arrow img {

  opacity: 0.5;

}



body:has(.figma-game-header) .figma-next-btn:not(.disabled) .figma-next-btn__play img,

body:has(.figma-game-header) .figma-next-btn:not(.disabled) .figma-next-btn__arrow img {

  opacity: 1;

}



body:has(.figma-game-header) .figma-next-btn__play.ads-btn[style*="display: none"],

body:has(.figma-game-header) .figma-next-btn__play.ads-btn[style*="display:none"] {

  display: none !important;

}



.figma-next-btn__label {

  flex-shrink: 0;

  font-family: 'Lexend', sans-serif;

  font-size: 18px;

  font-weight: 700;

  line-height: 20px;

  color: rgba(255, 255, 255, 0.5);

  white-space: nowrap;

}



body:has(.figma-game-header) .figma-next-btn:not(.disabled) .figma-next-btn__label {

  color: #ffffff;

}



.figma-next-btn__arrow {

  position: relative;

  flex-shrink: 0;

  width: 20px;

  height: 20px;

}



.figma-next-btn__arrow img {

  position: absolute;

  inset: 0;

  display: block;

  width: 100%;

  height: 100%;

  max-width: none;

}



@media (max-width: 768px) {

  body:has(.figma-game-header) .figma-chapter-nav {

    justify-content: stretch;

    padding: 12px 10px;

    padding-bottom: max(12px, env(safe-area-inset-bottom));

    gap: 10px;

  }



  body:has(.figma-game-header) .figma-chapter-nav .prev-btn,

  body:has(.figma-game-header) .figma-chapter-nav .next-btn {

    flex: 1 1 0;

    width: 0;

    min-width: 0;

    max-width: none;

    margin-left: 0;

    margin-right: 0;

  }



  body:has(.figma-game-header) .figma-back-btn,

  body:has(.figma-game-header) .figma-next-btn {

    width: 100%;

    min-width: 0;

    max-width: none;

    gap: 8px;

    padding: 0 8px;

  }



  body:has(.figma-game-header) .figma-next-btn__label {

    font-size: 16px;

  }



  body:has(.figma-game-header) .figma-back-btn__label {

    font-size: 16px;

  }

}


