/* 我的页 /account — 对齐设计稿 */

@media (max-width: 720px) {
  body.page-account.mobile-account-page .site-header {
    display: none !important;
  }
}

body.page-account.mobile-account-page .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.page-account.mobile-account-page {
  background: #f5f7fa;
}

.mobile-account-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: max(6px, env(safe-area-inset-top, 0px)) 0 12px;
  box-sizing: border-box;
}

.mobile-account-shell .mobile-home-header {
  padding-left: 16px;
  padding-right: 16px;
  margin-bottom: 12px;
}

.mobile-account-shell .mobile-home-header--no-search {
  margin-bottom: 14px;
}

/* 用户信息 */
.mobile-account-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 16px;
}

.mobile-account-user__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.mobile-account-user__avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
}

.mobile-account-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mobile-account-user__name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: #101828;
  line-height: 1.25;
}

.mobile-account-user__sub {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-account-user__sub-row {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #667085;
  line-height: 1.4;
}

.mobile-account-user__code {
  font-weight: 800;
  color: #1e80ff;
  letter-spacing: 0.04em;
}

.mobile-account-user__balance {
  font-weight: 800;
  color: #101828;
}

.mobile-account-recharge-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e80ff 0%, #4096ff 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(30, 128, 255, 0.28);
}

.mobile-account-recharge-btn__icon {
  display: block;
  flex-shrink: 0;
}

/* 后台横版横幅（1000×280） */
.mobile-account-banner {
  display: block;
  margin: 0 16px 16px;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  background: #f1f5f9;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

a.mobile-account-banner:active {
  opacity: 0.94;
}

.mobile-account-banner img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  object-position: center;
  aspect-ratio: 1000 / 280;
}

/* 快捷四格（同一卡片内） */
.mobile-account-quick-card {
  margin: 0 16px 16px;
  padding: 16px 6px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
}

.mobile-account-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.mobile-account-quick__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
  border: 0;
  box-shadow: none;
  transition: background 0.15s ease;
}

.mobile-account-quick__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 0;
  width: 1px;
  height: 76%;
  background: #eef2f6;
}

.mobile-account-quick__item:active {
  background: #f5f9ff;
}

.mobile-account-quick__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: visible;
  color: #1e80ff;
  background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 55%, #f0f7ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 6px rgba(30, 128, 255, 0.12);
}

.mobile-account-quick__icon svg {
  display: block;
  flex-shrink: 0;
}

.mobile-account-quick__icon--filled svg {
  width: 20px;
  height: 20px;
}

.mobile-account-quick__icon--invite svg {
  width: 20px;
  height: 20px;
}

.mobile-account-quick__label {
  font-size: 11px;
  font-weight: 700;
  color: #344054;
  text-align: center;
  line-height: 1.25;
}

/* 功能列表（竖排） */
.mobile-account-menu--list {
  display: flex;
  flex-direction: column;
  margin: 0 16px 16px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
}

.mobile-account-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  text-decoration: none;
  color: #344054;
  border: 0;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.mobile-account-menu__item--btn {
  appearance: none;
  -webkit-appearance: none;
}

.mobile-account-menu__item:last-child {
  border-bottom: 0;
}

.mobile-account-menu__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: #eff6ff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

.mobile-account-menu__icon--app {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v10M8.5 10.5 12 14l3.5-3.5'/%3E%3Cpath d='M5 19h14'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--help {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.75 9.25a2.25 2.25 0 0 1 4.2 1.35c0 1.35-1.35 1.8-2.1 2.25-.75.45-1.35 1.05-1.35 2.15M12 17.25h.01'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--redeem {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Cpath d='M3 10h18M8 6v12M16 6v12'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--safe {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 5.5v5.5c0 4.15 2.98 8.03 7 9 4.02-.97 7-4.85 7-9V5.5L12 3z'/%3E%3Cpath d='M9.5 12.5 11 14l3.5-3.5'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--cs {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14v-2.5a8 8 0 0 1 16 0V14'/%3E%3Crect x='2.5' y='13' width='4.5' height='6.5' rx='1.5'/%3E%3Crect x='17' y='13' width='4.5' height='6.5' rx='1.5'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--announce {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--privacy {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.mobile-account-menu__icon--wechat {
  background-image: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-account-menu__icon--wechat svg {
  display: block;
  width: 20px;
  height: auto;
  max-height: 20px;
}

.mobile-account-menu__item--static {
  cursor: default;
  opacity: 0.85;
}

.mobile-account-menu__item--static .mobile-account-menu__chev {
  display: none;
}

.mobile-account-menu__label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
}

.mobile-account-menu__chev {
  flex-shrink: 0;
  font-size: 18px;
  color: #c4cdd5;
  font-weight: 300;
}

.mobile-account-footer {
  margin: 12px 16px 0;
  padding: 14px 8px calc(var(--mobile-tab-bar-clearance, calc(58px + env(safe-area-inset-bottom, 0px))) + 8px);
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
}

.mobile-account-footer p {
  margin: 0;
}

.mobile-account-footer a {
  color: #667085;
  font-weight: 600;
}

body.mobile-tab-shell .app-shell:has(.mobile-account-footer) .mobile-account-shell {
  padding-bottom: var(--mobile-shell-bottom-gap, 12px) !important;
}

@media (max-width: 380px) {
  .mobile-account-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 8px;
  }

  .mobile-account-quick__item::after {
    display: none;
  }

  .mobile-account-quick__item:nth-child(odd):not(:last-child)::after {
    display: block;
    top: 10%;
    height: 80%;
  }

  .mobile-account-user {
    flex-wrap: wrap;
  }

  .mobile-account-recharge-btn {
    margin-left: auto;
  }
}

/* 未登录 · 我的页 */
.mobile-account-shell--guest .mobile-home-member {
  display: none;
}

body.page-account.mobile-account-page:has(.mobile-account-shell--guest) {
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(56, 189, 248, 0.22), transparent 58%),
    linear-gradient(180deg, #eef6ff 0%, #f5f7fa 38%, #f5f7fa 100%);
}

.mobile-account-shell--guest {
  padding-bottom: 4px;
}

.mobile-account-shell--guest .mobile-home-header {
  margin-bottom: 10px;
}

.mobile-account-guest {
  margin: 0 16px 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.mobile-account-guest__card {
  padding: 28px 20px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 16px 40px rgba(30, 64, 120, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.mobile-account-guest__avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.mobile-account-guest__avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #1e80ff;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, #93c5fd 0%, #1e80ff 52%, #38bdf8 100%) border-box;
  border: 3px solid transparent;
  box-shadow: 0 10px 28px rgba(30, 128, 255, 0.18);
}

.mobile-account-guest__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
}

.mobile-account-guest__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

.mobile-account-guest__desc {
  margin: 0 auto 16px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
  color: #64748b;
}

.mobile-account-guest__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.mobile-account-guest__feature {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid #dbeafe;
}

.mobile-account-guest__actions {
  display: grid;
  gap: 12px;
}

.mobile-account-guest__login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 48%, #38bdf8 100%);
  box-shadow: 0 10px 24px rgba(30, 128, 255, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-account-guest__login:active {
  transform: scale(0.985);
  box-shadow: 0 6px 16px rgba(30, 128, 255, 0.22);
}

.mobile-account-guest__register {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.mobile-account-guest__register a {
  color: #1e80ff;
  font-weight: 700;
  text-decoration: none;
}

.mobile-account-guest__register a:active {
  opacity: 0.75;
}

.mobile-account-guest__browse {
  margin: 12px 8px 0;
  font-size: 12px;
  line-height: 1.55;
  color: #94a3b8;
}

.mobile-account-guest__browse a {
  color: #64748b;
  font-weight: 650;
  text-decoration: none;
}

.mobile-account-shell--guest .mobile-account-menu--list {
  margin-top: 0;
}
