@charset "UTF-8";
/* 首页用户组件 User Hub 样式 */
.gr-user-hub {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  /* 默认跟随站点蓝白主题：白底 + 蓝色淡渐变 + 浅蓝描边（与 .home-rank-card 同款） */
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.05), rgba(255, 255, 255, 0) 42%),
    var(--bg-surface, #fff);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 0.85rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  /* 主题色变量，供内联样式复用 */
  --gr-uh-strong: #0f172a;
  --gr-uh-muted: #64748b;
  --gr-uh-streak: #059669;
}

[data-theme="dark"] .gr-user-hub {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.35);
  --gr-uh-strong: #f8fafc;
  --gr-uh-muted: #94a3b8;
  --gr-uh-streak: #34d399;
}

.gr-user-hub:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .gr-user-hub:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.42), 0 0 20px -4px rgba(124, 58, 237, 0.18);
}

/* 背景光晕 */
.gr-uh-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.gr-uh-glow::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  top: -40px;
  right: -30px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, transparent 70%);
  filter: blur(20px);
}
.gr-uh-glow::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  bottom: -30px;
  left: -20px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  filter: blur(20px);
}

.gr-uh-inner {
  position: relative;
  z-index: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 登录态头部 */
.gr-uh-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gr-uh-avatar-box {
  position: relative;
  flex-shrink: 0;
}

.gr-uh-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #eef1f5;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.gr-uh-avatar-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
}

.gr-uh-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gr-uh-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gr-uh-username {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

[data-theme="dark"] .gr-uh-username {
  color: #f8fafc;
}

.gr-uh-level {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.gr-uh-sub {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .gr-uh-sub {
  color: #94a3b8;
}

.gr-uh-portal-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: #2563eb;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .gr-uh-portal-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.gr-uh-portal-btn:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

/* 访客态 */
.gr-uh-guest {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gr-uh-guest-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gr-uh-guest-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px dashed rgba(37, 99, 235, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}
[data-theme="dark"] .gr-uh-guest-avatar {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}
.gr-uh-guest-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gr-uh-guest-login {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary, #2563eb) 0%, var(--primary-hover, #1d4ed8) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}
.gr-uh-guest-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}
.gr-uh-guest-reg {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: #fff;
  color: #2563eb;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="dark"] .gr-uh-guest-reg {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
.gr-uh-guest-reg:hover {
  background: rgba(37, 99, 235, 0.08);
}

/* 数据统计 */
.gr-uh-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(37, 99, 235, 0.05);
  padding: 7px 8px;
  border-radius: 11px;
  border: 1px solid rgba(37, 99, 235, 0.10);
}
[data-theme="dark"] .gr-uh-stats {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.04);
}
.gr-uh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.gr-uh-stat-val {
  font-size: 0.92rem;
  font-weight: 800;
  font-family: inherit;
  line-height: 1.15;
}
.gr-uh-stat-val.is-points {
  color: #d97706;
}
.gr-uh-stat-val.is-streak {
  color: #059669;
}
.gr-uh-stat-val.is-fav {
  color: #7c3aed;
}
.gr-uh-stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 1px;
}

/* 功能卡片区（签到 + 抽奖） */
.gr-uh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gr-uh-card {
  position: relative;
  border-radius: 13px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 98px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: all 0.22s ease;
  text-align: left;
  box-sizing: border-box;
}

.gr-uh-card:hover {
  transform: translateY(-2px);
}

/* 签到卡 */
.gr-uh-card-checkin {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(13, 148, 136, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.30);
}
.gr-uh-card-checkin:hover {
  border-color: rgba(16, 185, 129, 0.50);
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.22);
}

/* 抽奖卡 */
.gr-uh-card-gacha {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(219, 39, 119, 0.08) 100%);
  border-color: rgba(139, 92, 246, 0.30);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  color: inherit;
}
.gr-uh-card-gacha:hover {
  border-color: rgba(139, 92, 246, 0.50);
  box-shadow: 0 8px 18px -4px rgba(139, 92, 246, 0.22);
}

.gr-uh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.gr-uh-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gr-uh-card-checkin .gr-uh-icon-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}
.gr-uh-card-gacha .gr-uh-icon-badge {
  background: rgba(139, 92, 246, 0.16);
  color: #7c3aed;
}

/* 图标 */
.gr-uh-card-gacha:hover .gr-uh-icon-badge svg {
  animation: grUhDice 0.8s ease-in-out infinite;
}
@keyframes grUhDice {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

.gr-uh-card-checkin:hover .gr-uh-icon-badge svg {
  animation: grUhFlame 0.5s ease-in-out infinite alternate;
}
@keyframes grUhFlame {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-2px) scale(1.15); }
}

.gr-uh-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 999px;
}
.gr-uh-card-checkin .gr-uh-tag {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}
.gr-uh-card-gacha .gr-uh-tag {
  background: rgba(168, 85, 247, 0.14);
  color: #7c3aed;
}

.gr-uh-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1px;
}
[data-theme="dark"] .gr-uh-title {
  color: #f8fafc;
}

.gr-uh-desc {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.3;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .gr-uh-desc {
  color: #94a3b8;
}

/* 按钮 */
.gr-uh-btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

/* 已签到 */
.gr-uh-card-checkin[data-state="done"] .checkin-btn {
  background: rgba(16, 185, 129, 0.10) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.30) !important;
  cursor: default !important;
  box-shadow: none !important;
}
.gr-uh-card-checkin[data-state="done"] .checkin-btn .checkin-btn-check {
  display: inline-block !important;
}
.gr-uh-card-checkin[data-state="idle"] .checkin-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}
.gr-uh-card-checkin[data-state="idle"] .checkin-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.45);
}
.gr-uh-card-checkin .checkin-btn-check {
  display: none;
  width: 14px;
  height: 14px;
}

/* 抽奖按钮 */
.gr-uh-gacha-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35);
}
.gr-uh-card-gacha:hover .gr-uh-gacha-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.48);
}

/* 幸运标签小工具 */
.gr-uh-gadget {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.10);
  font-size: 0.72rem;
}
[data-theme="dark"] .gr-uh-gadget {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.gr-uh-gadget-tag {
  color: #2563eb;
  font-weight: 700;
}
.gr-uh-gadget-action {
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  transition: color 0.15s ease;
}
.gr-uh-gadget-action:hover {
  color: #7c3aed;
}
/* 每日一言（诗句）：标签行 + 诗句行 */
.gr-uh-gadget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gr-uh-quote {
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.gr-uh-quote .gr-uh-gadget-tag {
  font-weight: 600;
  letter-spacing: 0;
}
.gr-uh-quote-from {
  color: var(--gr-uh-muted);
  font-size: 0.66rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ===== 深色模式（[data-theme="dark"]）覆盖：保持原有深色玻璃观感 ===== */
[data-theme="dark"] .gr-uh-glow::before {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 70%);
}
[data-theme="dark"] .gr-uh-glow::after {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
}
[data-theme="dark"] .gr-uh-avatar {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .gr-uh-avatar-badge { border-color: #1e293b; }
[data-theme="dark"] .gr-uh-portal-btn:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .gr-uh-guest-reg:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .gr-uh-stat-val.is-points { color: #fbbf24; }
[data-theme="dark"] .gr-uh-stat-val.is-streak { color: #34d399; }
[data-theme="dark"] .gr-uh-stat-val.is-fav { color: #c084fc; }
[data-theme="dark"] .gr-uh-stat-lbl { color: #94a3b8; }
[data-theme="dark"] .gr-uh-card-checkin {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.22) 0%, rgba(13, 148, 136, 0.16) 100%);
  border-color: rgba(16, 185, 129, 0.22);
}
[data-theme="dark"] .gr-uh-card-checkin:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.3);
}
[data-theme="dark"] .gr-uh-card-gacha {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22) 0%, rgba(219, 39, 119, 0.16) 100%);
  border-color: rgba(139, 92, 246, 0.22);
}
[data-theme="dark"] .gr-uh-card-gacha:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 8px 18px -4px rgba(139, 92, 246, 0.3);
}
[data-theme="dark"] .gr-uh-card-checkin .gr-uh-icon-badge {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
}
[data-theme="dark"] .gr-uh-card-gacha .gr-uh-icon-badge {
  background: rgba(139, 92, 246, 0.22);
  color: #c084fc;
}
[data-theme="dark"] .gr-uh-card-checkin .gr-uh-tag {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}
[data-theme="dark"] .gr-uh-card-gacha .gr-uh-tag {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
}
[data-theme="dark"] .gr-uh-card-checkin[data-state="done"] .checkin-btn {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
}
[data-theme="dark"] .gr-uh-card-checkin[data-state="idle"] .checkin-btn:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}
[data-theme="dark"] .gr-uh-gadget-tag { color: #38bdf8; }
[data-theme="dark"] .gr-uh-gadget-action { color: #94a3b8; }
[data-theme="dark"] .gr-uh-gadget-action:hover { color: #c084fc; }
