:root {
  --xywy-primary: #1366ec;
  --xywy-primary-dark: #0d4fb8;
  --xywy-primary-light: #eef4ff;
  --xywy-accent: #ff6b35;
  --xywy-accent-dark: #e85a28;
  --xywy-bg: #f4f7fc;
  --xywy-text: #1f2937;
  --xywy-muted: #6b7280;
  --xywy-radius: 16px;
  --xywy-shadow: 0 12px 40px rgba(19, 102, 236, 0.08);
  --xywy-banner: linear-gradient(135deg, #0f3d99 0%, #1366ec 55%, #4f8df7 100%);
  /* 覆盖 style.default.css 的黄色主题变量 */
  --bs-primary: #1366ec;
  --bs-primary-rgb: 19, 102, 236;
}

body {
  color: var(--xywy-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 全站 Bootstrap 主题色统一（覆盖 style.default.css 黄色 #FFAF02） */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background-color: var(--xywy-primary) !important;
  background-image: none !important;
  border-color: var(--xywy-primary) !important;
  color: #fff !important;
  box-shadow: none;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--xywy-primary-dark) !important;
  border-color: var(--xywy-primary-dark) !important;
}
.btn-check:focus + .btn-primary,
.btn-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(19, 102, 236, 0.25) !important;
}
.btn-outline-primary {
  color: var(--xywy-primary) !important;
  border-color: var(--xywy-primary) !important;
  background-image: none !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--xywy-primary) !important;
  border-color: var(--xywy-primary) !important;
  color: #fff !important;
}
/* 课程筛选「全部/免费/付费」激活态 */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--xywy-primary) !important;
  background-image: none !important;
  color: #fff !important;
}
.xywy-course-toolbar .nav-link:not(.active):not(.btn-cta):not(.btn-vip) {
  color: var(--xywy-muted);
  background: #fff;
  border: 1px solid #e5e7eb;
}
.xywy-course-toolbar .nav-link:not(.active):not(.btn-cta):not(.btn-vip):hover {
  color: var(--xywy-primary);
  border-color: var(--xywy-primary);
}
.text-primary { color: var(--xywy-primary) !important; }
a:not(.btn):not(.nav-link):not(.footer-link):not(.xywy-auth-switch):not(.list-group-item) {
  color: var(--xywy-primary);
}
.badge.bg-primary { background-color: var(--xywy-primary) !important; }
.form-control:focus,
.form-select:focus {
  border-color: var(--xywy-primary);
  box-shadow: 0 0 0 0.2rem rgba(19, 102, 236, 0.15);
}
.accordion-button:not(.collapsed) {
  background-color: var(--xywy-primary-light);
  color: var(--xywy-primary-dark);
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(19, 102, 236, 0.15);
}

.xywy-page-main {
  padding-top: 0;
}

.xywy-hero {
  margin-top: 76px;
}

[data-page-title] .xywy-page-banner {
  margin-top: 76px;
}

/* Header */
.xywy-header .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.25s ease;
}

.xywy-header .navbar.scrolled {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.xywy-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: #111 !important;
}

.xywy-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.xywy-header .nav-link {
  font-weight: 500;
  color: #374151 !important;
  padding: 0.5rem 0.9rem !important;
}

.xywy-header .nav-link:hover,
.xywy-header .nav-link.active {
  color: var(--xywy-primary) !important;
}

.xywy-auth-btns .btn {
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
}

/* Hero carousel */
.xywy-hero {
  position: relative;
  overflow: hidden;
}

.xywy-hero .swiper-slide {
  min-height: 420px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.xywy-hero .hero-slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 80px 0 60px;
}

.xywy-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 25, 60, 0.82) 0%, rgba(10, 25, 60, 0.35) 100%);
  z-index: 1;
}

.xywy-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.xywy-hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 560px;
}

.xywy-hero .btn-hero {
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
}

.xywy-hero .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  opacity: 0.5;
}

.xywy-hero .swiper-pagination-bullet-active {
  opacity: 1;
  background: #fff;
}

/* Page banner (subpages) */
.xywy-page-banner {
  background: var(--xywy-banner);
  color: #fff;
  padding: 48px 0 40px;
  margin-bottom: 0;
}

.xywy-page-banner h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.xywy-page-banner .breadcrumb {
  margin-bottom: 0;
  --bs-breadcrumb-divider-color: rgba(255,255,255,0.6);
}

.xywy-page-banner .breadcrumb-item a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.xywy-page-banner .breadcrumb-item.active {
  color: rgba(255,255,255,0.65);
}

/* Section */
.xywy-section {
  padding: 64px 0;
}

.xywy-section-alt {
  background: var(--xywy-bg);
}

.xywy-section-title {
  text-align: center;
  margin-bottom: 40px;
}

.xywy-section-title h2 {
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.xywy-section-title p {
  color: var(--xywy-muted);
  margin-bottom: 0;
}

/* Stats */
.xywy-stats {
  background: #fff;
  border-radius: var(--xywy-radius);
  box-shadow: var(--xywy-shadow);
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.xywy-stat-item {
  text-align: center;
  padding: 24px 16px;
}

.xywy-stat-item strong {
  display: block;
  font-size: 1.75rem;
  color: var(--xywy-primary);
  font-weight: 800;
}

.xywy-stat-item span {
  color: var(--xywy-muted);
  font-size: 0.9rem;
}

/* Feature cards */
.xywy-feature-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: var(--xywy-radius);
  padding: 28px 24px;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.xywy-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--xywy-shadow);
}

.xywy-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 16px;
}

.xywy-feature-icon.blue { background: linear-gradient(135deg, #1366ec, #4f8df7); }
.xywy-feature-icon.orange { background: linear-gradient(135deg, #ff6b35, #ff9a5a); }
.xywy-feature-icon.green { background: linear-gradient(135deg, #10b981, #34d399); }
.xywy-feature-icon.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* Pricing cards */
.xywy-price-card {
  border: 1px solid #e5e7eb;
  border-radius: var(--xywy-radius);
  padding: 28px;
  height: 100%;
  background: #fff;
  transition: all 0.2s ease;
}

.xywy-price-card.featured {
  border-color: var(--xywy-primary);
  box-shadow: 0 16px 48px rgba(19, 102, 236, 0.15);
  transform: scale(1.02);
}

.xywy-price-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--xywy-accent);
}

/* Course area */
#course.xywy-courses {
  scroll-margin-top: 90px;
}

.xywy-course-toolbar .nav-link {
  font-weight: 500;
}

.xywy-course-toolbar .nav-link.btn-cta {
  background: var(--xywy-primary);
  color: #fff !important;
}

.xywy-course-toolbar .nav-link.btn-cta:hover {
  background: var(--xywy-primary-dark);
}

.xywy-course-toolbar .nav-link.btn-vip {
  background: linear-gradient(135deg, var(--xywy-accent), #ff9a5a);
  color: #fff !important;
}

/* 首页快捷入口 */
.xywy-quick-entries {
  margin-top: -28px;
  position: relative;
  z-index: 4;
  margin-bottom: 8px;
}
.xywy-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 100px;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: var(--xywy-radius);
  box-shadow: var(--xywy-shadow);
  color: var(--xywy-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.xywy-quick-card i {
  font-size: 1.5rem;
  color: var(--xywy-primary);
}
.xywy-quick-card:hover {
  transform: translateY(-3px);
  border-color: var(--xywy-primary);
  color: var(--xywy-primary);
}

/* A/B/C 平台模式 */
.xywy-platform-model {
  background: #fff;
  border-radius: var(--xywy-radius);
  border: 1px solid #e8edf5;
  padding: 24px 16px;
  box-shadow: var(--xywy-shadow);
}
.xywy-model-step {
  padding: 12px 16px;
}
.xywy-model-step .step-num {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--xywy-primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}

/* 信息发布卡片 */
.xywy-info-card {
  display: block;
  background: #fff;
  border-radius: var(--xywy-radius);
  overflow: hidden;
  border: 1px solid #e8edf5;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.xywy-info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--xywy-shadow);
  color: inherit;
}
.xywy-info-card .info-cover {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.xywy-info-card .info-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 61, 153, 0.9);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
}
.xywy-info-card .info-body {
  padding: 16px;
}
.xywy-info-card .info-price {
  color: var(--xywy-accent);
  font-weight: 800;
  font-size: 1.1rem;
}

/* 视频教程卡片 */
.xywy-video-card {
  border: 0;
  border-radius: var(--xywy-radius);
  overflow: hidden;
  box-shadow: var(--xywy-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  background: #fff;
}
.xywy-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(19, 102, 236, 0.12);
}
.xywy-video-card .thumb {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
}
.xywy-video-card .thumb .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.25);
  color: #fff;
  font-size: 2rem;
  transition: background 0.2s ease;
}
.xywy-video-card:hover .thumb .play-badge {
  background: rgba(19, 102, 236, 0.45);
}
.xywy-video-card .thumb .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
}
.xywy-video-card .body {
  padding: 16px 18px 18px;
}
.xywy-video-card .meta {
  font-size: 0.8rem;
  color: var(--xywy-muted);
}

/* 文档索引卡片 */
.xywy-doc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid #e8edf5;
  border-radius: var(--xywy-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: all 0.2s ease;
}
.xywy-doc-card:hover {
  border-color: var(--xywy-primary);
  box-shadow: var(--xywy-shadow);
  color: inherit;
  transform: translateY(-2px);
}
.xywy-doc-card .doc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--xywy-primary-light);
  color: var(--xywy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.xywy-doc-card.featured {
  border-color: var(--xywy-primary);
  background: linear-gradient(135deg, #f8fbff, #fff);
}
.xywy-doc-card.featured .doc-icon {
  background: var(--xywy-primary);
  color: #fff;
}

/* 提示条 */
.xywy-tip-bar {
  background: var(--xywy-primary-light);
  border-left: 4px solid var(--xywy-primary);
  border-radius: 0 var(--xywy-radius) var(--xywy-radius) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--xywy-text);
}

/* CTA strip */
.xywy-cta-strip {
  background: linear-gradient(135deg, #0f3d99, #1366ec);
  color: #fff;
  border-radius: var(--xywy-radius);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* User center */
.xywy-user-hero {
  background: linear-gradient(135deg, #eef4ff, #f8fbff);
  border-radius: var(--xywy-radius);
  padding: 32px;
  margin-bottom: 24px;
}

.xywy-user-card {
  border: 0;
  border-radius: var(--xywy-radius);
  box-shadow: var(--xywy-shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.xywy-user-card:hover {
  transform: translateY(-2px);
}

.xywy-user-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--xywy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Auth modals */
.xywy-auth-modal .modal-content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
}

.xywy-auth-modal .modal-header {
  background: linear-gradient(135deg, #0f3d99, #1366ec);
  color: #fff;
  border: 0;
  padding: 24px 28px;
}

.xywy-auth-modal .modal-header .btn-close {
  filter: invert(1);
}

.xywy-auth-modal .modal-body {
  padding: 28px;
}

.xywy-auth-modal .form-control {
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}

.xywy-auth-switch {
  color: var(--xywy-primary);
  cursor: pointer;
  text-decoration: none;
}

.xywy-auth-switch:hover {
  text-decoration: underline;
}

/* Footer */
.xywy-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.xywy-footer h2,
.xywy-footer .h5 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.xywy-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.xywy-footer a:hover {
  color: #fff;
}

.xywy-footer .footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.xywy-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.xywy-footer-bottom a {
  color: #94a3b8;
}

/* Scroll top */
#scrollTop.xywy-scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--xywy-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 999;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(19, 102, 236, 0.35);
}

#scrollTop.xywy-scroll-top.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 991px) {
  .xywy-hero .swiper-slide { min-height: 360px; }
  .xywy-auth-btns { margin-top: 12px; }
  .xywy-price-card.featured { transform: none; }
}
