/* =========================================================
   Image2 · 登录 / 我的 / 后台 / 分享 页面样式
   ========================================================= */
.page-body {
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------------- 登录 ---------------- */
.auth-wrap {
  min-height: 100dvh;
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(18px + var(--sat)) 16px 24px;
  display: grid;
  place-items: center;
  gap: 16px;
  align-content: center;
}
@media (min-width: 920px) {
  .auth-wrap { grid-template-columns: 1.02fr 0.98fr; gap: 56px; padding: 40px; }
}
.auth-hero { max-width: 480px; text-align: center; }
@media (min-width: 920px) { .auth-hero { text-align: left; } }
.brand.big { font-size: 19px; justify-content: center; }
@media (min-width: 920px) { .brand.big { justify-content: flex-start; } }
.brand.big .logo { width: 40px; height: 40px; border-radius: 13px; font-size: 19px; }
.auth-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 6.6vw, 46px);
  line-height: 1.14;
  letter-spacing: -1.4px;
  font-weight: 850;
  animation: enterUp 0.7s var(--ease) both;
}
.auth-hero h1 .grad {
  background: linear-gradient(100deg, #6a72ff, #a06bff 40%, #35c8ff 72%, #ff9166);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradSlide 9s ease infinite;
}
.auth-hero p {
  color: var(--ink-2);
  font-size: 14.5px;
  margin: 0 auto 18px;
  max-width: 420px;
  animation: enterUp 0.75s var(--ease) both 0.08s;
}
.feats { list-style: none; padding: 0; margin: 0; display: none; gap: 10px; }
@media (min-width: 920px) { .feats { display: grid; } }
.feats li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: var(--shadow-sm);
  animation: enterUp 0.6s var(--ease) both;
  text-align: left;
}
.feats li:nth-child(2) { animation-delay: 0.08s; }
.feats li:nth-child(3) { animation-delay: 0.16s; }
.feats li b {
  width: 34px; height: 34px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: linear-gradient(140deg, rgba(106,114,255,0.16), rgba(53,200,255,0.14));
}
.feats li strong { display: block; font-size: 14px; }
.feats li span { font-size: 12.5px; color: var(--ink-3); }

.auth-card {
  width: 100%;
  max-width: 430px;
  border-radius: 30px;
  padding: 24px 22px 22px;
}
.tabs {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--stroke-soft);
  margin-bottom: 20px;
}
.tabs button {
  position: relative; z-index: 1; flex: 1;
  height: 40px; border-radius: 12px;
  font-size: 14.5px; font-weight: 700;
  color: var(--ink-3);
  transition: color 0.3s;
}
.tabs button.on { color: var(--brand); }
.tab-pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #f0eeff);
  box-shadow: 0 6px 16px -8px rgba(106,114,255,0.8), inset 0 1px 0 #fff;
  transition: transform 0.42s var(--ease);
}
.tab-panel { animation: enterUp 0.4s var(--ease) both; }
.btn.full { width: 100%; margin-top: 6px; }
.fineprint {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin: 12px 0 0;
}

/* ---------------- 通用页面头部 ---------------- */
.page-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(62px + var(--sat));
  padding: var(--sat) 14px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0 0 20px 20px;
}
.page-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 14px calc(40px + env(safe-area-inset-bottom, 0px));
  animation: enterFade 0.4s ease both;
}
@media (min-width: 760px) { .page-main { padding: 26px 22px 60px; } }

/* ---------------- 余额卡 ---------------- */
.balance-card {
  border-radius: 28px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(140deg, rgba(255,255,255,0.92), rgba(243,240,255,0.8) 55%, rgba(232,248,255,0.85));
}
.balance-card::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  right: -80px; top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(160,107,255,0.35), transparent 70%);
  animation: float2 18s var(--ease) infinite alternate;
}
.balance-card .label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; letter-spacing: 0.4px; }
.balance-card .amount {
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 850;
  letter-spacing: -2px;
  margin: 4px 0 2px;
  background: linear-gradient(120deg, #4b3fd0, #8a58ff 55%, #00a6d6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.balance-card .sub { font-size: 12.5px; color: var(--ink-3); }
.balance-actions { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------------- 分段导航 ---------------- */
.seg-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; overflow-x: auto;
  padding: 5px; border-radius: 16px;
  background: rgba(255,255,255,0.52);
  border: 1px solid var(--stroke-soft);
  margin: 16px 0;
  scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs button {
  flex: 1 1 28%;
  height: 40px; padding: 0 10px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink-3);
  transition: all 0.28s var(--ease);
  white-space: nowrap;
}
.seg-tabs button.on {
  color: var(--brand);
  background: linear-gradient(135deg, #fff, #f2f0ff);
  box-shadow: 0 8px 18px -12px rgba(106,114,255,0.85), inset 0 1px 0 #fff;
}

/* ---------------- 列表 / 卡片 ---------------- */
.panel {
  border-radius: 22px;
  padding: 8px;
  animation: enterUp 0.45s var(--ease) both;
}
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 12px;
  border-radius: 15px;
  transition: background 0.22s;
}
.row + .row { border-top: 1px solid rgba(255,255,255,0.6); }
.row:hover { background: rgba(255,255,255,0.55); }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t2 { font-size: 12px; color: var(--ink-3); }
.row .num { font-weight: 800; font-variant-numeric: tabular-nums; }
.num.plus { color: var(--ok); }
.num.minus { color: #d63a6a; }

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: 0.7; }

/* 作品网格 */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.g-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1;
  cursor: zoom-in;
  animation: enterUp 0.45s var(--ease) both;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.g-item:hover { transform: translateY(-3px) scale(1.015); box-shadow: var(--shadow-md); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item .g-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 9px 7px;
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(20,22,42,0.7));
  display: flex; justify-content: space-between; gap: 6px;
  opacity: 0.92;
}

/* 兑换码 */
.redeem-box {
  display: flex; gap: 10px; align-items: center;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--stroke-soft);
}
.redeem-box .input { height: 46px; background: transparent; border: none; box-shadow: none; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.redeem-box .input:focus { box-shadow: none; transform: none; background: rgba(255,255,255,0.7); }

/* 表单行 */
.form-grid { display: grid; gap: 12px; }
@media (min-width: 620px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: 13px 14px; border-radius: 18px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
  animation: enterUp 0.45s var(--ease) both;
}
.stat .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 850; letter-spacing: -0.8px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v.small { font-size: 17px; }

/* 表格（移动端转卡片） */
.table-card { border-radius: 20px; overflow: hidden; }
.tscroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 11px 12px;
  font-size: 11.5px; color: var(--ink-3); font-weight: 700;
  letter-spacing: 0.3px; white-space: nowrap;
}
table.data td { padding: 11px 12px; border-top: 1px solid rgba(255,255,255,0.7); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,255,255,0.5); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.badge.ok { color: #067a58; background: rgba(22,185,129,0.14); }
.badge.bad { color: #b3132c; background: rgba(255,92,114,0.14); }
.badge.admin { color: #5b3fd6; background: rgba(106,114,255,0.16); }

.codes-out {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
}

/* 分享页 */
.share-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--sat)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
}
.share-card {
  width: min(560px, 100%);
  border-radius: 28px;
  padding: 14px;
  animation: modalIn 0.55s var(--ease-spring);
}
.share-card img { width: 100%; border-radius: 18px; display: block; }
.share-foot { display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px; flex-wrap: wrap; }
.share-foot .who { font-size: 12.5px; color: var(--ink-3); }

/* 开关 */
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(150,160,200,0.35);
  transition: background 0.3s var(--ease);
  cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(60,70,150,0.3);
  transition: transform 0.34s var(--ease-spring);
}
.switch input:checked + span { background: linear-gradient(135deg, var(--brand), var(--brand-3)); }
.switch input:checked + span::after { transform: translateX(20px); }

@keyframes barGrow {
  from { height: 0 !important; opacity: 0.3; }
}
