@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  font-family: "DM Sans", "Noto Sans JP", sans-serif;
  background: #101018;
  color: #f4f1fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --muted: #9692a5;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #c0adff;
  --mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(133, 105, 215, 0.16), transparent 46%),
    radial-gradient(ellipse at 100% 75%, rgba(54, 111, 132, 0.08), transparent 34%),
    #101018;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
}

button,
a {
  color: inherit;
}

.page-shell {
  width: min(100% - 40px, 700px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 26px;
  display: flex;
  flex-direction: column;
}

.topbar,
.wordmark,
.live-label,
.profile-topline,
.presence-row,
.presence-indicator,
.section-heading,
.id-button,
.footer {
  display: flex;
  align-items: center;
}

.topbar,
.profile-topline,
.presence-row,
.section-heading,
.footer {
  justify-content: space-between;
}

.topbar {
  min-height: 38px;
}

.wordmark {
  gap: 11px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(192, 173, 255, 0.45);
  border-radius: 11px;
  background: rgba(192, 173, 255, 0.08);
  color: var(--accent);
  font-size: 16px;
  letter-spacing: -0.08em;
}

.wordmark-divider {
  margin: 0 3px;
  color: #656171;
}

.live-label,
.eyebrow,
.activity-type,
.powered-by {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.live-label {
  gap: 8px;
  color: #c0bbce;
  font-size: 9px;
}

.live-dot,
.presence-dot,
.avatar-status {
  border-radius: 50%;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #84ddb2;
  box-shadow: 0 0 11px rgba(132, 221, 178, 0.7);
}

.profile-card {
  position: relative;
  overflow: hidden;
  margin-top: clamp(36px, 8vh, 72px);
  padding: 30px 36px 25px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(35, 33, 49, 0.97), rgba(24, 24, 35, 0.98) 70%),
    #1a1923;
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.018),
    inset 0 1px rgba(255, 255, 255, 0.06);
}

.card-glow {
  position: absolute;
  top: -180px;
  right: -65px;
  width: 390px;
  height: 300px;
  border-radius: 50%;
  background: rgba(144, 116, 223, 0.13);
  filter: blur(80px);
  pointer-events: none;
}

.profile-topline {
  position: relative;
}

.eyebrow {
  color: #9691a6;
  font-size: 9px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #aaa6b5;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 300ms ease;
}

.icon-button:hover {
  border-color: rgba(181, 162, 255, 0.4);
  color: var(--accent);
}

.icon-button:active {
  transform: rotate(45deg);
}

.icon-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.profile-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 25px 0 25px;
}

.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  padding: 5px;
  border: 1px solid rgba(192, 173, 255, 0.48);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(192, 173, 255, 0.16), rgba(192, 173, 255, 0.025));
  box-shadow: 0 0 30px rgba(157, 128, 236, 0.12);
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #373044, #252b38);
}

.avatar-status {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 20px;
  height: 20px;
  width: 21px;
  height: 21px;
  border: 4px solid #25232f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.profile-kicker {
  margin: 0 0 4px;
  color: #9691a2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.2;
}

.username {
  margin: 5px 0 0;
  color: #a39eae;
  font-size: 13px;
}

.presence-row {
  min-height: 43px;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(8, 8, 14, 0.24);
}

.device-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.device-list[hidden] {
  display: none;
}

.device-chip,
.activity-button-label,
.activity-platform {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #aaa5b7;
  font-size: 10px;
}

.activity-platform {
  min-height: 20px;
  margin: 5px 5px 0 0;
  padding: 3px 8px;
  border-color: rgba(132, 221, 178, 0.12);
  background: rgba(132, 221, 178, 0.045);
  color: #9dcab1;
  font-size: 9px;
}

.device-chip::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #8c84a5;
  content: "";
}

.presence-indicator {
  gap: 9px;
  color: #e2dfeb;
  font-size: 13px;
  font-weight: 500;
}

.presence-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
}

.updated-at {
  color: #898596;
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.status-online {
  background: #53d69a;
  box-shadow: 0 0 12px rgba(83, 214, 154, 0.42);
}

.status-idle {
  background: #f0b85b;
  box-shadow: 0 0 12px rgba(240, 184, 91, 0.35);
}

.status-dnd {
  background: #ef6874;
  box-shadow: 0 0 12px rgba(239, 104, 116, 0.35);
}

.status-offline {
  background: #777987;
}

.divider {
  height: 1px;
  margin: 21px 0 24px;
  background: linear-gradient(90deg, transparent, var(--line) 10%, var(--line) 90%, transparent);
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 13px;
}

.section-heading h2,
.section-heading h3 {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.activity-type {
  margin-bottom: 2px;
  padding: 6px 9px;
  border: 1px solid rgba(192, 173, 255, 0.15);
  border-radius: 999px;
  background: rgba(192, 173, 255, 0.06);
  color: #bdb2dc;
  font-size: 9px;
}

.activity-content {
  display: grid;
  gap: 8px;
  min-height: 84px;
}

.activity-section {
  margin-bottom: 23px;
}

.status-section .section-heading {
  margin-bottom: 12px;
}

.status-message {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid rgba(192, 173, 255, 0.19);
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(192, 173, 255, 0.075), rgba(192, 173, 255, 0.025));
}

.status-message.is-empty {
  border-color: rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.025);
}

.status-message p {
  min-width: 0;
  margin: 0;
  color: #e4deef;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.status-message.is-empty p {
  color: #9994a4;
}

.status-message-emoji {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  object-fit: contain;
  color: #d1c4ff;
  font-size: 19px;
}

.empty-activity,
.activity-card {
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.empty-activity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  color: #9a96a6;
  font-size: 12px;
}

.empty-activity p {
  margin: 0;
}

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(192, 173, 255, 0.12);
  color: var(--accent);
  font-size: 17px;
}

.activity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.activity-card:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 173, 255, 0.2);
  background: linear-gradient(115deg, rgba(192, 173, 255, 0.065), rgba(255, 255, 255, 0.02));
}

.activity-image {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 13px;
  object-fit: cover;
  background: #302d3a;
}

.activity-artwork {
  position: relative;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
}

.activity-artwork > .activity-image {
  width: 100%;
  height: 100%;
}

.activity-small-image {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 23px;
  height: 23px;
  border: 2px solid #24222e;
  border-radius: 50%;
  background: #302d3a;
  object-fit: cover;
}

.activity-image.is-placeholder {
  display: grid;
  place-items: center;
  color: #c5b7ff;
  font-size: 20px;
}

.activity-copy {
  min-width: 0;
}

.activity-label {
  margin: 0 0 4px;
  color: #aaa5b8;
  font-size: 10px;
  letter-spacing: 0.015em;
}

.activity-name,
.activity-detail {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-name {
  color: #f3f0fa;
  font-size: 14px;
  font-weight: 600;
}

.activity-detail {
  margin-top: 3px;
  color: #a6a1b2;
  font-size: 11px;
}

.activity-timer {
  margin: 7px 0 0;
  color: #b5a2ff;
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.activity-button-label {
  min-height: 21px;
  margin: 7px 5px 0 0;
  padding: 3px 8px;
  color: #b9afd5;
  font-size: 9px;
}

.activity-link {
  display: inline-flex;
  margin: 7px 8px 0 0;
  color: #c0adff;
  font-size: 10px;
  text-decoration: none;
}

.activity-link:hover {
  color: #ddd2ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.activity-progress {
  height: 3px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.activity-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--accent);
  transition: width 900ms linear;
}

.connection-message {
  min-height: 30px;
  display: flex;
  align-items: center;
  margin-top: 13px;
  padding: 0 2px;
  color: #918c9d;
  font-size: 11px;
}

.connection-message[data-state="error"] {
  color: #e89a9f;
}

.connection-message[data-state="connected"] {
  color: #82cfa9;
}

.footer {
  margin-top: auto;
  padding-top: 44px;
}

.discord-id {
  display: grid;
  gap: 7px;
}

.id-button {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c7c2d0;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}

.id-button:hover {
  color: var(--accent);
}

.id-button svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.powered-by {
  margin: 0;
  color: #716d7d;
  font-size: 9px;
}

.powered-by a {
  margin-left: 4px;
  color: #aaa4b8;
  text-decoration: none;
}

.powered-by a:hover {
  color: var(--accent);
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 30px, 630px);
    padding-top: 18px;
  }

  .profile-card {
    margin-top: 38px;
    padding: 21px 18px 17px;
    border-radius: 19px;
  }

  .profile-main {
    gap: 15px;
    margin: 21px 0 20px;
  }

  .avatar-wrap {
    width: 78px;
    height: 78px;
  }

  .presence-row {
    padding: 0 11px;
  }

  .presence-indicator {
    font-size: 12px;
  }

  .updated-at {
    font-size: 9px;
  }

  .activity-image {
    width: 54px;
    height: 54px;
  }

  .activity-artwork {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .activity-card {
    gap: 12px;
    padding: 12px;
  }

  .footer {
    padding-top: 36px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    width: min(100% - 24px, 630px);
  }

  .profile-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .live-label {
    font-size: 8px;
  }

  .updated-at {
    max-width: 115px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
