/* === 通用组件样式 === */

/* 按钮 */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(95deg, var(--gold-light), var(--gold-dark));
  color: #2a1a05;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(232,201,122,0.28);
  text-decoration: none;
}
.btn-gold:active { opacity: 0.85; }
.btn-gold.block { width: 100%; padding: 14px; font-size: 16px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.btn-ghost:active { border-color: var(--gold); color: var(--text-primary); }

.btn-pill {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid var(--border-mid);
  background: var(--bg-input);
  color: var(--text-dim);
}
.btn-pill.active {
  border-color: var(--gold);
  background: var(--accent-tint);
  color: var(--text-primary);
}

/* 卡片 */
.card-glass {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-label {
  font-size: 13px;
  color: var(--purple-dark);
  letter-spacing: 0.16em;
  margin-bottom: 9px;
}

.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: 11px;
  color: var(--text-body);
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.form-select:focus { border-color: var(--gold); }

/* 弹窗底层基础 */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
}
.sheet-panel {
  width: 100%;
  background: linear-gradient(178deg, #1c1340, #140c30);
  border-radius: 26px 26px 0 0;
  padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 50px rgba(0,0,0,0.6);
  border-top: 1px solid var(--border-gold);
  animation: llup 0.35s cubic-bezier(0.2,0.9,0.3,1.2);
  max-height: 90%;
  overflow-y: auto;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 16px;
}

/* 覆盖层弹窗 */
.overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(5,3,15,0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.overlay-panel {
  width: 300px;
  background: linear-gradient(172deg, #1c1142, #241650 46%, #160d36);
  border-radius: 22px;
  padding: 24px 22px 20px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6);
  border: 1px solid var(--border-gold);
  animation: llup 0.4s cubic-bezier(0.2,0.9,0.3,1.2);
  position: relative;
  overflow: hidden;
  max-height: 80%;
  overflow-y: auto;
}
.overlay-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 12%, #fff 50%, transparent),
    radial-gradient(1px 1px at 80% 20%, #cdb8ff 50%, transparent),
    radial-gradient(1px 1px at 62% 7%, #e8c97a 50%, transparent),
    radial-gradient(1px 1px at 28% 92%, #fff 50%, transparent),
    radial-gradient(1px 1px at 88% 80%, #cdb8ff 50%, transparent);
  opacity: 0.7;
  pointer-events: none;
  border-radius: 22px;
}

/* 操作按钮组 */
.action-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.action-btn-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-btn-icon.green {
  background: #07c160;
  border: none;
}
.action-btn-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast */
.toast-container {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 60;
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  color: var(--text-body);
  font-size: 12.5px;
  padding: 11px 20px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 五行圆球 */
.el-orb {
  width: 42px; height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #1a1030;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.el-orb.deficient {
  box-shadow: 0 0 18px var(--orb-glow), 0 0 0 2px var(--accent-ring);
}

/* 水晶珠子 */
.crystal-bead {
  border-radius: 50%;
  box-shadow: inset -3px -4px 9px rgba(0,0,0,0.35), 0 3px 8px rgba(0,0,0,0.35);
  flex: none;
}

/* 金珠标签 */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

/* 占位符加载 */
.skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.12);
  animation: llshim 1.4s ease-in-out infinite;
}
.skeleton-line:nth-child(2) { animation-delay: 0.2s; }
.skeleton-line:nth-child(3) { animation-delay: 0.4s; width: 84%; }
.skeleton-line:nth-child(4) { animation-delay: 0.6s; width: 70%; }

/* 尺寸按钮 */
.size-btn {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12pt;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  background: var(--bg-input);
  color: var(--text-dim);
}
.size-btn.active {
  border-color: var(--gold);
  background: var(--accent-tint);
  color: var(--text-primary);
}

/* 珠子选择chip */
.bead-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(167,139,250,0.14);
  background: rgba(255,255,255,0.03);
}
.bead-chip.active {
  border-color: var(--gold);
  background: var(--accent-tint);
}
.bead-chip .chip-name {
  font-size: 12pt;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

/* 五行指示点 */
.el-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
}
