/* Shark Mind Club — 小程序 UI 稿 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #5eb3f6;
  --accent-dim: #3a8fd4;
  --accent-glow: rgba(94, 179, 246, 0.45);
  --accent-secondary: #a78bfa;
  --accent-secondary-glow: rgba(167, 139, 250, 0.4);
  --bg: #0c0e12;
  --card: #151922;
  --card-light: #1d2330;
  --text: #e8eaed;
  --text-muted: #7a8494;
  --text-dim: #505868;
  --nav-bg: #0f1218;
  --header-h: 44px;
  --nav-h: 50px;
  --radius: 16px;
  --phone-w: 375px;
  --phone-h: 812px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(94, 179, 246, 0.07), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(167, 139, 250, 0.06), transparent),
    linear-gradient(160deg, #080a0e 0%, #0e1118 40%, #0a0c10 100%);
  color: var(--text);
  padding: 48px 24px 64px;
}

/* ── Showcase Layout ── */

.showcase-header {
  text-align: center;
  margin-bottom: 56px;
}

.showcase-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent) 0%, #b8dcff 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.showcase-header p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.showcase-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.admin-entry-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 24px;
  background: rgba(94, 179, 246, 0.12);
  border: 1px solid rgba(94, 179, 246, 0.25);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.admin-entry-link:hover {
  background: rgba(94, 179, 246, 0.2);
  border-color: rgba(94, 179, 246, 0.4);
}

.phones-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.phone-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.phone-label span {
  color: var(--accent);
}

/* ── Phone Frame ── */

.phone {
  width: calc(var(--phone-w) + 24px);
  padding: 12px;
  border-radius: 48px;
  background: linear-gradient(145deg, #3a3a3e 0%, #1c1c1e 30%, #2c2c30 70%, #1a1a1c 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 56px;
  background: linear-gradient(180deg, #444, #2a2a2a);
  border-radius: 0 2px 2px 0;
}

.phone::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 110px;
  width: 3px;
  height: 36px;
  background: linear-gradient(180deg, #444, #2a2a2a);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 52px 0 #333;
}

.phone-screen {
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: 38px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island */
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── Mini Program Header ── */

.mp-header {
  height: calc(var(--header-h) + 44px);
  padding-top: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

.mp-header.dark {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.mp-header-title {
  font-size: 17px;
  font-weight: 600;
  color: #000;
}

.mp-header.dark .mp-header-title {
  color: #fff;
}

.mp-capsule {
  position: absolute;
  right: 12px;
  top: calc(44px + 7px);
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.mp-capsule.dark {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
}

.mp-capsule-dot {
  width: 4px;
  height: 4px;
  background: #333;
  border-radius: 50%;
  margin: 0 2px;
}

.mp-capsule.dark .mp-capsule-dot {
  background: #fff;
}

.mp-capsule-divider {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 8px;
}

.mp-capsule.dark .mp-capsule-divider {
  background: rgba(255, 255, 255, 0.2);
}

.mp-capsule-circle {
  width: 18px;
  height: 18px;
  border: 1.5px solid #333;
  border-radius: 50%;
}

.mp-capsule.dark .mp-capsule-circle {
  border-color: #fff;
}

/* ── Page Body ── */

.page-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-body::-webkit-scrollbar {
  display: none;
}

/* ── Bottom Nav ── */

.bottom-nav {
  height: var(--nav-h);
  background: var(--nav-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  cursor: default;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--accent);
  font-weight: 600;
}

/* ══════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════ */

.page-home .page-body {
  background:
    radial-gradient(ellipse 100% 40% at 50% 0%, rgba(94, 179, 246, 0.04), transparent),
    var(--bg);
  padding: 0 16px 16px;
}

.home-brand {
  text-align: center;
  padding: 8px 0 12px;
}

.shark-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
}

.shark-logo svg {
  width: 100%;
  height: 100%;
}

.home-welcome {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.home-notice {
  margin: 12px 0 16px;
  padding: 8px 14px;
  border: 1px solid rgba(94, 179, 246, 0.25);
  border-radius: 8px;
  background: rgba(94, 179, 246, 0.05);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8ec8f8;
}

.home-notice-icon {
  font-size: 14px;
}

.home-hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.home-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 50%, rgba(167, 139, 250, 0.1), transparent);
  pointer-events: none;
}

.home-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-secondary);
  text-shadow: 0 0 20px var(--accent-secondary-glow), 0 0 40px rgba(167, 139, 250, 0.15);
  letter-spacing: 2px;
  position: relative;
}

.home-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.menu-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  cursor: default;
  transition: background 0.2s, border-color 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.menu-card:hover {
  background: var(--card-light);
  border-color: rgba(94, 179, 246, 0.12);
}

.menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(94, 179, 246, 0.08);
}

.menu-info {
  flex: 1;
  min-width: 0;
}

.menu-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.menu-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-arrow {
  color: var(--text-dim);
  font-size: 18px;
  flex-shrink: 0;
}

.menu-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.menu-tag.hot {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.menu-tag.new {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-secondary);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.home-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-section-divider::before,
.home-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 179, 246, 0.15), transparent);
}

/* ══════════════════════════════════════
   RANKING PAGE
   ══════════════════════════════════════ */

.page-ranking .page-body {
  background: var(--bg);
}

.ranking-banner {
  height: 160px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(139, 92, 246, 0.85) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 160'%3E%3Ctext x='200' y='120' text-anchor='middle' font-size='100' fill='rgba(255,255,255,0.06)' font-weight='bold'%3E🏆%3C/text%3E%3C/svg%3E") center/cover;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ranking-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.15) 100%);
}

.ranking-trophy {
  font-size: 28px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.ranking-title-text {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.ranking-banner-btns {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 2;
}

.ranking-btn {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  color: #c8dff5;
  border: 1px solid rgba(148, 197, 255, 0.2);
  backdrop-filter: blur(4px);
}

.ranking-filters {
  padding: 14px 12px 10px;
  background: var(--bg);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--card);
  cursor: default;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--accent);
  color: #0c0e12;
  font-weight: 700;
}

.ranking-period {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.ranking-list {
  padding: 8px 12px 16px;
}

.rank-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.rank-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.rank-medal {
  position: absolute;
  top: -8px;
  left: -6px;
  font-size: 22px;
  z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.rank-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #152030, #0f1824);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.rank-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.rank-card.rank-2 .rank-avatar {
  border-color: #c0c0c0;
  color: #c0c0c0;
}

.rank-card.rank-3 .rank-avatar {
  border-color: #cd7f32;
  color: #cd7f32;
}

/* ══════════════════════════════════════
   PROFILE PAGE
   ══════════════════════════════════════ */

.page-profile .page-body {
  position: relative;
  background: var(--bg);
}

.profile-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.85)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Crect fill='%23111' width='400' height='600'/%3E%3Ctext x='60' y='180' font-size='120' fill='%23222' opacity='0.8'%3E♠%3C/text%3E%3Ctext x='220' y='320' font-size='100' fill='%23333' opacity='0.6'%3E♦%3C/text%3E%3Ctext x='100' y='480' font-size='90' fill='%23222' opacity='0.7'%3E♣%3C/text%3E%3Ctext x='250' y='550' font-size='80' fill='%23333' opacity='0.5'%3E♥%3C/text%3E%3C/svg%3E") center/cover;
  filter: blur(0px);
}

.profile-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

.profile-brand {
  text-align: center;
  margin: 40px 0 48px;
}

.profile-brand-cn {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.profile-brand-en {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  line-height: 1.3;
}

.profile-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(94, 179, 246, 0.18);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  cursor: default;
  transition: border-color 0.2s, background 0.2s;
}

.profile-item:hover {
  border-color: rgba(94, 179, 246, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.profile-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(94, 179, 246, 0.25);
}

.profile-item-text {
  flex: 1;
}

.profile-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.profile-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-login-btn {
  width: 100%;
  max-width: 280px;
  padding: 15px 0;
  border: none;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #0c0e12;
  font-size: 17px;
  font-weight: 700;
  cursor: default;
  box-shadow:
    0 4px 24px rgba(94, 179, 246, 0.3),
    0 0 40px rgba(94, 179, 246, 0.1);
  letter-spacing: 2px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-login-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 28px rgba(94, 179, 246, 0.4),
    0 0 50px rgba(94, 179, 246, 0.15);
}

/* ── Home page: no white header ── */

.page-home .mp-header {
  background: var(--bg);
  height: calc(var(--header-h) + 44px);
}

.page-home .mp-header-title {
  display: none;
}

.page-home .mp-capsule {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.page-home .mp-capsule-dot {
  background: #fff;
}

.page-home .mp-capsule-divider {
  background: rgba(255, 255, 255, 0.15);
}

.page-home .mp-capsule-circle {
  border-color: #fff;
}

/* ── Responsive ── */

@media (max-width: 420px) {
  body {
    padding: 24px 12px;
  }

  .phone {
    transform: scale(0.88);
    transform-origin: top center;
  }

  .phone-wrap {
    margin-bottom: -80px;
  }
}
