:root {
  --ink: #090a08;
  --paper: #f3f0e6;
  --acid: #d9ff43;
  --violet: #7b79ff;
  --cyan: #9de7ff;
  --line: rgba(255, 255, 255, 0.18);
  --energy-scale: 1;
  --energy-opacity: 0.16;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  --font-display: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 52%, rgba(123, 121, 255, 0.17), transparent 31%),
    var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 900;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient-canvas,
.page-grid,
.page-noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-canvas {
  z-index: 0;
  opacity: var(--energy-opacity);
  filter: blur(0.3px);
  transition: opacity 120ms linear;
}

.page-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.62) 58%, transparent 86%);
}

.page-noise {
  z-index: 2;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.anthem-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: 68px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(18px, 2.8vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 8, 0.72);
  backdrop-filter: blur(18px);
}

.anthem-brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.anthem-brand > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  transform: skew(-8deg);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.anthem-brand:hover > span {
  transform: skew(-8deg) rotate(8deg) scale(1.08);
}

.anthem-brand strong,
.anthem-header p,
.back-link {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.anthem-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
}

.anthem-header p span {
  color: var(--acid);
}

.back-link {
  justify-self: end;
  color: rgba(255, 255, 255, 0.74);
  text-decoration: none;
}

.back-link:hover {
  color: var(--acid);
}

.anthem-layout {
  position: relative;
  z-index: 3;
  display: grid;
  height: 100svh;
  grid-template-columns: minmax(0, 1.45fr) minmax(370px, 0.72fr);
  padding-top: 68px;
}

.anthem-stage {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto minmax(170px, 1fr) auto auto auto;
  padding: clamp(24px, 3vw, 46px) clamp(24px, 4.2vw, 68px) 22px;
  overflow: hidden;
}

.anthem-stage::before {
  position: absolute;
  z-index: -1;
  top: 24%;
  left: 33%;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(217, 255, 67, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(217, 255, 67, 0.025),
    0 0 0 86px rgba(123, 121, 255, 0.025),
    0 0 120px rgba(123, 121, 255, 0.2);
  content: "";
  opacity: calc(0.54 + var(--energy-opacity));
  transform: translate(-50%, -50%) scale(var(--energy-scale));
  transition: transform 100ms linear, opacity 100ms linear;
}

.stage-status,
.stage-footer,
.visualizer-label,
.player-controls,
.lyrics-footer {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.stage-status,
.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.47);
}

.stage-status > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--acid);
}

.stage-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 0 5px rgba(217, 255, 67, 0.1);
}

.stage-status i.is-live {
  animation: status-pulse 1.1s ease-out infinite;
}

.stage-status i.is-error {
  color: #ff7a64;
}

.title-block {
  position: relative;
  z-index: 2;
  margin-top: clamp(22px, 4vh, 44px);
}

.title-kicker {
  margin: 0 0 13px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.title-block h1 {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: clamp(58px, 7.8vw, 128px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.78;
}

.title-block.is-english h1 {
  font-size: clamp(48px, 6.5vw, 104px);
  letter-spacing: -0.06em;
  line-height: 0.84;
}

.title-block h1 > span {
  display: block;
  width: max-content;
  max-width: 100%;
  transform: translateY(20px);
  opacity: 0;
}

body.is-ready .title-block h1 > span {
  transform: translateY(0);
  opacity: 1;
  transition: opacity 620ms ease, transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-ready .title-block h1 > span:nth-child(2) {
  transition-delay: 90ms;
}

.title-outline {
  align-self: flex-end;
  padding-right: 0.06em;
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.18vw, 3px) #fff;
}

.title-note {
  max-width: 540px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.visualizer {
  position: relative;
  min-height: 170px;
  margin-top: clamp(16px, 3vh, 34px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

#wave-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.visualizer-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 104px;
  height: 104px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.visualizer-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(217, 255, 67, 0.38);
  border-radius: 50%;
  opacity: 0;
}

.visualizer[data-playing="true"] .visualizer-rings i {
  animation: ring-out 2.1s ease-out infinite;
}

.visualizer[data-playing="true"] .visualizer-rings i:nth-child(2) {
  animation-delay: 0.7s;
}

.visualizer[data-playing="true"] .visualizer-rings i:nth-child(3) {
  animation-delay: 1.4s;
}

.play-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 76px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--acid);
  border-radius: 50%;
  background: rgba(9, 10, 8, 0.86);
  box-shadow: 0 0 0 9px rgba(9, 10, 8, 0.62), 0 0 55px rgba(217, 255, 67, 0.12);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.play-button:hover {
  background: var(--acid);
  color: var(--ink);
  transform: translate(-50%, -50%) scale(1.06);
}

.play-button:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentcolor;
}

.play-button.is-playing .play-icon {
  width: 15px;
  height: 19px;
  margin-left: 0;
  border: 0;
  border-right: 5px solid currentcolor;
  border-left: 5px solid currentcolor;
}

.visualizer-label {
  position: absolute;
  right: 0;
  bottom: 9px;
  left: 0;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.current-lyric {
  display: grid;
  min-height: 70px;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.current-lyric > span {
  color: var(--acid);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.current-lyric strong {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(17px, 2vw, 27px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-controls {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 15px;
  align-items: center;
  padding: 15px 0;
  color: rgba(255, 255, 255, 0.63);
  font-variant-numeric: tabular-nums;
}

.player-controls time:last-child {
  text-align: right;
}

.seek-label {
  display: flex;
  align-items: center;
}

#seek-control {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

#seek-control::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--acid) var(--seek-progress, 0%), rgba(255, 255, 255, 0.2) var(--seek-progress, 0%));
}

#seek-control::-moz-range-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

#seek-control::-moz-range-progress {
  height: 3px;
  background: var(--acid);
}

#seek-control::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(217, 255, 67, 0.12);
}

#seek-control::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 0;
  background: var(--acid);
}

.stage-footer {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.lyrics-panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: rgba(13, 14, 12, 0.83);
  backdrop-filter: blur(24px);
}

.track-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.track-switcher button {
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  padding: 14px clamp(14px, 1.7vw, 24px);
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.track-switcher button:nth-child(even) {
  border-right: 0;
}

.track-switcher button:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.track-switcher button:hover {
  color: #fff;
}

.track-switcher button[aria-selected="true"] {
  background: var(--violet);
  color: #fff;
}

.track-switcher small {
  color: var(--acid);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.track-switcher strong {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.2;
}

.lyrics-header {
  display: flex;
  min-height: 100px;
  align-items: end;
  justify-content: space-between;
  padding: 20px clamp(22px, 2.7vw, 40px) 16px;
  border-bottom: 1px solid var(--line);
}

.lyrics-header span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.lyrics-header h2 {
  margin: 3px 0 0;
  font-size: clamp(32px, 3vw, 48px);
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.lyrics-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.lyrics-header p b {
  color: var(--acid);
  font-weight: 500;
}

.lyrics-scroll {
  min-height: 0;
  padding:
    clamp(80px, 12vh, 140px)
    clamp(22px, 2.7vw, 40px);

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--acid) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  position: relative;
}

.lyrics-scroll::-webkit-scrollbar {
  width: 5px;
}

.lyrics-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.lyrics-scroll::-webkit-scrollbar-thumb {
  background: var(--acid);
}

.lyrics-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lyric-line {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 0;
  color: rgba(255, 255, 255, 0.24);
  transition: color 220ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lyric-line::before {
  color: rgba(255, 255, 255, 0.16);
  content: attr(data-time);
  font-family: var(--font-display);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lyric-line button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: clamp(16px, 1.55vw, 23px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.28;
  text-align: left;
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.68);
}

.lyric-line.is-near {
  color: rgba(255, 255, 255, 0.5);
}

.lyric-line.is-active {
  color: #fff;
  transform: translateX(9px);
}

.lyric-line.is-active::before {
  color: var(--acid);
  content: "▶";
}

.lyric-line.is-active button {
  text-shadow: 0 0 26px rgba(217, 255, 67, 0.18);
}

.lyric-break {
  height: 25px;
  margin: 10px 0;
  border-left: 1px solid rgba(217, 255, 67, 0.32);
}

.lyrics-loading,
.lyrics-error {
  color: var(--acid);
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.08em;
}

.lyrics-loading span {
  animation: blink 800ms steps(1) infinite;
}

.lyrics-footer {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 2.7vw, 40px);
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.35);
}

.lyrics-footer span:last-child {
  color: var(--acid);
}

@keyframes ring-out {
  from { opacity: 0.65; transform: scale(0.56); }
  to { opacity: 0; transform: scale(1.85); }
}

@keyframes status-pulse {
  70% { box-shadow: 0 0 0 9px rgba(217, 255, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 255, 67, 0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .anthem-layout {
    height: auto;
    min-height: 100svh;
    grid-template-columns: 1fr;
  }

  .anthem-stage {
    min-height: calc(100svh - 68px);
  }

  .lyrics-panel {
    height: min(850px, 100svh);
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .page-grid {
    mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.25) 80%, transparent);
  }
}

@media (max-width: 600px) {
  .anthem-header {
    height: 62px;
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .anthem-header p {
    display: none;
  }

  .anthem-brand strong,
  .back-link {
    font-size: 11px;
  }

  .anthem-layout {
    padding-top: 62px;
  }

  .anthem-stage {
    min-height: calc(100svh - 62px);
    grid-template-rows: auto auto minmax(150px, 1fr) auto auto auto;
    padding: 20px 17px 16px;
  }

  .stage-status > span:last-child,
  .stage-footer span:nth-child(2) {
    display: none;
  }

  .title-block {
    margin-top: 26px;
  }

  .title-block h1 {
    font-size: clamp(57px, 20vw, 86px);
  }

  .title-block.is-english h1 {
    font-size: clamp(43px, 14vw, 60px);
  }

  .title-outline {
    align-self: flex-start;
    margin-left: 0.3em;
  }

  .title-note {
    margin-top: 17px;
    font-size: 12px;
  }

  .visualizer {
    min-height: 150px;
    margin-top: 18px;
  }

  .play-button {
    width: 66px;
    height: 66px;
  }

  .current-lyric {
    min-height: 66px;
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .current-lyric strong {
    font-size: 18px;
  }

  .stage-footer {
    font-size: 10px;
  }

  .lyrics-header {
    min-height: 106px;
    padding: 22px 18px 17px;
  }

.track-switcher button {
  min-height: 72px;
  padding: 10px clamp(14px, 1.7vw, 24px);
}
  .lyrics-scroll {
    padding-right: 18px;
    padding-left: 18px;
  }

  .lyric-line button {
    font-size: 18px;
  }

  .lyrics-footer {
    padding: 0 18px;
    font-size: 10px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .anthem-stage {
    grid-template-rows: auto auto minmax(130px, 1fr) auto auto auto;
    padding-top: 20px;
  }

  .title-block {
    margin-top: 18px;
  }

  .title-block h1 {
    font-size: clamp(54px, 6.8vw, 98px);
  }

  .title-note {
    margin-top: 14px;
  }

  .visualizer {
    min-height: 130px;
    margin-top: 14px;
  }

  .current-lyric {
    min-height: 58px;
  }
}

@media (max-height: 850px) and (min-width: 901px) {
  .lyrics-header {
    min-height: 90px;
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .lyrics-header h2 {
    font-size: 34px;
  }

  .track-switcher button {
    min-height: 66px;
    gap: 4px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .lyrics-scroll {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .lyrics-footer {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .title-block h1 > span {
    transform: none;
    opacity: 1;
  }
}
