/* 游戏中心 · 企业级应用目录 */
#view-game-center.gc-page {
  --gc-surface: #ffffff;
  --gc-border: rgba(15, 23, 42, 0.08);
  --gc-border-strong: rgba(15, 23, 42, 0.12);
  --gc-text: #0f172a;
  --gc-muted: #64748b;
  --gc-subtle: #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg, #eef2f7) 32%, #e8edf3 100%);
  color: var(--gc-text);
  -webkit-font-smoothing: antialiased;
}

#view-game-center.gc-page:not(.hidden) {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 150;
  overflow: hidden;
  min-height: 100dvh;
  max-height: 100dvh;
}

#view-game-center.gc-page:not(.hidden) .gc-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

#view-game-center.gc-page:not(.hidden) .gc-section:last-of-type {
  padding-bottom: 12px;
}

#view-game-center.gc-page:not(.hidden) .site-icp--page {
  flex-shrink: 0;
  position: relative;
  z-index: 0;
  background: linear-gradient(180deg, transparent 0%, #f8fafc 40%);
}

#view-game-center.gc-page.page-shell {
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg, #eef2f7) 32%, #e8edf3 100%);
}

/* 顶栏 */
.gc-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gc-surface);
  border-bottom: 1px solid var(--gc-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gc-topbar__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--gc-border);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.gc-topbar__back:active {
  background: #f1f5f9;
}

.gc-topbar__crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--gc-muted);
}

.gc-topbar__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.gc-topbar__brand {
  font-weight: 600;
  color: var(--gc-text);
}

.gc-topbar__sep {
  color: #cbd5e1;
}

.gc-topbar__page {
  font-weight: 500;
  color: var(--gc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-body {
  flex: 1;
  padding: 14px 12px 10px;
}

/* 主面板 */
.gc-panel {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--gc-border-strong) !important;
  border-radius: 16px !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.08) !important;
}

.gc-panel__hero {
  padding: 22px 20px 20px;
  background: linear-gradient(135deg, #0a1628 0%, #132337 48%, #1a2744 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gc-panel__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.gc-panel__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.gc-panel__lead {
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.gc-section {
  padding: 18px 16px 6px;
}

.gc-section--roadmap {
  padding-top: 8px;
  padding-bottom: 16px;
  background: #fafbfc;
  border-top: 1px solid var(--gc-border);
}

.gc-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.gc-section__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gc-subtle);
}

.gc-section__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gc-muted);
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--gc-border);
}

.gc-panel__empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--gc-muted);
}

/* 应用行 */
.gc-apps {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gc-border);
  border-radius: 12px;
  background: var(--gc-surface);
  overflow: hidden;
  padding-bottom: 4px;
}

.gc-apps .gc-app--live * {
  pointer-events: none;
}

.gc-app {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 14px 14px 12px;
  border: none;
  background: var(--gc-surface);
  text-align: left;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.gc-app + .gc-app {
  border-top: 1px solid var(--gc-border);
}

.gc-app--live {
  cursor: pointer;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}

.gc-app--live:active {
  background: #f8fafc;
}

@media (hover: hover) {
  .gc-app--live:hover {
    background: #f8fafc;
  }
  .gc-app--live:hover .gc-app__chev {
    color: var(--accent, #e60012);
    transform: translateX(2px);
  }
}

.gc-app__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gc-border);
}

.gc-app__icon svg {
  width: 22px;
  height: 22px;
}

.gc-app__icon--pet {
  color: #1d4ed8;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}

.gc-app__icon--fight {
  color: #b91c1c;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}

.gc-app__icon--puzzle {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #e9d5ff;
}

.gc-app__icon--sweep {
  color: #a16207;
  background: #fffbeb;
  border-color: #fde68a;
}

.gc-app__icon--gomoku {
  color: #78350f;
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
}

.gc-app__icon--quiz {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.gc-app__icon--muted {
  opacity: 0.65;
  filter: grayscale(0.35);
}

.gc-app__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gc-app__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gc-text);
  line-height: 1.3;
}

.gc-app__desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--gc-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-app--soon .gc-app__name,
.gc-app--soon .gc-app__desc {
  color: var(--gc-subtle);
}

.gc-app__tail {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-app__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--gc-muted);
  background: #f1f5f9;
  border: 1px solid var(--gc-border);
}

.gc-app__badge--live {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.gc-app__chev {
  width: 18px;
  height: 18px;
  color: #cbd5e1;
  transition: transform 0.15s ease, color 0.15s ease;
}

.gc-apps--roadmap .gc-app {
  background: #fafbfc;
}

@media (min-width: 640px) {
  .gc-body {
    padding: 20px 16px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
  }
}

/* 星际灵宠 */
#view-pet.pet-page {
  min-height: 100dvh;
  background: linear-gradient(180deg, #eef2ff 0%, #faf5ff 40%, #fff 100%);
}

#view-pet.pet-page:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.pet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
}

.pet-header h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #312e81;
}

.pet-body {
  flex: 1;
  padding: 0 12px 16px;
  overflow-y: auto;
}

.pet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pet-tab {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: #64748b;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
}

.pet-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.pet-panel.hidden {
  display: none;
}

.pet-stage {
  position: relative;
  margin: 0 auto 14px;
  max-width: 360px;
  padding: 20px 16px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.12);
  text-align: center;
}

.pet-avatar-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
}

.pet-avatar {
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.pet-avatar.bounce {
  animation: pet-bounce 0.45s ease;
}

@keyframes pet-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-12px) scale(1.05);
  }
}

.pet-name {
  font-size: 20px;
  font-weight: 800;
  color: #1e1b4b;
}

.pet-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6366f1;
  font-weight: 600;
}

.pet-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.pet-bar {
  text-align: left;
}

.pet-bar label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.pet-bar label strong {
  color: #334155;
}

.pet-bar track,
.pet-bar .track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.pet-bar .fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.pet-bar .fill--hunger {
  background: linear-gradient(90deg, #fb923c, #f97316);
}
.pet-bar .fill--mood {
  background: linear-gradient(90deg, #f472b6, #ec4899);
}
.pet-bar .fill--energy {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}
.pet-bar .fill--clean {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.pet-exp {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 12px;
  color: #475569;
}

.pet-exp .track {
  margin-top: 6px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.pet-exp .fill {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #6366f1);
}

.pet-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.pet-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  -webkit-tap-highlight-color: transparent;
}

.pet-act span:first-child {
  font-size: 22px;
}

.pet-act:active {
  transform: scale(0.96);
}

.pet-toast {
  margin: 10px auto 0;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #312e81;
  color: #e0e7ff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.pet-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.pet-adopt {
  max-width: 400px;
  margin: 0 auto;
}

.pet-adopt h2 {
  text-align: center;
  font-size: 18px;
  color: #312e81;
}

.pet-species-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.pet-species-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.pet-species-card.selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.pet-species-card strong {
  display: block;
  color: #1e1b4b;
}

.pet-species-card span {
  font-size: 12px;
  color: #64748b;
}

.pet-nick-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 12px;
}

.pet-adopt-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.pet-list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8edf3;
  cursor: pointer;
}

.pet-list-card__mini {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.pet-list-card__info {
  flex: 1;
  min-width: 0;
}

.pet-list-card__info strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.pet-list-card__info span {
  font-size: 12px;
  color: #64748b;
}

.pet-visit-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.pet-feed-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f1f5f9;
  font-size: 13px;
  color: #475569;
}

.pet-feed-item time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.pet-empty {
  text-align: center;
  padding: 28px 16px;
  color: #94a3b8;
  font-size: 14px;
}

.mine-menu__icon--gamecenter {
  color: #ea580c;
  background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%);
}

.mine-menu__tag--game {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.12);
}
