/* 情景模拟 · 现场闯关 — 实训中心深色规范 */

.root[data-name="实训中心-情景闯关"] {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.root[data-name="实训中心-情景闯关"] .main.splay-main {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.splay-main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px var(--page-pad) 16px;
}

.splay {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* —— 面包屑 —— */
.splay-crumb {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.splay-crumb__back {
  width: var(--practice-crumb-back-size);
  height: var(--practice-crumb-back-size);
  border-radius: var(--practice-crumb-back-radius);
  border: 1px solid rgba(21, 247, 255, 0.22);
  background: linear-gradient(145deg, rgba(21, 247, 255, 0.16) 0%, rgba(21, 247, 255, 0.06) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.splay-crumb__back-icon {
  width: var(--practice-crumb-back-icon-box);
  height: var(--practice-crumb-back-icon-box);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.splay-crumb__back-icon svg {
  width: var(--practice-crumb-back-arrow-w);
  height: var(--practice-crumb-back-arrow-h);
  display: block;
}

.splay-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  line-height: 22px;
}

.splay-breadcrumb__link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.splay-breadcrumb__link:hover {
  color: #15f7ff;
}

.splay-breadcrumb__sep {
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.35);
}

.splay-breadcrumb__current {
  color: #15f7ff;
  font-weight: 600;
}

.splay-breadcrumb__text {
  color: #ffffff;
  white-space: nowrap;
}

/* —— 顶栏四关进度 —— */
.splay-steps {
  flex: 0 0 auto;
  position: relative;
  padding: 4px 4px 2px;
}

.splay-steps__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
  --splay-steps-gap: 8px;
  --splay-step-size: 32px;
}

.splay-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
  position: relative;
}

.splay-steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--splay-step-size) / 2);
  left: calc(50% + var(--splay-step-size) / 2);
  width: calc(100% + var(--splay-steps-gap) - var(--splay-step-size));
  height: 0;
  border-top: 2px dashed rgba(21, 247, 255, 0.38);
  pointer-events: none;
  z-index: 0;
  transform: translateY(-50%);
  box-sizing: border-box;
}

.splay-steps__item.is-done:not(:last-child)::after {
  border-top-style: solid;
  border-top-color: rgba(34, 197, 94, 0.75);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.splay-steps__num {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--splay-step-size);
  width: var(--splay-step-size);
  height: var(--splay-step-size);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.splay-steps__label {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.4);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splay-steps__item.is-current .splay-steps__num {
  color: #062028;
  border-color: #15f7ff;
  background: linear-gradient(145deg, #15f7ff 0%, #0ea5e9 100%);
  box-shadow: 0 0 16px rgba(21, 247, 255, 0.45);
}

.splay-steps__item.is-current .splay-steps__label {
  color: #15f7ff;
  font-weight: 600;
}

.splay-steps__item.is-done .splay-steps__num {
  border-color: rgba(34, 197, 94, 0.5);
  color: rgba(134, 239, 172, 0.95);
}

/* —— 现场情况 —— */
.splay-situation {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}

.splay-situation__tag {
  display: inline-block;
  margin-right: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
}

.splay-situation__text {
  display: inline;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

/* —— 对话主区 —— */
.splay-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(21, 247, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 24%),
    rgba(8, 14, 32, 0.75);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.splay-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.splay-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.splay-msg__avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center bottom;
  background: rgba(12, 22, 48, 0.65);
  border: 2px solid rgba(21, 247, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.splay-msg__body {
  flex: 1 1 auto;
  min-width: 0;
}

.splay-msg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.splay-msg__name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.splay-msg__stage {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.splay-msg__stage--op {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.splay-msg__stage--draw {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.splay-msg__stage--video {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.38);
}

.splay-msg__progress {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.splay-q-focus {
  position: relative;
  margin: 10px 0 8px;
  max-width: 320px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
}

.splay-q-focus img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.splay-q-focus figcaption {
  padding: 6px 8px;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.55);
}

.splay-q-hint {
  margin: 0 0 10px !important;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55) !important;
}

.splay-q-hint strong {
  color: rgba(21, 247, 255, 0.9);
  font-weight: 600;
}

.splay-msg__bubble {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(15, 28, 58, 0.88);
  border: 1px solid rgba(21, 247, 255, 0.14);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.splay-msg:not(.splay-msg--user) .splay-msg__bubble {
  background:
    linear-gradient(180deg, rgba(22, 40, 82, 0.95) 0%, rgba(14, 28, 56, 0.92) 100%);
}

.splay-msg:not(.splay-msg--user) .splay-msg__bubble strong {
  color: #15f7ff;
  font-weight: 600;
}

.splay-msg__bubble p {
  margin: 0 0 0.5rem;
}

.splay-msg__bubble p:last-child {
  margin-bottom: 0;
}

.splay-options {
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.splay-resources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.splay-resources > li {
  flex: 0 0 auto;
}

.splay-res {
  margin: 0;
  width: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  position: relative;
  box-sizing: border-box;
}

.splay-res img {
  display: block;
  width: 240px;
  height: 135px;
  object-fit: cover;
}

.splay-res figcaption {
  padding: 6px 8px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.55);
}

.splay-res__tag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
}

.splay-res__tag--photo {
  background: rgba(34, 197, 94, 0.85);
}

.splay-res__tag--draw {
  background: rgba(251, 191, 36, 0.9);
  color: #1a1200;
}

.splay-res__tag--video {
  background: rgba(249, 115, 22, 0.9);
}

.splay-resources__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.splay-res-extra {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.splay-res-extra__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(21, 247, 255, 0.35);
  background: rgba(21, 247, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: #15f7ff;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease;
  font-family: inherit;
  box-sizing: border-box;
}

.splay-res-extra__btn:hover {
  background: rgba(21, 247, 255, 0.18);
  border-color: rgba(21, 247, 255, 0.5);
}

.splay-res-extra__btn[aria-expanded="true"] {
  background: rgba(21, 247, 255, 0.22);
  border-color: rgba(21, 247, 255, 0.55);
}

.splay-res-parse {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.splay-res-parse[hidden] {
  display: none !important;
}

.splay-res-parse__title {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(21, 247, 255, 0.95);
}

.splay-res-parse ul {
  margin: 0;
  padding-left: 1.15em;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.splay-res-parse li {
  padding-left: 0.15em;
}

.splay-res-parse strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.splay-photo-compare__view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.splay-photo-compare__view[hidden] {
  display: none !important;
}

.splay-photo-compare__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.splay-photo-compare__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.splay-photo-compare__img {
  display: block;
  width: 240px;
  height: 135px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
}

.splay-photo-compare__clear {
  width: 100%;
  min-height: 1.75rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.splay-photo-compare__clear:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
}

.splay-photo-compare__clear[hidden] {
  display: none !important;
}

/* —— 底栏 —— */
.splay-composer {
  flex: 0 0 auto;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 24, 0.92);
}

.splay-composer__form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.splay-composer__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.8125rem;
}

.splay-composer__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.splay-composer__input:focus {
  outline: none;
  border-color: rgba(21, 247, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(21, 247, 255, 0.15);
}

.splay-composer__send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.75rem;
  padding: 0 1.125rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0a1628;
  cursor: pointer;
  background: linear-gradient(135deg, #15f7ff 0%, #53ffc9 55%, #15f7ff 100%);
  box-shadow: 0 6px 18px rgba(21, 247, 255, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.splay-composer__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(21, 247, 255, 0.38);
}

.splay-msg--user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.splay-msg--user .splay-msg__avatar {
  display: none;
}

.splay-msg--user .splay-msg__head {
  display: none;
}

.splay-msg--user .splay-msg__bubble {
  background: linear-gradient(145deg, rgba(21, 247, 255, 0.22) 0%, rgba(27, 78, 255, 0.45) 100%);
  color: #fff;
  border-color: rgba(21, 247, 255, 0.35);
  max-width: 100%;
  margin-left: auto;
}

@media (max-width: 56em) {
  .splay-composer__send span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .splay-composer__send {
    padding: 0 0.875rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .splay-composer__send {
    transition: none;
  }

  .splay-composer__send:hover {
    transform: none;
  }
}
