:root {
  color-scheme: dark;
  --background: #09090d;
  --surface: rgba(20, 20, 29, 0.82);
  --surface-hover: rgba(33, 33, 45, 0.94);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f8f8fb;
  --muted: #a7a7b5;
  --accent: #9b7cff;
  --accent-light: #c6b7ff;
  --radius-large: 30px;
  --radius-medium: 17px;
  font-family: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  overflow-x: hidden;
}

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

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

.background {
  overflow: hidden;
  background:
    linear-gradient(rgba(7, 5, 15, 0.48), rgba(7, 5, 15, 0.68)),
    url("assets/background.png") center / cover no-repeat;
}

.noise {
  opacity: 0.035;
  background-image: radial-gradient(rgba(255, 255, 255, 0.75) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
}

.glow {
  position: absolute;
  width: 30rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.15;
}

.glow-one {
  top: -13rem;
  left: -10rem;
  background: #835cff;
}

.glow-two {
  right: -13rem;
  bottom: -16rem;
  background: #4c8dff;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 40px 18px;
}

.profile-card {
  position: relative;
  width: min(100%, 510px);
  padding: 44px 32px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  animation: card-in 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.share-button {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
  transition: 180ms ease;
}

.share-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}

.profile-header {
  text-align: center;
}

.avatar {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  background: #17121f;
  box-shadow: 0 14px 35px rgba(127, 88, 255, 0.24);
  object-fit: cover;
  transform: rotate(-3deg);
}

.avatar.is-live {
  border-color: #ff334f;
  box-shadow:
    0 0 0 7px rgba(255, 28, 62, 0.12),
    0 0 32px rgba(255, 28, 62, 0.75);
  animation: live-avatar-pulse 1.35s ease-in-out infinite;
}

.live-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin: -10px 0 20px;
}

.live-panel[hidden] {
  display: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 68, 92, 0.45);
  border-radius: 999px;
  color: #fff;
  background: rgba(215, 18, 48, 0.9);
  box-shadow: 0 8px 24px rgba(220, 20, 50, 0.3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.live-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: live-dot-blink 1s steps(2, start) infinite;
}

.watch-live-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffb5c0;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.watch-live-button:hover {
  color: white;
  transform: translateY(-1px);
}

.watch-live-button:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(255, 51, 79, 0.45);
  outline-offset: 4px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 8vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.bio {
  max-width: 360px;
  margin: 14px auto 30px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.link-list {
  display: grid;
  gap: 12px;
}

.social-link {
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  align-items: center;
  min-height: 70px;
  padding: 11px 16px 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.19);
  background: var(--surface-hover);
  transform: translateY(-3px);
}

.social-link:focus-visible,
.share-button:focus-visible {
  outline: 3px solid rgba(155, 124, 255, 0.55);
  outline-offset: 3px;
}

.platform-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-size: 0.93rem;
  font-weight: 700;
}

.youtube .platform-icon { background: #ff0033; }
.twitch .platform-icon { background: #9146ff; }
.twitter .platform-icon { background: #17171c; border: 1px solid #393943; }
.discord .platform-icon { background: #5865f2; }

.link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 4px;
}

.link-copy strong {
  font-size: 0.98rem;
  font-weight: 600;
}

.link-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  justify-self: end;
  color: #707080;
  transition: color 180ms ease, transform 180ms ease;
}

.social-link:hover .arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
  color: #737382;
  font-size: 0.76rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66d49b;
  box-shadow: 0 0 10px rgba(102, 212, 155, 0.55);
}

.toast {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  padding: 11px 17px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: #24232e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 220ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes live-avatar-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 5px rgba(255, 28, 62, 0.1),
      0 0 20px rgba(255, 28, 62, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(255, 28, 62, 0.18),
      0 0 42px rgba(255, 28, 62, 0.9);
  }
}

@keyframes live-dot-blink {
  50% { opacity: 0.3; }
}

@media (max-width: 560px) {
  .background { background-position: 53% center; }
  .page-shell { padding: 18px 12px; }
  .profile-card { padding: 38px 17px 22px; border-radius: 24px; }
  .share-button { top: 15px; right: 15px; }
  .avatar { width: 82px; height: 82px; border-radius: 25px; }
  .bio { margin-bottom: 25px; padding: 0 12px; }
}

@media (max-width: 360px) {
  .page-shell { padding-inline: 8px; }
  .profile-card { padding-inline: 14px; }
  h1 { font-size: clamp(1.65rem, 8.5vw, 2rem); }
  .social-link { padding-right: 12px; }
}

@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;
  }
}
