:root {
  --bg: #eef1f6;
  --bg-deep: #0f1419;
  --card: #fff;
  --text: #1a1d26;
  --muted: #6b7280;
  --primary: #2aabee;
  --primary-dark: #1d8ed4;
  --tron: #ff3b30;
  --gold: #d4a84b;
  --esim: #22c55e;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

/* —— 流光文字 —— */
.text-shimmer {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 240% auto;
}

.text-shimmer--light {
  background-image: linear-gradient(
    105deg,
    #ffffff 0%,
    #b8e6ff 18%,
    #fff4c7 36%,
    #ffffff 54%,
    #a5f3fc 72%,
    #ffffff 100%
  );
  filter: drop-shadow(0 0 12px rgba(125, 211, 252, 0.35));
  animation: shimmer-slide 3.2s linear infinite;
}

/* 三个菜单：流光更慢，配色与节奏各不相同 */
.text-shimmer--energy {
  background-image: linear-gradient(
    100deg,
    #7a1f1a 0%,
    #ff3b30 22%,
    #ffb347 45%,
    #ff3b30 68%,
    #5c1512 100%
  );
  animation: shimmer-slide 7.2s linear infinite;
}

.text-shimmer--mall {
  background-image: linear-gradient(
    95deg,
    #0f3d5c 0%,
    #2aabee 20%,
    #fde68a 42%,
    #d4a84b 64%,
    #1d8ed4 85%,
    #0f3d5c 100%
  );
  animation: shimmer-slide 8.6s linear infinite reverse;
  animation-delay: 0.4s;
}

.text-shimmer--esim {
  background-image: linear-gradient(
    110deg,
    #14532d 0%,
    #22c55e 25%,
    #6ee7b7 48%,
    #0ea5e9 72%,
    #14532d 100%
  );
  animation: shimmer-slide 9.8s ease-in-out infinite;
  animation-delay: 0.9s;
}

@keyframes shimmer-slide {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-shimmer {
    animation: none;
    background-size: 100% auto;
    color: inherit;
    -webkit-background-clip: unset;
    background-clip: unset;
  }

  .text-shimmer--light {
    color: #fff;
  }

  .text-shimmer--energy,
  .text-shimmer--mall,
  .text-shimmer--esim {
    color: var(--text);
  }
}

/* —— 进入动效 —— */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, #1a2433 0%, var(--bg-deep) 55%, #080a0e 100%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.35), transparent 70%);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.splash-logo-wrap {
  position: relative;
  animation: logo-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.splash-logo {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.splash-title {
  margin: 20px 0 6px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  animation: title-in 0.7s ease 0.35s both;
}

.splash-tagline {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  animation: title-in 0.7s ease 0.5s both;
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-loader {
  margin-top: 32px;
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.splash-loader-bar {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--primary), #7dd3fc);
  border-radius: 99px;
  animation: loader-slide 1.2s ease-in-out infinite;
}

@keyframes loader-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* —— 主应用 —— */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0));
  opacity: 1;
  transition: opacity 0.4s ease;
}

.app--hidden {
  opacity: 0;
  pointer-events: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: view-in 0.35s ease;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hub-logo-sm {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hub-brand {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #1a1d26;
}

.hub-greet {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.hub-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.hub-menus {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 16px;
  border: 1px solid rgba(42, 171, 238, 0.1);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-card:active {
  transform: scale(0.98);
}

.hub-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 14px;
}

.hub-card--energy .hub-card-icon {
  background: linear-gradient(145deg, #ffe8e6, #fff);
  border: 1px solid rgba(255, 59, 48, 0.15);
}

.hub-card--mall .hub-card-icon {
  background: linear-gradient(145deg, #e8f4ff, #fff);
  border: 1px solid rgba(42, 171, 238, 0.2);
}

.hub-card--esim .hub-card-icon {
  background: linear-gradient(145deg, #e8fbeb, #fff);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.hub-card-body {
  flex: 1;
  min-width: 0;
}

.hub-card-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.hub-card-desc {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.hub-card-arrow {
  font-size: 1.5rem;
  color: #c4c9d4;
  font-weight: 300;
}

.hub-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.page-title {
  font-size: 1.25rem;
  margin: 0 0 14px;
  font-weight: 700;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.module-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 32px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 200;
}

.toast.show {
  opacity: 1;
}