:root {
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: #3b82f6;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-hover: rgba(255, 255, 255, 0.08);
  --accent-soft: rgba(59, 130, 246, 0.24);
  --radius: 13px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.video-bg {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  opacity: 1;
  overflow: hidden;
}

.video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(110vw, 196vh);
  height: max(110vh, 196vw);
  transform: translate(-50%, -50%) scale(1.2);
  border: 0;
  filter: blur(12px) saturate(1.08) brightness(0.62);
}

.video-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.32);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 52%, #0b0c25 100%);
  opacity: 0.48;
}

.halo {
  position: absolute;
  border-radius: 50%;
}

.halo-a {
  width: min(600px, 72vw);
  height: min(600px, 72vw);
  top: 20%;
  left: 10%;
  background: rgba(96, 165, 250, 0.2);
  filter: blur(150px);
  animation: driftA 15s ease-in-out infinite;
}

.halo-b {
  width: min(500px, 68vw);
  height: min(500px, 68vw);
  bottom: 15%;
  right: 15%;
  background: rgba(167, 139, 250, 0.2);
  filter: blur(120px);
  animation: driftB 18s ease-in-out infinite;
}

.cursor-glow {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0) 68%);
  filter: blur(24px);
  opacity: 0.3;
  z-index: -2;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(rgba(255, 255, 255, 0.32) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.stage {
  min-height: 100dvh;
  width: min(1400px, calc(100% - 2.6rem));
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 2rem 0 12rem;
}

.hero {
  width: 100%;
  display: grid;
  place-items: center;
}

.brand-wrap {
  transform-origin: center;
  will-change: transform;
}

.brand-text {
  margin: 0;
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.02;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  animation: fadeInUp 0.8s var(--ease) both;
}

.brand-image {
  display: none;
  width: min(1080px, 90vw);
  max-height: 56vh;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

body.has-brand-image .brand-image {
  display: block;
  animation: fadeInUp 0.8s var(--ease) both;
}

body.has-brand-image .brand-text {
  display: none;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 1.2rem));
  display: grid;
  gap: 0.5rem;
  padding: 0.78rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  animation: dockIn 0.8s var(--ease) both;
  animation-delay: 0.14s;
  z-index: 10;
}

.dock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.social-row .dock-btn {
  flex: 1 1 132px;
}

.wallet-row .dock-btn {
  flex: 1 1 160px;
}

.dock-btn {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: rgba(255, 255, 255, 0.84);
  border-radius: var(--radius);
  padding: 0.58rem 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.46rem;
  font-size: 0.9rem;
  font-weight: 560;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  overflow: hidden;
}

.dock-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(160px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(59, 130, 246, 0.2), transparent 68%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.dock-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  color: #fff;
  background: var(--panel-hover);
  box-shadow: 0 0 12px #3b82f6;
}

.dock-btn:hover::before {
  opacity: 1;
}

.dock-btn:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.wallet {
  justify-content: space-between;
}

.wallet small {
  font-size: 0.74rem;
  color: var(--muted);
}

.icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.dvd-logo {
  position: fixed;
  left: 0;
  top: 0;
  width: 106px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.28);
  pointer-events: auto;
  z-index: 25;
  transition: box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  will-change: transform;
  touch-action: manipulation;
}

.dvd-logo:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.65);
}

.dvd-logo:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.26), 0 0 24px rgba(59, 130, 246, 0.5);
}

.dvd-logo.hit {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.9);
}

.yt-widget {
  position: fixed;
  left: 50%;
  bottom: 8.1rem;
  transform: translateX(-50%);
  width: min(700px, calc(100% - 2.4rem));
  padding: 0.36rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 28;
  overflow: hidden;
}

.yt-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at -20% -90%, rgba(59, 130, 246, 0.2), transparent 58%);
}

.yt-mini {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 0.48rem;
  align-items: stretch;
}

.yt-thumb {
  width: 50px;
  height: 50px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.yt-main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.yt-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

#ytTitle,
#ytDuration {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ytTitle {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

#ytDuration {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
}

.yt-progress-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0.22rem;
}

#ytCurrent,
#ytRemaining {
  font-size: 0.68rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.76);
}

#ytSeek,
#ytVolume {
  appearance: none;
  width: 100%;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

#ytSeek::-webkit-slider-thumb,
#ytVolume::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

#ytSeek::-moz-range-thumb,
#ytVolume::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.yt-controls-row {
  display: flex;
  align-items: center;
  gap: 0.24rem;
}

.yt-ctl {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.yt-ctl:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--panel-hover);
  box-shadow: 0 0 12px #3b82f6;
}

.yt-ctl:focus-visible,
.yt-select:focus-visible,
#ytSeek:focus-visible,
#ytVolume:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.24);
}

.yt-ctl svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.yt-ctl--play {
  width: 28px;
  height: 28px;
}

.yt-ctl--play .icon-pause {
  display: none;
}

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

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

.yt-vol-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.26rem;
  min-width: 92px;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.78);
}

.yt-select {
  width: 100%;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.68rem;
  padding: 0 0.45rem;
}

.yt-status {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.72);
}

.yt-player {
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 7.45rem;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(11, 11, 11, 0.94);
  color: #fff;
  padding: 0.52rem 0.86rem;
  font-size: 0.84rem;
  transition: transform 0.22s ease, opacity 0.22s ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dockIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes driftA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(16px, -10px, 0);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-16px, 12px, 0);
  }
}

@media (max-width: 820px) {
  .stage {
    width: calc(100% - 1.2rem);
    padding: 0.8rem 0 14.4rem;
  }

  .dock {
    width: calc(100% - 0.8rem);
    bottom: 0.45rem;
    padding: 0.52rem;
    gap: 0.42rem;
    border-radius: 14px;
  }

  .social-row .dock-btn,
  .wallet-row .dock-btn {
    flex: 1 1 calc(50% - 0.3rem);
  }

  .dock-btn {
    min-height: 42px;
    font-size: 0.85rem;
  }

  .toast {
    bottom: 11.4rem;
  }

  .yt-widget {
    width: calc(100% - 1.6rem);
    bottom: 12.5rem;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: clamp(2.5rem, 14vw, 4rem);
    letter-spacing: -0.01em;
  }

  .social-row .dock-btn,
  .wallet-row .dock-btn {
    flex-basis: 100%;
  }

  .dock-btn {
    justify-content: flex-start;
  }

  .wallet {
    justify-content: space-between;
  }

  .yt-widget {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 14.7rem;
    transform: translateX(-50%);
    width: calc(100% - 0.8rem);
  }

  .yt-mini {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.4rem;
  }

  .yt-thumb {
    width: 44px;
    height: 44px;
  }

  .yt-progress-row {
    grid-template-columns: 24px minmax(0, 1fr) 24px;
  }

  .yt-vol-wrap {
    min-width: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .halo,
  .brand-text,
  .brand-image,
  .dock,
  .dock-btn,
  .yt-widget,
  .yt-ctl,
  .dvd-logo,
  .toast,
  .cursor-glow {
    animation: none !important;
    transition: none !important;
  }
}
