:root {
  --bg-1: #090d19;
  --bg-2: #141c31;
  --bg-3: #1e1f3f;
  --card: #0f1629ba;
  --text: #ecf0ff;
  --accent: #9f84ff;
  --accent-2: #5fe0ff;
  --accent-soft: #28365d;
  --muted: #b9c6f2;
  --border: #7f8fc82e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, #4f3de633 0 200px, transparent 350px),
    radial-gradient(circle at 75% 70%, #2bb8f633 0 220px, transparent 350px),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-x: hidden;
}

.background-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: min(48vw, 560px);
  height: min(48vw, 560px);
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.2;
  animation: drift 14s ease-in-out infinite alternate;
}

.ambient::before {
  top: -20%;
  left: -8%;
  background: #7a4dff;
}

.ambient::after {
  right: -10%;
  bottom: -20%;
  background: #1ea7ff;
  animation-duration: 18s;
}

.background-shapes::before,
.background-shapes::after {
  content: "";
  position: absolute;
  width: min(35vw, 320px);
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  opacity: 0.22;
  filter: blur(0.8px);
  box-shadow: 0 20px 60px #00000066;
  transition: transform 0.55s ease, opacity 0.55s ease, background 0.55s ease;
}

.background-shapes::before {
  top: 7%;
  left: -6%;
  transform: rotate(-14deg);
}

.background-shapes::after {
  bottom: 7%;
  right: -6%;
  transform: rotate(14deg);
}

body[data-lang="ru"] .background-shapes::before,
body[data-lang="ru"] .background-shapes::after {
  background: linear-gradient(
    to bottom,
    #ffffff 0 33.33%,
    #2f67ff 33.33% 66.66%,
    #d83232 66.66% 100%
  );
}

body[data-lang="id"] .background-shapes::before,
body[data-lang="id"] .background-shapes::after {
  background: linear-gradient(to bottom, #db1f2b 0 50%, #ffffff 50% 100%);
}

.card {
  position: relative;
  isolation: isolate;
  width: min(820px, 100%);
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow:
    0 30px 80px #00000063,
    inset 0 1px 0 #ffffff30;
  padding: 34px;
  transition:
    transform 0.38s ease,
    opacity 0.38s ease,
    filter 0.38s ease,
    box-shadow 0.45s ease;
}

.card-glow {
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 0%, #ab8fff20 0 25%, transparent 40%),
    radial-gradient(circle at 95% 100%, #6dd7ff1f 0 25%, transparent 40%);
}

body.lang-transition .card {
  transform: translateY(10px) scale(0.985);
  opacity: 0.2;
  filter: blur(6px);
}

body.lang-transition .background-shapes::before {
  transform: rotate(-18deg) translateX(-30px) scale(0.95);
  opacity: 0.08;
}

body.lang-transition .background-shapes::after {
  transform: rotate(18deg) translateX(30px) scale(0.95);
  opacity: 0.08;
}

body.lang-transition .ambient::before,
body.lang-transition .ambient::after {
  opacity: 0.08;
}

.top {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.badge {
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e6dcff;
  background: linear-gradient(90deg, #7a56ff44, #3aa8ff44);
  border: 1px solid #a59cff4f;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 2.3vw + 1rem, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px #8f79ff44;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid #44507a;
  border-radius: 999px;
  padding: 4px;
  background: #10172a;
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d8defe;
  padding: 8px 12px;
  font-size: 0.94rem;
  cursor: pointer;
  transition: 0.2s ease, transform 0.2s ease;
}

.lang-btn:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: linear-gradient(90deg, var(--accent), #7d9dff);
  color: #fff;
  box-shadow: 0 6px 20px #8a79ff55;
}

.content {
  margin-top: 24px;
  line-height: 1.8;
  font-size: 1.08rem;
}

.subtitle {
  margin: 0 0 14px;
  color: #d4dcff;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

#signature {
  margin-top: 22px;
  font-style: italic;
  color: var(--muted);
}

.music {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid #7e8dcf42;
  border-radius: 18px;
  background:
    linear-gradient(160deg, #131d35, #10162a),
    radial-gradient(circle at 95% 0%, #8f7fff40 0 28%, transparent 45%);
  box-shadow: inset 0 1px 0 #ffffff22;
}

.music-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.music h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.flag-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #eef4ff;
  background: #263966;
  border: 1px solid #7f95cc4f;
}

.music p {
  margin: 0 0 12px;
  color: var(--muted);
}

.music code {
  background: #243257;
  color: #f3f6ff;
  padding: 2px 6px;
  border-radius: 6px;
}

.track-switch {
  display: inline-flex;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #6d7fbd50;
  background: #0f1830;
}

.track-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #dbe3ff;
  padding: 7px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s ease, transform 0.2s ease;
}

.track-btn:hover {
  background: #283b67;
  transform: translateY(-1px);
}

.track-btn.active {
  background: linear-gradient(90deg, var(--accent), #7d9dff);
  color: #fff;
  box-shadow: 0 5px 16px #7f70ff4d;
}

.track-info {
  margin: 2px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #6e7fc043;
  background: #101a31b8;
}

.track-name {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #eef3ff;
}

.track-description {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

#song-player {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.player {
  position: relative;
  margin-top: 6px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: linear-gradient(165deg, #0d1528f2, #0a1020);
  border: 1px solid #6b7fc447;
  box-shadow:
    inset 0 1px 0 #ffffff14,
    0 12px 32px #00000040;
  overflow: hidden;
}

.player::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 90% 70% at 18% 0%,
    #9f84ff22 0%,
    transparent 55%
  );
  pointer-events: none;
}

.player-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 36px;
  margin-bottom: 14px;
  opacity: 0.35;
}

.player-bar {
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transform-origin: bottom;
  animation: playerBarIdle 1.4s ease-in-out infinite;
}

.player-bar:nth-child(1) {
  height: 12px;
  animation-delay: 0s;
}

.player-bar:nth-child(2) {
  height: 22px;
  animation-delay: 0.12s;
}

.player-bar:nth-child(3) {
  height: 32px;
  animation-delay: 0.24s;
}

.player-bar:nth-child(4) {
  height: 20px;
  animation-delay: 0.36s;
}

.player-bar:nth-child(5) {
  height: 14px;
  animation-delay: 0.48s;
}

.player.is-playing .player-visual {
  opacity: 0.85;
}

.player.is-playing .player-bar {
  animation-name: playerBarPlay;
  animation-duration: 0.55s;
}

.player-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-play,
.player-volume {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 1px solid #8b9fe055;
  border-radius: 14px;
  background: linear-gradient(145deg, #2a3a6b, #1e2a4d);
  color: #f0f4ff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  box-shadow:
    0 4px 14px #00000045,
    inset 0 1px 0 #ffffff22;
}

.player-play:hover,
.player-volume:hover {
  transform: translateY(-1px);
  border-color: #b8c8ff66;
  box-shadow:
    0 8px 22px #6b5cff33,
    inset 0 1px 0 #ffffff28;
}

.player-play:active,
.player-volume:active {
  transform: translateY(0);
}

.player-play:focus-visible,
.player-volume:focus-visible,
.player-progress:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.player-volume {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.player-body {
  flex: 1;
  min-width: 0;
}

.player-times {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.player-progress {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: 8px;
}

.player-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: #1a2544;
  box-shadow: inset 0 1px 3px #00000055;
  overflow: hidden;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px #8f7fff66;
  transition: width 0.08s linear;
}

.player-progress-thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: #f4f7ff;
  border: 2px solid var(--accent);
  box-shadow:
    0 2px 8px #00000055,
    0 0 12px #9f84ff88;
  pointer-events: none;
  transition: left 0.08s linear, transform 0.15s ease;
}

.player-progress:hover .player-progress-thumb {
  transform: scale(1.08);
}

.player-play {
  position: relative;
}

.player-icon {
  border-style: solid;
}

.player-play .player-icon-play {
  position: relative;
  width: 0;
  height: 0;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #f0f4ff;
  margin-left: 3px;
}

.player-play .player-icon-pause {
  display: none;
  position: relative;
  width: 14px;
  height: 16px;
  border: 0;
  background: linear-gradient(
    90deg,
    #f0f4ff 0 5px,
    transparent 5px 9px,
    #f0f4ff 9px 14px
  );
  margin: 0;
}

.player.is-playing .player-play .player-icon-play {
  display: none;
}

.player.is-playing .player-play .player-icon-pause {
  display: block;
}

.player-volume {
  position: relative;
  color: #f0f4ff;
}

.player-vol-svg {
  display: block;
}

.player-vol-svg.vol-off {
  display: none;
}

.player-volume.is-muted .player-vol-svg.vol-on {
  display: none;
}

.player-volume.is-muted .player-vol-svg.vol-off {
  display: block;
}

@keyframes playerBarIdle {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(0.55);
    opacity: 0.65;
  }
}

@keyframes playerBarPlay {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.35);
  }
}

@media (max-width: 560px) {
  .track-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .player-row {
    gap: 10px;
  }

  .player-play,
  .player-volume {
    width: 44px;
    height: 44px;
  }

  .player-volume {
    width: 40px;
    height: 40px;
  }
}

.footer {
  margin-top: 30px;
  font-size: 0.9rem;
  opacity: 0.92;
  color: #d6defd;
  border-top: 1px solid #7786c036;
  padding-top: 14px;
}

@keyframes drift {
  0% {
    transform: translateY(0) translateX(0) scale(1);
  }
  100% {
    transform: translateY(28px) translateX(12px) scale(1.04);
  }
}

@media (max-width: 560px) {
  .card {
    border-radius: 20px;
    padding: 20px;
  }

  .lang-btn {
    font-size: 0.86rem;
    padding: 8px 10px;
  }

  .music {
    padding: 14px;
  }

  .background-shapes::before,
  .background-shapes::after {
    opacity: 0.16;
  }
}
