:root {
  --ps-bg: #f0f0f2;
  --ps-surface: rgba(255, 255, 255, 0.88);
  --ps-panel: #ffffff;
  --ps-border: rgba(120, 120, 130, 0.15);
  --ps-ink: #2c2c2e;
  --ps-soft: #6e6e73;
  --ps-primary: #636366;
  --ps-primary-deep: #3a3a3c;
  --ps-accent: #8e8e93;
  --ps-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ps-ink);
  background:
    radial-gradient(circle at top left, rgba(160, 160, 170, 0.15), transparent 28%),
    linear-gradient(180deg, #f5f5f7 0%, #e8e8ec 100%);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-badge {
  display: none;
}

.brand-logo {
  width: 5rem;
  height: 3rem;
  border-radius: 0.4rem;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip,
.nav-link-btn,
.nav-ghost-btn,
.primary-btn,
.secondary-btn {
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e5ea;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link-btn,
.nav-ghost-btn,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0 1.1rem;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.nav-link-btn,
.nav-ghost-btn {
  color: #e5e5ea;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-link-btn.accent,
.primary-btn {
  background: linear-gradient(135deg, #636366, #8e8e93);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-link-btn:hover,
.nav-ghost-btn:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.page-shell {
  padding-bottom: 3rem;
}

.page-main {
  min-height: calc(100vh - 150px);
}

.hero-shell {
  padding: 3rem 0 2rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy {
  padding: 1.5rem 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(99, 99, 102, 0.06);
  color: var(--ps-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.3;
  color: var(--ps-ink);
  letter-spacing: 0.02em;
}

.hero-copy p {
  max-width: 40rem;
  margin: 0;
  color: var(--ps-soft);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-copy p a {
  color: var(--ps-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(99, 99, 102, 0.3);
  transition: border-color 0.2s ease;
}

.hero-copy p a:hover {
  border-color: var(--ps-primary);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.inline-form {
  display: inline-flex;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(99, 99, 102, 0.1);
  color: var(--ps-ink);
  font-weight: 600;
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mini-stat {
  padding: 1.5rem 1.2rem;
  border: 1px solid var(--ps-border);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--ps-shadow);
}

.mini-stat span {
  display: block;
  color: var(--ps-soft);
  margin-bottom: 0.5rem;
}

.mini-stat strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--ps-primary-deep);
}

.mini-stat.accent {
  background: linear-gradient(135deg, rgba(142, 142, 147, 0.12), rgba(99, 99, 102, 0.08));
}

.product-section {
  padding: 1.5rem 0 3.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-kicker {
  margin: 0 0 0.4rem;
  color: var(--ps-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--ps-ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 760px;
}

.product-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: 1.2rem;
  border: 1px solid var(--ps-border);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: var(--ps-ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 99, 102, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.product-thumb {
  flex-shrink: 0;
}

.product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 5rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(99, 99, 102, 0.1), rgba(142, 142, 147, 0.08));
  color: var(--ps-primary-deep);
  font-size: 1.2rem;
  font-weight: 700;
  overflow: hidden;
  padding: 0.4rem 0.6rem;
}

.product-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.product-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ps-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(99, 99, 102, 0.08);
  color: var(--ps-primary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.product-card:hover .product-link {
  background: rgba(99, 99, 102, 0.15);
}

.product-cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  color: var(--ps-primary);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.product-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-intro-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--ps-border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ps-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-intro-btn:hover {
  background: rgba(99, 99, 102, 0.1);
  border-color: rgba(99, 99, 102, 0.3);
}

/* Introduction modal */
.intro-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.intro-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.intro-modal {
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.intro-modal-overlay.active .intro-modal {
  transform: translateY(0);
}

.intro-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ps-border);
  flex-shrink: 0;
}

.intro-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ps-ink);
}

.intro-modal-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: var(--ps-soft);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease;
  line-height: 1;
}

.intro-modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.intro-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  color: var(--ps-ink);
  font-size: 0.95rem;
  line-height: 1.8;
}

.intro-modal-body h1,
.intro-modal-body h2,
.intro-modal-body h3,
.intro-modal-body h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--ps-ink);
}

.intro-modal-body h1 { font-size: 1.4rem; }
.intro-modal-body h2 { font-size: 1.2rem; }
.intro-modal-body h3 { font-size: 1.1rem; }

.intro-modal-body p {
  margin: 0.6rem 0;
  color: var(--ps-soft);
}

.intro-modal-body ul,
.intro-modal-body ol {
  padding-left: 1.5rem;
  margin: 0.6rem 0;
}

.intro-modal-body li {
  margin: 0.3rem 0;
  color: var(--ps-soft);
}

.intro-modal-body strong {
  color: var(--ps-ink);
}

.intro-modal-body a {
  color: var(--ps-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(99, 99, 102, 0.3);
}

.intro-modal-body a:hover {
  border-color: var(--ps-primary);
}

.intro-modal-body hr {
  border: none;
  border-top: 1px solid var(--ps-border);
  margin: 1rem 0;
}

.product-cta span {
  transition: transform 0.2s ease;
}

.product-card:hover .product-cta {
  opacity: 1;
}

.product-card:hover .product-cta span {
  transform: translateX(3px);
}

/* ========== Bootstrap 灰银风格覆盖 ========== */

:root {
  --bs-primary: #636366;
  --bs-primary-rgb: 99, 99, 102;
  --bs-link-color: #636366;
  --bs-link-hover-color: #3a3a3c;
}

.btn-primary {
  background: linear-gradient(135deg, #636366, #8e8e93) !important;
  border-color: #636366 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #3a3a3c, #636366) !important;
  border-color: #3a3a3c !important;
}

.btn-outline-primary {
  color: #636366 !important;
  border-color: #636366 !important;
}

.btn-outline-primary:hover {
  background: #636366 !important;
  border-color: #636366 !important;
  color: #fff !important;
}

.card {
  border: 1px solid var(--ps-border);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.85);
}

.card-title {
  color: var(--ps-ink);
  font-weight: 700;
}

.form-control {
  border: 1px solid rgba(120, 120, 130, 0.25);
  border-radius: 0.6rem;
  color: var(--ps-ink);
  background: #fff;
}

.form-control:focus {
  border-color: #636366;
  box-shadow: 0 0 0 0.2rem rgba(99, 99, 102, 0.15);
}

.form-label {
  color: var(--ps-ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.form-text {
  color: var(--ps-soft);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.2);
  color: #b02a37;
  border-radius: 0.6rem;
}

.alert-success {
  background: rgba(25, 135, 84, 0.08);
  border-color: rgba(25, 135, 84, 0.2);
  color: #146c43;
  border-radius: 0.6rem;
}

.modal-content {
  border: 1px solid var(--ps-border);
  border-radius: 1rem;
}

.modal-header {
  border-bottom: 1px solid var(--ps-border);
}

.modal-title {
  color: var(--ps-ink);
  font-weight: 700;
}

.btn-close {
  filter: grayscale(1);
}

a {
  color: var(--ps-primary);
}

a:hover {
  color: var(--ps-primary-deep);
}

.product-body p {
  margin: 0;
  color: var(--ps-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(99, 99, 102, 0.2);
  border-radius: 1.5rem;
  text-align: center;
  box-shadow: var(--ps-shadow);
}

.empty-icon {
  font-size: 3rem;
}

.empty-state h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  color: var(--ps-ink);
}

.empty-state p {
  margin: 0;
  color: var(--ps-soft);
  max-width: 34rem;
  line-height: 1.8;
}

.site-footer {
  border-top: 1px solid rgba(44, 44, 46, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  color: var(--ps-soft);
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-copy {
    padding-top: 0.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .product-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1rem;
  }

  .product-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem 0;
  }
}

@media (max-width: 576px) {
  .site-nav {
    min-height: 56px;
    padding: 0.6rem 0;
  }

  .site-header {
    position: static;
  }

  .brand-logo {
    width: 3.5rem;
    height: 2.2rem;
  }

  .nav-actions {
    gap: 0.35rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .user-chip {
    min-height: 1.8rem;
    padding: 0 0.55rem;
    font-size: 0.72rem;
  }

  .nav-link-btn,
  .nav-ghost-btn {
    min-height: 1.8rem;
    padding: 0 0.55rem;
    font-size: 0.72rem;
    border-width: 1px;
  }

  .logout-form {
    display: inline-flex;
  }

  .hero-shell {
    padding: 1.5rem 0 1rem;
  }

  .hero-copy h1 {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .hero-copy p {
    font-size: 0.92rem;
  }

  .hero-panel {
    gap: 0.75rem;
  }

  .mini-stat {
    padding: 1rem 0.9rem;
  }

  .mini-stat strong {
    font-size: 1.4rem;
  }

  .product-section {
    padding: 1rem 0 2.5rem;
  }

  .section-header h2 {
    font-size: 1.35rem;
  }

  .product-card {
    padding: 1.1rem;
    gap: 1rem;
  }

  .product-icon {
    width: 6.5rem;
    height: 4rem;
  }

  .product-title-row h3 {
    font-size: 1rem;
  }

  .product-body p {
    font-size: 0.85rem;
  }

  .product-cta {
    font-size: 0.78rem;
  }

  .intro-modal {
    max-height: 90vh;
    border-radius: 1rem;
  }

  .intro-modal-body {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .intro-modal-header {
    padding: 1rem 1.25rem;
  }
}
