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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1a202c;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(
    to bottom,
    #1f3a4d 0%,
    #2c5871 35%,
    #2e5e57 60%,
    #355c3a 78%,
    #4a7a3f 100%
  );
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Background carousel ---------- */
.bg-carousel {
  position: absolute;
  inset: 0;
  display: flex;
  width: max-content;
  height: 100%;
  z-index: 0;
  will-change: transform;
}

.bg-slide {
  flex: 0 0 100vw;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  z-index: 1;
  pointer-events: none;
}

.top-bar,
.cards,
.copyright {
  position: relative;
  z-index: 2;
}

/* ---------- Top bar ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  z-index: 10;
}

.logo {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.nav-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 12px 28px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  gap: 18px;
}

.nav-link {
  color: #1a202c;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #2c5871;
}

.sep {
  width: 1px;
  height: 16px;
  background: #cbd5e0;
}

/* ---------- Cards ---------- */
.cards {
  flex: 1;
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 40px 48px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  position: relative;
  flex: 1 1 0;
  max-width: 200px;
  min-width: 150px;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 48%, rgba(255, 255, 255, 0.08) 100%),
    rgba(20, 32, 44, 0.06);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  text-decoration: none;
  color: #ffffff;
  box-shadow:
    0 20px 44px rgba(6, 18, 30, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.32), transparent 55%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 26px 52px rgba(6, 18, 30, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.card:active {
  transform: translateY(-3px) scale(0.98);
  transition-duration: 0.1s;
}

.card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

.card-icon {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  color: rgba(255, 255, 255, 0.92);
}

.card-icon svg {
  display: block;
  filter: drop-shadow(0 1px 6px rgba(6, 18, 30, 0.3));
}

.card-index {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
}

.card-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.card-icon,
.card-index,
.card-text {
  text-shadow: 0 1px 10px rgba(6, 18, 30, 0.35);
}

.label {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.label-cn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: rgba(255, 255, 255, 0.9);
}

@media (prefers-reduced-transparency: reduce) {
  .card {
    background: rgba(28, 44, 58, 0.82);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Footer ---------- */
.copyright {
  text-align: center;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0.92;
  padding: 18px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .top-bar {
    padding: 20px 24px;
  }
  .logo {
    font-size: 18px;
  }
  .nav-pill {
    padding: 10px 18px;
    gap: 12px;
  }
  .nav-link {
    font-size: 14px;
  }
  .cards {
    gap: 16px;
    max-width: 560px;
    padding: 32px 24px;
  }
  .card {
    flex: 0 1 calc(33.333% - 12px);
    max-width: none;
    min-width: 120px;
  }
  .card-icon {
    top: 14px;
    left: 14px;
  }
  .card-index {
    top: 16px;
    right: 16px;
  }
  .label {
    font-size: 17px;
  }
}

@media (max-width: 520px) {
  .card {
    flex: 0 1 calc(50% - 8px);
  }
}
