:root {
  --xh-primary: #5e35b1;
  --xh-primary-dark: #4527a0;
  --xh-primary-light: #7e57c2;
  --xh-accent: #ff7043;
  --xh-accent-dark: #f4511e;
  --xh-bg-dark: #1a1a2e;
  --xh-text-light: #f8f9fa;
  --xh-body-bg: #f8f9fc;
  --xh-card-bg: #ffffff;
  --xh-muted: #6c757d;
  --xh-font-body: "LXGW WenKai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  --xh-font-heading: "LXGW WenKai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--xh-font-body);
  font-size: 1rem;
  line-height: 1.75;
  background-color: var(--xh-body-bg);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--xh-font-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #1f1f2e;
}

p {
  line-height: 1.75;
}

.navbar {
  background: linear-gradient(90deg, var(--xh-primary) 0%, var(--xh-primary-dark) 100%);
  box-shadow: 0 2px 16px rgba(94, 53, 177, 0.25);
}

.navbar-brand {
  font-size: 1.55rem;
  letter-spacing: -0.5px;
}

.navbar .nav-link {
  font-weight: 500;
  opacity: 0.92;
  transition: opacity 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  opacity: 1;
}

.navbar .form-control,
.navbar .input-group-text {
  border-radius: 999px;
}

.navbar .input-group-text {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.navbar .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-accent {
  background: linear-gradient(135deg, var(--xh-accent) 0%, var(--xh-accent-dark) 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 112, 67, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 112, 67, 0.45);
  color: #fff;
}

.btn-primary {
  background-color: var(--xh-primary);
  border-color: var(--xh-primary);
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--xh-primary-dark);
  border-color: var(--xh-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.25);
}

.btn-outline-primary {
  color: var(--xh-primary);
  border-color: var(--xh-primary);
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-outline-primary:hover {
  background-color: var(--xh-primary);
  border-color: var(--xh-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.2);
}

.btn-outline-light {
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-outline-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-soft {
  background-color: rgba(94, 53, 177, 0.08);
  color: var(--xh-primary);
  border: none;
  font-weight: 500;
  transition: all 0.15s ease;
}

.btn-soft:hover {
  background-color: rgba(94, 53, 177, 0.15);
  color: var(--xh-primary-dark);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 72vh;
  color: var(--xh-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../images/hero-bg.a5202b34d707.jpg") center/cover no-repeat;
  filter: brightness(0.5);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(26, 26, 46, 0.75) 45%, rgba(69, 39, 160, 0.78) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.12;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
}

.hero .lead {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  opacity: 0.96;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.hero .stat-label {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.section-title {
  font-weight: 800;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--xh-accent);
  border-radius: 2px;
  margin-top: 0.75rem;
}

.section-title-center {
  display: block;
  text-align: center;
}

.section-title-center::after {
  margin-left: auto;
  margin-right: auto;
}

.card {
  border: none;
  border-radius: 1rem;
  background: var(--xh-card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-weight: 700;
  line-height: 1.35;
}

.card-text {
  line-height: 1.65;
}

.card-img-top {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  height: 200px;
  object-fit: cover;
  background-color: #e9ecef;
}

.card-img-top-sm {
  height: 150px;
}

.avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.avatar-lg {
  width: 88px;
  height: 88px;
}

.avatar-xl {
  width: 120px;
  height: 120px;
}

.cover-banner {
  position: relative;
  height: 320px;
  background-size: cover;
  background-position: center;
  border-radius: 1rem;
  overflow: hidden;
}

.cover-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.88) 0%, rgba(26, 26, 46, 0.35) 55%, rgba(26, 26, 46, 0.15) 100%);
}

.cover-banner-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.75rem;
  color: #fff;
}

.price-tag {
  color: var(--xh-accent-dark);
  font-weight: 700;
  font-size: 1.15rem;
}

.badge-category {
  background-color: rgba(94, 53, 177, 0.1);
  color: var(--xh-primary);
  font-weight: 500;
  padding: 0.35em 0.75em;
  border-radius: 999px;
}

.badge-type {
  background-color: rgba(255, 112, 67, 0.12);
  color: var(--xh-accent-dark);
  font-weight: 500;
  padding: 0.35em 0.75em;
  border-radius: 999px;
}

footer {
  background-color: var(--xh-bg-dark);
  color: rgba(255, 255, 255, 0.75);
}

footer h5,
footer h6 {
  color: #fff;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover {
  color: #fff;
}

.stat-card {
  border-left: 4px solid var(--xh-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-card.accent {
  border-left-color: var(--xh-accent);
}

.qr-box {
  display: inline-block;
  padding: 1rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-state .empty-icon {
  width: 120px;
  height: 120px;
  background: rgba(94, 53, 177, 0.08);
  color: var(--xh-primary-light);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--xh-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(94, 53, 177, 0.15);
}

.nav-pills .nav-link.active {
  background-color: var(--xh-primary);
}

.nav-pills .nav-link {
  color: var(--xh-primary);
  font-weight: 500;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
}

.page-link {
  color: var(--xh-primary);
}

.page-item.active .page-link {
  background-color: var(--xh-primary);
  border-color: var(--xh-primary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--xh-primary) 0%, var(--xh-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-soft {
  background-color: rgba(94, 53, 177, 0.04);
}

.payment-method-label {
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.payment-method-label:hover {
  border-color: var(--xh-primary-light);
}

.payment-method-label input[type="radio"] {
  accent-color: var(--xh-primary);
}

.help-doc h1,
.help-doc h2,
.help-doc h3,
.help-doc h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.help-doc h1 {
  font-size: 2rem;
  margin-top: 0;
}

.help-doc p {
  margin-bottom: 1rem;
}

.help-doc ul,
.help-doc ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.help-doc li {
  margin-bottom: 0.35rem;
}

.help-doc code {
  background: rgba(94, 53, 177, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--xh-primary-dark);
}

.help-doc pre {
  background: #1a1a2e;
  color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.help-doc pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.help-doc table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.help-doc th,
.help-doc td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
}

.help-doc th {
  background: rgba(94, 53, 177, 0.06);
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 60vh;
    padding: 4rem 0;
  }

  .hero .lead {
    font-size: 1.1rem;
  }

  .cover-banner {
    height: 240px;
  }

  .cover-banner-content {
    padding: 1.25rem;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
