/* ============================================================
   查询面板 — 专属样式
   复用主站 style.css 设计令牌（深色、液态玻璃、品牌色）
   ============================================================ */

.user-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--navbar-height) + 2rem) 1.5rem 3rem;
}

/* 查询框 */
.user-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 480px;
  padding: 0.25rem 0.25rem 0.25rem 0.9rem;
  margin-bottom: 1.5rem;
}
.user-search input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
}
.user-search input::placeholder { color: var(--text-tertiary); }
.user-search button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.user-search button:hover { background: var(--accent-hover); }
.user-search button:disabled { opacity: 0.6; cursor: not-allowed; }

.user-result {
  width: 100%;
  max-width: 1400px;
}

.user-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: var(--text-secondary);
}
.user-empty i { font-size: 1.8rem; }
.user-empty p { font-size: 0.85rem; }

.user-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #ff6b6b;
  font-size: 0.9rem;
}

/* ============================================================
   账号信息栏（名片背景 + 暗色遮罩）
   ============================================================ */
.player-card {
  position: relative;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--glass-border);
}
.player-card-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.72);
}
.player-card-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 1.2rem;
}
.player-avatar { flex-shrink: 0; }
.player-avatar img {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.3);
}
.player-main { flex: 1; min-width: 0; }
.player-name { font-size: 1.05rem; font-weight: 700; color: #fff; }
.player-level { font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); margin-top: 0.1rem; }
.player-signature {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-modes {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.player-mode {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.player-mode i { color: var(--accent); font-size: 1.1rem; }
.player-mode-text { display: flex; flex-direction: column; line-height: 1.25; }
.player-mode-label { font-size: 0.66rem; color: rgba(255, 255, 255, 0.55); }
.player-mode-value { font-size: 0.82rem; font-weight: 600; color: #fff; }

/* ============================================================
   角色行
   ============================================================ */
.char-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.char-card { flex: 0 0 auto; position: relative; cursor: pointer; }
.char-avatar { position: relative; width: 76px; height: 76px; }
.char-avatar img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--glass-border-hover);
  background: var(--glass-bg);
  object-fit: cover;
  object-position: center;
  display: block;
}
.char-card:hover .char-avatar img { border-color: var(--accent); }
.char-card.active .char-avatar img {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.25);
}
.char-level {
  position: absolute;
  right: 0;
  bottom: 2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  font-weight: 600;
  border: 2px solid var(--bg-primary);
}

.char-detail {
  margin-top: 0.75rem;
  animation: udFadeIn 0.25s ease-out;
}
@keyframes udFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   角色面板（名片背景 + 三列：左信息 / 中立绘 / 右属性+圣遗物）
   ============================================================ */
.panel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background-size: cover;
  background-position: center;
  background-color: rgba(20, 20, 30, 0.6);
}
.panel-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.78);
}
.panel-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  min-height: 380px;
}

.panel-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* 左列：名称/等级/好感/武器/UID */
.panel-left {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}
.panel-name { font-size: 1.4rem; font-weight: 700; color: #fff; }
.panel-sub {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.panel-fetter i { color: #ff6b6b; margin-right: 0.2rem; }

.panel-weapon {
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
}
.panel-weapon-row { display: flex; gap: 0.7rem; }
.panel-weapon img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.panel-weapon-body { min-width: 0; }
.panel-weapon-name { font-size: 0.86rem; font-weight: 600; color: #fff; }
.panel-weapon-line { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.55; }

.panel-uid {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* 中列：立绘 */
.panel-splash {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.panel-splash img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.4));
}

/* 右列：属性 + 圣遗物 */
.panel-right {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}
.panel-stats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.panel-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.panel-stat b { color: #fff; font-weight: 600; }

.panel-relics {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.panel-relic-empty { font-size: 0.78rem; color: var(--text-tertiary); }
.panel-relic {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
}
.panel-relic-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 100%);
  mask-image: linear-gradient(to right, #000 55%, transparent 100%);
}
.panel-relic-body { flex: 1; min-width: 0; }
.panel-relic-main { font-size: 0.75rem; color: #fff; font-weight: 600; }
.panel-relic-subs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.5rem;
  margin-top: 0.2rem;
}
.panel-relic-sub {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.64rem;
  color: var(--text-secondary);
}
.panel-relic-sub b { color: var(--text-primary); font-weight: 500; }

/* 响应式 */
@media (max-width: 768px) {
  .char-avatar, .char-avatar img { width: 60px; height: 60px; }
  .player-card-inner { flex-direction: column; align-items: flex-start; }
  .panel-inner { grid-template-columns: 1fr; }
}
