/* ==========================================================
   🌸 youhoon游魂 × 枯野游魂 · 一屏双行完整资料卡样式表
   第一行：VRChat 完整个人资料 + 右侧 VRChat 图标跳转按钮（主视觉珊瑚晚霞粉）
   第二行：Steam  完整个人资料 + 右侧 Steam  图标跳转按钮（次视觉暮色星野蓝）
   ========================================================== */

:root {
  --bg-blur: 6px;
  --text-main: #2b2648;
  --text-sub: #5f597d;
  --text-muted: #8a84a6;

  --glass-board: linear-gradient(
    165deg,
    rgba(255, 250, 252, 0.84) 0%,
    rgba(244, 244, 255, 0.78) 100%
  );
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  font-family: "Quicksand", "Zen Maru Gothic", "YouYuan", "幼圆",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 18px 66px;
  background-color: #1e2a5e;
}

/* ==================== 背景层（微虚化晚霞水田插画） ==================== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-image {
  position: absolute;
  inset: -24px;
  background-image: url("assets/bg.jpg");
  background-size: cover;
  background-position: center 62%;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur)) saturate(1.06) brightness(0.97);
  transform: scale(1.04);
  transition: filter 0.55s ease, transform 0.65s ease;
  will-change: filter, transform;
}

body.bg-clear-mode .bg-image {
  filter: blur(0px) saturate(1.05) brightness(1);
  transform: scale(1);
}

.bg-tint {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 50% 38%,
      rgba(255, 210, 222, 0.1) 0%,
      rgba(22, 29, 70, 0.34) 100%
    ),
    linear-gradient(
      180deg,
      rgba(27, 38, 92, 0.15) 0%,
      rgba(255, 166, 180, 0.08) 52%,
      rgba(20, 28, 66, 0.28) 100%
    );
  transition: opacity 0.5s ease;
}

body.bg-clear-mode .bg-tint {
  opacity: 0.32;
}

.sparkles {
  position: absolute;
  inset: 0;
}

.sparkle-particle {
  position: absolute;
  color: rgba(255, 240, 246, 0.85);
  font-size: 13px;
  text-shadow: 0 0 10px rgba(255, 168, 194, 0.85);
  user-select: none;
  animation: floatSparkle var(--dur, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}

@keyframes floatSparkle {
  0%,
  100% {
    transform: translateY(8px) scale(0.75) rotate(0deg);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-14px) scale(1.12) rotate(15deg);
    opacity: 0.88;
  }
}

/* ==================== 顶部复制/同步提示气泡 ==================== */
.cute-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -24px) scale(0.92);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 250, 253, 0.96);
  border: 2px solid #ffc2d4;
  box-shadow: 0 12px 28px rgba(45, 40, 75, 0.22);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 92vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.35s var(--ease-bounce);
}

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

/* ==================== 一级主面板容器 ==================== */
.page-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 750px;
}

.profile-board {
  background: var(--glass-board);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  padding: 18px 22px 18px;
  box-shadow: 0 26px 64px rgba(18, 24, 66, 0.34),
    0 2px 0 rgba(255, 255, 255, 0.92) inset;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: boardPopIn 0.65s var(--ease-bounce) both;
}

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

/* 顶部装饰栏 */
.board-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 4px 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.deco-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.deco-dot.pink {
  background: #ff8fab;
}

.deco-dot.lavender {
  background: #b197fc;
}

.deco-dot.sky {
  background: #74c0fc;
}

.board-title {
  margin-left: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #5b537d;
  letter-spacing: 0.02em;
}

.sync-status-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(196, 188, 236, 0.7);
  background: rgba(255, 255, 255, 0.78);
  color: #635b86;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce), background 0.2s ease;
}

.sync-status-pill:hover {
  background: #ffffff;
  transform: scale(1.04);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b197fc;
}

.sync-status-pill.is-live .sync-dot {
  background: #51cf66;
  box-shadow: 0 0 0 3px rgba(81, 207, 102, 0.22);
}

.sync-status-pill.is-syncing .sync-dot {
  background: #fcc419;
  animation: pulseDot 0.9s ease-in-out infinite;
}

.sync-status-pill.is-standby .sync-dot {
  background: #adb5bd;
}

.sync-status-pill.is-warn .sync-dot {
  background: #ff922b;
  box-shadow: 0 0 0 3px rgba(255, 146, 43, 0.24);
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

/* ==================== 通用行卡片三列网格结构 ==================== */
.profile-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: 26px;
  padding: 18px 20px;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s ease;
}

/* 第一行：VRChat 主视觉卡片（温暖珊瑚晚霞粉） */
.vrc-row {
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 238, 245, 0.92) 100%
  );
  border: 2px solid rgba(255, 173, 196, 0.92);
  box-shadow: 0 14px 32px rgba(255, 110, 150, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.95) inset;
}

.vrc-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(255, 110, 150, 0.24),
    0 2px 0 rgba(255, 255, 255, 0.95) inset;
}

/* 第二行：Steam 次视觉卡片（静谧暮色星野蓝） */
.steam-row {
  background: linear-gradient(
    140deg,
    rgba(247, 250, 255, 0.93) 0%,
    rgba(235, 242, 255, 0.88) 100%
  );
  border: 1.8px solid rgba(182, 200, 255, 0.92);
  box-shadow: 0 10px 26px rgba(66, 99, 235, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.92) inset;
}

.steam-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(66, 99, 235, 0.2),
    0 2px 0 rgba(255, 255, 255, 0.95) inset;
}

/* ==================== 左列：头像与实时状态灯 ==================== */
.row-avatar-col {
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.avatar-frame {
  position: relative;
  border-radius: 24px;
  padding: 4px;
  transition: transform 0.35s var(--ease-bounce);
}

.vrc-avatar-frame {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #ff7597 0%, #b197fc 55%, #ffd6e0 100%);
  box-shadow: 0 10px 22px rgba(255, 117, 151, 0.28);
}

.steam-avatar-frame {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #5c7cfa 0%, #91a7ff 60%, #dbe4ff 100%);
  box-shadow: 0 8px 18px rgba(76, 110, 245, 0.22);
}

.steam-avatar-frame.in-game {
  background: linear-gradient(135deg, #40c057 0%, #8ce99a 100%);
}

.profile-row:hover .avatar-frame {
  transform: rotate(-3deg) scale(1.04);
}

.row-avatar-img,
.avatar-loading-box {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 2.5px solid #ffffff;
  background: #fff5f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vrc-avatar-crop {
  object-position: center 16%;
}

.vrc-loading-box {
  background: linear-gradient(135deg, #ff85a8 0%, #9795ff 100%);
  padding: 14px;
}

.steam-loading-box {
  background: linear-gradient(135deg, #5c7cfa 0%, #2b4499 100%);
  padding: 10px;
}

.avatar-loading-box svg {
  width: 100%;
  height: 100%;
}

/* Steam 点数商店动态头像框叠加层（完整露出四角樱花、猫爪与小电驴） */
.steam-frame-overlay {
  position: absolute;
  inset: -11%;
  width: 122%;
  height: 122%;
  object-fit: contain;
  pointer-events: none;
  z-index: 3;
}

.steam-fav-badge-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(45, 40, 75, 0.18));
  transition: transform 0.25s var(--ease-bounce);
}

.steam-fav-badge-img:hover {
  transform: scale(1.22) rotate(6deg);
}

.avatar-status-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 4;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(30, 30, 60, 0.2);
}

/* VRChat 5 色官方状态灯与 Steam 状态灯色 */
.vrc-join-me,
.inline-dot.vrc-join-me {
  background: #339af0;
}

.vrc-active,
.inline-dot.vrc-active,
.steam-in-game {
  background: #51cf66;
}

.vrc-ask-me,
.inline-dot.vrc-ask-me {
  background: #ff922b;
}

.vrc-busy,
.inline-dot.vrc-busy {
  background: #ff6b6b;
}

.vrc-offline,
.inline-dot.vrc-offline,
.steam-offline {
  background: #adb5bd;
}

.steam-online {
  background: #339af0;
}

/* ==================== 中列：完整个人资料详情 ==================== */
.row-details-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-header-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.vrc-pill {
  background: linear-gradient(135deg, #ff7597, #ff978a);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(255, 117, 151, 0.28);
}

.steam-pill {
  background: linear-gradient(135deg, #5c7cfa, #4263eb);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(76, 110, 245, 0.24);
}

.account-name {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  word-break: break-all;
}

.steam-row .account-name {
  font-size: 1.18rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.trust-badge {
  background: #f3f0ff;
  color: #7048e8;
  border: 1px solid #d0bfff;
}

.vrcplus-badge {
  background: #fff9db;
  color: #e67700;
  border: 1px solid #ffe066;
}

.steam-level-badge {
  background: #fff0f6;
  color: #c2255c;
  border: 1px solid #ffdeeb;
}

.steam-state-badge {
  gap: 6px;
  background: #edf2ff;
  color: #3b5bdb;
  border: 1px solid #bac8ff;
}

.steam-state-badge.in-game .inline-dot,
.steam-state-badge.online .inline-dot {
  animation: pulseDot 2s ease-in-out infinite;
}

.steam-state-badge.in-game {
  background: #ebfbee;
  color: #2b8a3e;
  border-color: #8ce99a;
}

.steam-state-badge.online {
  background: #e7f5ff;
  color: #1971c2;
  border-color: #74c0fc;
}

.steam-state-badge.offline {
  background: #f1f3f5;
  color: #868e96;
  border-color: #dee2e6;
}

/* 第二小行：实时签名、好友代码、UID复制胶囊与附加信息 */
.row-submeta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.live-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ffd4e2;
  font-size: 0.76rem;
  font-weight: 600;
  color: #5c537a;
}

.inline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.copy-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce), background 0.2s ease;
}

.vrc-copy-chip {
  background: #fff5f8;
  border: 1px solid #ffc9d9;
  color: #d64d77;
}

.vrc-copy-chip:hover {
  background: #ffe3ec;
  transform: scale(1.04);
}

.steam-copy-chip {
  background: #ffffff;
  border: 1px dashed #91a7ff;
  color: #364fc7;
}

.steam-copy-chip:hover {
  background: #edf2ff;
  transform: scale(1.04);
}

.copy-chip.subtle {
  border-style: solid;
  opacity: 0.88;
  font-weight: 600;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(206, 212, 242, 0.75);
  font-size: 0.72rem;
  font-weight: 600;
  color: #635d82;
}

/* 完整个人简介框（在一级界面直接完整显示，超长时支持柔和滚动） */
.row-bio-box {
  font-size: 0.84rem;
  line-height: 1.58;
  color: var(--text-sub);
  border-radius: 14px;
  padding: 9px 13px;
  white-space: pre-line;
  word-break: break-word;
  max-height: 112px;
  overflow-y: auto;
}

.vrc-bio-box {
  background: rgba(255, 245, 249, 0.9);
  border: 1px solid rgba(255, 212, 226, 0.8);
}

.steam-bio-box {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(208, 220, 255, 0.8);
}

.row-bio-box::-webkit-scrollbar {
  width: 5px;
}

.row-bio-box::-webkit-scrollbar-thumb {
  background: rgba(180, 172, 218, 0.55);
  border-radius: 999px;
}

/* 底部标签与外链行 */
.row-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(220, 212, 252, 0.85);
  color: #5d557e;
}

.mini-tag.lang-tag {
  background: #fff0f6;
  border-color: #ffdeeb;
  color: #c2255c;
}

.mini-tag.link-tag {
  text-decoration: none;
  background: #eef2ff;
  border-color: #bac8ff;
  color: #3b5bdb;
  transition: transform 0.2s var(--ease-bounce), background 0.2s ease;
}

.mini-tag.link-tag:hover {
  background: #dbe4ff;
  transform: translateY(-1px);
}

/* ==================== 右列：对应每一行的专属平台图标跳转按钮 ==================== */
.row-action-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-icon-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 72px;
  height: 78px;
  border-radius: 22px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.28s var(--ease-bounce), box-shadow 0.28s ease,
    filter 0.25s ease;
}

.vrc-icon-btn {
  background: linear-gradient(145deg, #ff6b95 0%, #ff8e88 52%, #7c88ff 100%);
  box-shadow: 0 10px 22px rgba(255, 107, 149, 0.36),
    0 3px 0 #d95179,
    0 1.5px 0 rgba(255, 255, 255, 0.48) inset;
}

.vrc-icon-btn:hover {
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 15px 28px rgba(255, 107, 149, 0.46),
    0 4px 0 #d95179,
    0 1.5px 0 rgba(255, 255, 255, 0.55) inset;
}

.steam-icon-btn {
  background: linear-gradient(145deg, #4c6ef5 0%, #364fc7 55%, #243b82 100%);
  box-shadow: 0 10px 22px rgba(54, 79, 199, 0.32),
    0 3px 0 #1e3270,
    0 1.5px 0 rgba(255, 255, 255, 0.4) inset;
}

.steam-icon-btn:hover {
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 15px 28px rgba(54, 79, 199, 0.44),
    0 4px 0 #1e3270,
    0 1.5px 0 rgba(255, 255, 255, 0.5) inset;
}

.platform-icon-btn:active {
  transform: translateY(2px) scale(0.98);
}

.platform-logo-svg {
  width: 40px;
  height: 40px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(20, 20, 50, 0.16));
}

.icon-btn-caption {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.96;
}

.jump-corner-arrow {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.85;
  transition: transform 0.22s var(--ease-bounce);
}

.platform-icon-btn:hover .jump-corner-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* ==================== 页脚签名与右下角虚化切换 ==================== */
.board-footer {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 2px;
}

.floating-blur-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: rgba(34, 42, 88, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff5f8;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 20, 52, 0.28);
  transition: transform 0.25s var(--ease-bounce), background 0.25s ease;
}

.floating-blur-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(48, 58, 116, 0.75);
}

/* ==================== 移动端自适应（保持两行结构与每行右侧跳转图标） ==================== */
@media (max-width: 640px) {
  body {
    padding: 16px 12px 64px;
  }

  .profile-board {
    padding: 15px 14px 16px;
    border-radius: 26px;
  }

  .profile-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "avatar action action"
      "details details details";
    gap: 12px;
    padding: 15px 14px;
  }

  .row-avatar-col {
    grid-area: avatar;
  }

  .row-details-col {
    grid-area: details;
  }

  .row-action-col {
    grid-area: action;
    justify-self: end;
    align-self: center;
  }

  .vrc-avatar-frame {
    width: 78px;
    height: 78px;
  }

  .steam-avatar-frame {
    width: 74px;
    height: 74px;
  }

  .platform-icon-btn {
    width: 64px;
    height: 68px;
    border-radius: 18px;
  }

  .platform-logo-svg {
    width: 34px;
    height: 34px;
  }
}

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