@import "./node_modules/@whykusanagi/corrupted-theme/src/css/theme.css";

:root {
  color-scheme: dark;
  --bg-top: #06030d;
  --bg-mid: #140b21;
  --bg-bottom: #09060f;
  --frame: rgba(17, 10, 30, 0.82);
  --line: rgba(217, 79, 144, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Courier New", monospace;
  background:
    radial-gradient(circle at top, rgba(217, 79, 144, 0.16), transparent 34%),
    radial-gradient(circle at 72% 16%, rgba(139, 92, 246, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bottom) 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0 42%, rgba(4, 3, 8, 0.48) 78%, rgba(0, 0, 0, 0.78) 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
}

.app-shell {
  width: min(100vw, 1420px);
  margin: 0 auto;
  padding: min(3vw, 24px);
  position: relative;
  z-index: var(--z-elevated);
  display: grid;
  gap: 18px;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: min(1vw, 12px);
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24, 12, 36, 0.92), rgba(7, 4, 12, 0.84)),
    linear-gradient(135deg, rgba(217, 79, 144, 0.12), transparent 32%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(217, 79, 144, 0.18),
    inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px solid rgba(232, 108, 168, 0.18);
  box-shadow: inset 0 0 28px rgba(217, 79, 144, 0.1);
  pointer-events: none;
}

.stage-shell {
  position: absolute;
  inset: 16px 18px auto 18px;
  z-index: 3;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.stage-panel {
  display: grid;
  gap: 8px;
  padding: 0;
  width: min(352px, calc(100vw - 236px));
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.stage-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.stage-feed {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.26);
  background:
    linear-gradient(180deg, rgba(20, 12, 40, 0.76), rgba(10, 6, 20, 0.9)),
    radial-gradient(circle at right, rgba(217, 79, 144, 0.12), transparent 44%);
}

.burst-shell {
  width: 184px;
}

.stage-feed-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: "Courier New", monospace;
}

.stage-feed-text {
  min-height: 0;
  height: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  font-family: "SFMono-Regular", "Monaco", "Menlo", monospace;
  text-shadow: 0 0 18px rgba(217, 79, 144, 0.34);
  white-space: nowrap;
  overflow: hidden;
}

.stage-feed-text .revealed {
  color: rgba(245, 241, 248, 0.96);
}

.stage-feed-text .glitch {
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.42));
}

.burst-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  background:
    linear-gradient(180deg, rgba(22, 11, 35, 0.86), rgba(10, 6, 18, 0.94)),
    radial-gradient(circle at center, rgba(217, 79, 144, 0.12), transparent 58%);
  box-shadow: inset 0 0 24px rgba(217, 79, 144, 0.08);
  overflow: hidden;
}

.burst-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    radial-gradient(circle at center, rgba(217, 79, 144, 0.1), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.burst-card {
  position: relative;
}

.burst-avatar-shell {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 117, 214, 0.22), rgba(20, 12, 40, 0.96) 70%);
  border: 1px solid rgba(255, 117, 214, 0.18);
  box-shadow:
    inset 0 0 24px rgba(255, 117, 214, 0.12),
    0 0 22px rgba(139, 92, 246, 0.1);
  opacity: 0;
  transform: scale(0.82);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.burst-avatar-shell::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  background: radial-gradient(circle at center, rgba(255, 117, 214, 0.24), transparent 72%);
  filter: blur(10px);
}

.burst-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(0.95) contrast(1.02);
}

.burst-copy {
  display: grid;
  gap: 5px;
  align-content: center;
}

.burst-copy-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  line-height: 1;
  font-family: "Courier New", monospace;
}

.burst-meter {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.burst-meter-fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #8b5cf6, #ff73da);
  box-shadow: 0 0 14px rgba(255, 117, 214, 0.45);
  transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease;
}

.burst-copy-value {
  font-size: 12px;
  font-weight: 700;
  color: #f6eefb;
  line-height: 1;
  font-family: "Courier New", monospace;
}

.burst-card.ready .burst-avatar-shell,
.burst-card.active .burst-avatar-shell {
  opacity: 1;
  transform: scale(1);
}

.burst-card.ready .burst-avatar {
  filter: saturate(1.12) contrast(1.05);
}

.burst-card.ready .burst-avatar-shell {
  box-shadow:
    inset 0 0 30px rgba(255, 117, 214, 0.16),
    0 0 24px rgba(255, 117, 214, 0.18);
}

.burst-card.active .burst-avatar-shell {
  box-shadow:
    inset 0 0 34px rgba(255, 117, 214, 0.22),
    0 0 38px rgba(255, 117, 214, 0.26);
}

.burst-card.active .burst-avatar {
  opacity: 1;
}

.result-overlay {
  position: absolute;
  inset: 12px;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.frame.result-visible .result-overlay {
  display: flex;
}

.boss-transition-overlay {
  position: absolute;
  inset: 12px;
  z-index: 5;
  display: none;
  pointer-events: none;
}

.boss-transition-overlay.active {
  display: block;
}

.title-audio-panel {
  position: absolute;
  top: 106px;
  right: 22px;
  z-index: 6;
  display: grid;
  gap: 12px;
  width: 248px;
  padding: 14px 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  background:
    linear-gradient(180deg, rgba(16, 10, 28, 0.9), rgba(10, 6, 18, 0.94)),
    radial-gradient(circle at top, rgba(255, 104, 206, 0.12), transparent 66%);
  box-shadow:
    inset 0 0 24px rgba(255, 117, 214, 0.08),
    0 0 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.frame.title-active.title-audio-open .title-audio-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.title-audio-header,
.title-media-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title-audio-kicker,
.title-media-kicker {
  color: #ffb6e3;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.title-audio-sliders {
  display: grid;
  gap: 10px;
}

.title-audio-hint {
  color: rgba(226, 213, 240, 0.72);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.title-audio-slider-row {
  display: grid;
  gap: 5px;
  color: rgba(245, 239, 255, 0.94);
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.title-audio-slider-row span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 209, 235, 0.88);
}

.title-audio-slider-row input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #ff7ccc;
  cursor: pointer;
}

.title-audio-mute,
.title-media-button {
  border: 1px solid rgba(255, 127, 205, 0.24);
  border-radius: 999px;
  background: rgba(24, 12, 35, 0.88);
  color: #ffd7f1;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 9px 14px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.title-audio-mute:hover,
.title-media-button:hover {
  border-color: rgba(255, 173, 227, 0.48);
  background: rgba(35, 18, 48, 0.92);
  transform: translateY(-1px);
}

.title-audio-mute:disabled,
.title-media-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.title-audio-mute.active,
.title-media-button.active {
  background: rgba(88, 24, 86, 0.92);
  border-color: rgba(255, 177, 233, 0.58);
  box-shadow: 0 0 20px rgba(255, 102, 196, 0.18);
}

#title-media-loop.active {
  color: var(--accent, #ff8ad8);
  opacity: 1;
}

.title-media-player {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 6;
  width: min(760px, calc(100% - 120px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 24px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background:
    linear-gradient(180deg, rgba(16, 10, 28, 0.88), rgba(10, 6, 18, 0.94)),
    radial-gradient(circle at top left, rgba(255, 104, 206, 0.12), transparent 58%);
  box-shadow:
    inset 0 0 24px rgba(255, 117, 214, 0.08),
    0 0 28px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.frame.title-active .title-media-player {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.title-media-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.title-media-track {
  color: rgba(244, 239, 255, 0.96);
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.18);
}

.title-media-track.locked {
  color: rgba(216, 198, 215, 0.58);
}

.title-media-meta {
  color: rgba(210, 197, 228, 0.8);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.title-media-controls {
  justify-content: flex-end;
}

.title-media-button.primary {
  min-width: 78px;
}

.boss-transition-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 0, 16, 0.84), rgba(16, 8, 28, 0.42) 48%, rgba(4, 0, 10, 0.8)),
    radial-gradient(circle at center, rgba(255, 92, 194, 0.08), transparent 38%);
}

.boss-transition-ribbon {
  position: absolute;
  left: -48px;
  right: -48px;
  height: 42px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 208, 240, 0.3);
  border-bottom: 1px solid rgba(255, 208, 240, 0.24);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(255, 87, 188, 0.28) 18%, rgba(255, 199, 98, 0.18) 50%, rgba(255, 87, 188, 0.28) 82%, rgba(0, 0, 0, 0)),
    rgba(14, 8, 22, 0.78);
  box-shadow:
    0 0 28px rgba(255, 87, 188, 0.12),
    inset 0 0 26px rgba(255, 87, 188, 0.08);
}

.boss-transition-ribbon-top {
  top: 74px;
  transform: rotate(-1.2deg);
}

.boss-transition-ribbon-bottom {
  bottom: 88px;
  transform: rotate(1.1deg);
}

.boss-transition-ribbon-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  padding: 0 48px;
  font-family: "Courier New", monospace;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255, 243, 249, 0.96);
  text-shadow:
    0 0 18px rgba(255, 87, 188, 0.55),
    0 0 4px rgba(255, 255, 255, 0.24);
}

.boss-transition-ribbon-top .boss-transition-ribbon-track {
  animation: boss-ribbon-left 12s linear infinite;
}

.boss-transition-ribbon-bottom .boss-transition-ribbon-track {
  animation: boss-ribbon-right 13.5s linear infinite;
}

.boss-transition-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100% - 180px));
  padding: 26px 30px 24px;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border-radius: 30px;
  border: 1px solid rgba(255, 207, 241, 0.28);
  background:
    linear-gradient(180deg, rgba(12, 7, 21, 0.9), rgba(18, 10, 30, 0.86)),
    radial-gradient(circle at center, rgba(255, 97, 197, 0.12), transparent 64%);
  box-shadow:
    0 0 38px rgba(255, 87, 188, 0.16),
    inset 0 0 34px rgba(255, 87, 188, 0.08);
}

.boss-transition-portrait-shell {
  position: relative;
  min-height: 274px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 104, 206, 0.14), rgba(62, 15, 86, 0.22)),
    radial-gradient(circle at center, rgba(255, 137, 221, 0.16), transparent 70%);
  border: 1px solid rgba(255, 130, 218, 0.2);
}

.boss-transition-portrait-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: 0.5;
}

.boss-transition-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 18%;
  filter:
    drop-shadow(0 0 18px rgba(255, 113, 214, 0.36))
    drop-shadow(0 0 28px rgba(139, 92, 246, 0.22));
}

.boss-transition-copy {
  display: grid;
  align-content: center;
}

.boss-transition-kicker {
  display: block;
  margin-bottom: 10px;
  color: #ffbde5;
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.boss-transition-title {
  margin: 0 0 16px;
  color: #fff4fb;
  font-family: "Courier New", monospace;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.94;
  text-shadow:
    -2px -2px 0 #08050d,
    2px -2px 0 #08050d,
    -2px 2px 0 #08050d,
    2px 2px 0 #08050d,
    0 0 22px rgba(255, 87, 188, 0.72);
}

.boss-transition-typing {
  min-height: 48px;
  color: #9ff4ff;
  font-family: "SFMono-Regular", "Monaco", "Menlo", monospace;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(89, 232, 255, 0.28);
}

.boss-transition-typing .revealed {
  color: rgba(221, 251, 255, 0.98);
}

.boss-transition-typing .glitch {
  filter: drop-shadow(0 0 10px rgba(255, 87, 188, 0.46));
}

.result-modal {
  width: min(860px, calc(100vw - 96px));
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(11, 7, 19, 0.84), rgba(10, 6, 18, 0.74));
  border-color: rgba(232, 108, 168, 0.22);
}

.result-media-shell {
  width: 252px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 130, 218, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 104, 206, 0.16), rgba(62, 15, 86, 0.24)),
    radial-gradient(circle at center, rgba(255, 137, 221, 0.18), transparent 70%);
}

.result-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.result-copy {
  display: grid;
  gap: 12px;
  align-content: center;
}

.result-kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffb7e0;
  font-family: "Courier New", monospace;
}

.result-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  color: #f7f0ff;
  text-shadow:
    -2px -2px 0 #08050d,
    2px -2px 0 #08050d,
    -2px 2px 0 #08050d,
    2px 2px 0 #08050d,
    0 0 18px rgba(217, 79, 144, 0.75);
}

.result-score {
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 900;
  line-height: 0.96;
  color: #f7f0ff;
}

.result-stats {
  display: grid;
  gap: 6px;
  color: #d8cfe6;
  font-size: 20px;
  font-weight: 600;
  font-family: "Courier New", monospace;
}

.result-button {
  width: fit-content;
  min-width: 320px;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.26);
  background: rgba(22, 12, 31, 0.9);
  color: #ffd2f0;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  font-family: "Courier New", monospace;
}

.stage-progress-shell {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  z-index: 3;
  display: grid;
  gap: 6px;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.stage-progress-label {
  color: rgba(255, 198, 234, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "Courier New", monospace;
}

.stage-progress-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(232, 108, 168, 0.22);
  background:
    linear-gradient(180deg, rgba(18, 10, 28, 0.82), rgba(8, 6, 16, 0.9)),
    radial-gradient(circle at center, rgba(217, 79, 144, 0.1), transparent 62%);
}

.stage-progress-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.84), rgba(255, 115, 218, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px);
  box-shadow: 0 0 22px rgba(255, 115, 218, 0.34);
}

.stage-progress-phrase {
  position: absolute;
  inset: 0 12px;
  display: grid;
  align-items: center;
  color: rgba(255, 232, 245, 0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 0 14px rgba(255, 115, 218, 0.36);
  mix-blend-mode: screen;
  font-family: "Courier New", monospace;
}

.badge {
  font-family: "Courier New", monospace;
}

.frame.chrome-hidden .stage-shell,
.frame.cutin-active .stage-shell,
.frame.chrome-hidden .stage-progress-shell,
.frame.cutin-active .stage-progress-shell,
.frame.result-visible .stage-progress-shell,
.frame.gameplay-active .title-audio-panel,
.frame.result-visible .title-audio-panel {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

.frame.gameplay-active .title-media-player,
.frame.result-visible .title-media-player {
  opacity: 0;
  transform: translate(-50%, -18px);
  pointer-events: none;
}

.frame.result-visible .boss-transition-overlay {
  display: none !important;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 20px;
  background: #0d0914;
  cursor: default;
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.frame.gameplay-active canvas {
  cursor: none;
}

.stage-scanlines {
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0.28;
  pointer-events: none;
  z-index: 2;
}

.site-footer {
  display: grid;
  gap: 10px;
  padding: 18px 22px 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(15, 9, 24, 0.9), rgba(8, 5, 15, 0.94)),
    radial-gradient(circle at top right, rgba(217, 79, 144, 0.1), transparent 34%);
  border: 1px solid rgba(232, 108, 168, 0.18);
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.site-footer-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.site-footer-title {
  color: #ffd4ee;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer-meta {
  color: #ff94df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer-disclaimer {
  margin: 0;
  color: rgba(216, 207, 230, 0.86);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer-links,
.site-footer-branding {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;
}

.site-footer-links a,
.site-footer-button {
  color: #d9c8ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  font-family: "Courier New", monospace;
  background: rgba(22, 12, 31, 0.76);
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 999px;
  padding: 10px 14px;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.site-footer-button {
  cursor: pointer;
}

.site-footer-links a:hover,
.site-footer-button:hover {
  color: #ffd4ee;
  border-color: rgba(255, 128, 203, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 115, 218, 0.14);
}

.site-footer-branding {
  color: rgba(188, 177, 205, 0.8);
  font-size: 12px;
}

.site-footer-separator {
  color: rgba(255, 143, 222, 0.44);
}

.credits-overlay,
.sysreq-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 3, 8, 0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 25;
}

.credits-overlay.active,
.sysreq-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.credits-modal {
  width: min(920px, 100%);
  max-height: min(82vh, 880px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 26px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(17, 10, 29, 0.96), rgba(8, 5, 15, 0.98)),
    radial-gradient(circle at top right, rgba(217, 79, 144, 0.12), transparent 36%);
  border: 1px solid rgba(232, 108, 168, 0.2);
}

.credits-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.credits-kicker {
  display: block;
  color: #ff91dd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.credits-title {
  margin: 6px 0 0;
  color: #f7efff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.96;
  text-shadow:
    -2px -2px 0 #08050d,
    2px -2px 0 #08050d,
    -2px 2px 0 #08050d,
    2px 2px 0 #08050d,
    0 0 18px rgba(217, 79, 144, 0.6);
}

.credits-close-button {
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 999px;
  background: rgba(22, 12, 31, 0.82);
  color: #ffd2f0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}

.credits-note {
  margin: 0;
  color: rgba(214, 204, 230, 0.8);
  font-size: 13px;
  line-height: 1.45;
}

.credits-note code {
  color: #d9c8ff;
}

.credits-sections {
  display: grid;
  gap: 14px;
}

.credits-section {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border-radius: 18px;
  background: rgba(18, 10, 28, 0.72);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.credits-section-title {
  color: #ff9fdf;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credits-entry {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.credits-asset {
  color: #f7efff;
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

.credits-creator,
.credits-role {
  color: rgba(216, 207, 230, 0.78);
  font-size: 12px;
  line-height: 1.4;
}

/* System Requirements overlay */
.sysreq-content {
  display: grid;
  gap: 20px;
}

.sysreq-section {
  display: grid;
  gap: 8px;
}

.sysreq-heading {
  margin: 0;
  color: #ffd4ee;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sysreq-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #44ffaa;
  background: rgba(68, 255, 170, 0.1);
  border: 1px solid rgba(68, 255, 170, 0.25);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
  letter-spacing: 0.08em;
}

.sysreq-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: rgba(216, 207, 230, 0.88);
  font-size: 13px;
  line-height: 1.65;
}

.sysreq-list strong {
  color: #d9c8ff;
}

.sysreq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: rgba(216, 207, 230, 0.88);
}

.sysreq-table th {
  text-align: left;
  color: #d9c8ff;
  font-weight: 700;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sysreq-table td {
  padding: 5px 12px 5px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.sysreq-table td:first-child {
  color: rgba(216, 207, 230, 0.7);
}

@media (max-width: 900px) {
  .app-shell {
    gap: 14px;
  }

  .site-footer {
    padding: 16px;
  }

  .site-footer-links,
  .site-footer-branding,
  .credits-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .credits-modal {
    padding: 20px;
  }

  .title-audio-panel {
    top: auto;
    right: 20px;
    bottom: 24px;
    width: min(240px, calc(100% - 40px));
  }

  .title-media-player {
    width: calc(100% - 40px);
    left: 20px;
    bottom: 18px;
    grid-template-columns: 1fr;
    transform: translate(0, 14px);
  }

  .frame.title-active .title-media-player {
    transform: translate(0, 0);
  }

  .stage-panel {
    width: min(60vw, 280px);
  }

  .burst-shell {
    width: 160px;
  }

  .burst-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .burst-avatar-shell {
    display: none;
  }

  .result-modal {
    grid-template-columns: 1fr;
    width: min(92vw, 560px);
  }

  .result-media-shell {
    width: min(240px, 100%);
    justify-self: center;
  }

  .boss-transition-card {
    width: calc(100% - 64px);
    padding: 22px 20px 20px;
    grid-template-columns: 1fr;
  }

  .boss-transition-ribbon {
    left: -24px;
    right: -24px;
  }

  .boss-transition-portrait-shell {
    min-height: 184px;
  }

  .stage-progress-shell {
    left: 16px;
    right: 16px;
    bottom: 14px;
  }
}

@keyframes boss-ribbon-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-32%);
  }
}

/* ── Fullscreen ─────────────────────────────────────────────────────────────
   The frame (not the canvas) is fullscreened so all DOM overlays — stage
   badge, burst card, neural feed, boss transition, progress bar, title music
   player, audio panel — remain visible. Strip the decorative chrome and fill
   the viewport. The canvas is already width/height 100% so it fills the frame.
   ─────────────────────────────────────────────────────────────────────────── */
.frame:fullscreen,
.frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: unset;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #0d0914;
}

.frame:fullscreen::before,
.frame:-webkit-full-screen::before {
  display: none;
}

.frame:fullscreen canvas,
.frame:-webkit-full-screen canvas {
  border-radius: 0;
}

.frame:fullscreen .stage-scanlines,
.frame:-webkit-full-screen .stage-scanlines {
  border-radius: 0;
  inset: 0;
}

@keyframes boss-ribbon-right {
  from {
    transform: translateX(-32%);
  }
  to {
    transform: translateX(0);
  }
}
