/* 顶栏用户下拉：账号 / 改密 / 流水 / 充值 / 退出 */

.xc-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.xc-user-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  max-width: 168px;
  cursor: pointer;
}

.xc-user-trigger[hidden],
.xc-user-trigger[style*="display: none"] {
  display: none !important;
}

.xc-user-av.has-photo { color: transparent; }
.xc-user-av > img.xc-av-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}
.xc-user-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f6e8b8, #e4c87a);
  color: #4a3b14;
  font-size: 11px;
  font-weight: 800;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(138, 109, 31, 0.28);
}

html.theme-dark .xc-user-av,
html.studio-theme-dark .xc-user-av {
  background: linear-gradient(135deg, #f2e3ad, #c9b88f);
  color: #14100a;
  border-color: rgba(242, 227, 173, 0.35);
}

.xc-user-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.45;
  flex-shrink: 0;
}

.xc-user-menu.is-open .xc-user-caret {
  transform: rotate(180deg);
  opacity: 0.8;
}

.xc-user-dd {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 188px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(28, 26, 23, 0.1);
  background: rgba(255, 255, 253, 0.98);
  box-shadow: 0 12px 32px rgba(40, 30, 10, 0.14);
  backdrop-filter: blur(16px);
}

html.theme-dark .xc-user-dd,
html.studio-theme-dark .xc-user-dd {
  border-color: rgba(242, 227, 173, 0.16);
  background: rgba(16, 16, 18, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.xc-user-dd[hidden] { display: none !important; }

.xc-user-dd a,
.xc-user-dd button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3a3428;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

html.theme-dark .xc-user-dd a,
html.theme-dark .xc-user-dd button,
html.studio-theme-dark .xc-user-dd a,
html.studio-theme-dark .xc-user-dd button {
  color: rgba(242, 241, 234, 0.88);
}

.xc-user-dd a:hover,
.xc-user-dd button:hover {
  background: rgba(138, 109, 31, 0.1);
  color: #8a6d1f;
}

html.theme-dark .xc-user-dd a:hover,
html.theme-dark .xc-user-dd button:hover,
html.studio-theme-dark .xc-user-dd a:hover,
html.studio-theme-dark .xc-user-dd button:hover {
  background: rgba(242, 227, 173, 0.1);
  color: #f2e3ad;
}

.xc-user-dd .is-danger {
  color: #c45c5c;
}

.xc-user-dd .is-danger:hover {
  background: rgba(196, 92, 92, 0.1);
  color: #e07070;
}

.xc-user-dd .xc-user-sep {
  height: 1px;
  margin: 4px 8px;
  background: rgba(28, 26, 23, 0.08);
}

html.theme-dark .xc-user-dd .xc-user-sep,
html.studio-theme-dark .xc-user-dd .xc-user-sep {
  background: rgba(255, 255, 255, 0.08);
}

.xc-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 10, 0.62);
}
.xc-invite-modal[hidden] { display: none !important; }
.xc-invite-card {
  width: min(520px, 92vw);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 18px;
  padding: 18px 20px 20px;
  background: #14120e;
  border: 1px solid rgba(242, 227, 173, 0.22);
  color: #f2f1ea;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}
.xc-invite-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.xc-invite-hd b { font-size: 16px; font-weight: 800; }
.xc-invite-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(242, 241, 234, 0.6);
  font-size: 16px;
  cursor: pointer;
}
.xc-invite-lead {
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(242, 241, 234, 0.55);
  line-height: 1.6;
}
.xc-invite-lead b { color: #f2e3ad; font-weight: 800; }
.xc-invite-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(242, 241, 234, 0.5);
  line-height: 1.55;
}
.xc-invite-warn {
  margin: 0 0 10px;
  font-size: 12px;
  color: #e8b4a2;
  line-height: 1.55;
}
.xc-invite-team { margin: 10px 0 14px; }
.xc-invite-team-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.xc-invite-code.is-team { color: #d7c9a3; letter-spacing: 0.08em; }
.xc-invite-block { margin-bottom: 16px; }
.xc-invite-k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #c9b88f;
  margin-bottom: 8px;
}
.xc-invite-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f2e3ad;
  margin-bottom: 8px;
}
.xc-invite-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.xc-invite-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(242, 227, 173, 0.2);
  background: #1a1814;
  color: #f2f1ea;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}
.xc-invite-row button {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #f2e3ad, #dcc899);
  color: #14100a;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.xc-invite-muted { font-size: 12px; color: rgba(242, 241, 234, 0.45); }

html:not(.theme-dark):not(.studio-theme-dark) .xc-invite-card {
  background: #fffdf6;
  border-color: rgba(138, 109, 31, 0.2);
  color: #26211a;
}
html:not(.theme-dark):not(.studio-theme-dark) .xc-invite-row input {
  background: #f7f3e8;
  color: #26211a;
  border-color: rgba(138, 109, 31, 0.2);
}
