:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.nav-link {
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--primary);
}

.hero .slogan {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 24px;
}

.hero .intro {
  max-width: 760px;
  margin: 0 auto 28px;
  color: var(--text-secondary);
  font-size: 15px;
}

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-skills .skill {
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* ===== Filter bar ===== */
.filter-bar {
  padding: 28px 0 8px;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: block;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-options button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-options button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-options button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.platform-tabs button.active {
  background: var(--primary);
}

/* ===== Case grid ===== */
.case-list {
  padding: 20px 0 60px;
}

.case-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 920px) {
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .case-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 18px;
  }
}

.case-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.case-card-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--primary-light);
}

.case-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.case-card:hover .case-card-cover img {
  transform: scale(1.05);
}

.platform-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.platform-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  color: #fff;
  font-weight: 500;
  letter-spacing: 1px;
}

.platform-badge.platform-mini {
  background: #10b981;
}

.platform-badge.platform-app {
  background: #3b82f6;
}

.platform-badge.platform-web {
  background: #8b5cf6;
}

.case-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.case-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.case-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.industry-tag {
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 6px;
}

.case-card-date {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .icon {
  font-size: 44px;
  margin-bottom: 12px;
}

/* ===== Detail page ===== */
.detail-header {
  padding: 32px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

.detail-title-wrap {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.detail-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.tag.industry {
  color: var(--primary);
  background: var(--primary-light);
  border-color: transparent;
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.btn-demo:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-demo .arrow {
  transition: transform 0.2s;
}

.btn-demo:hover .arrow {
  transform: translateX(3px);
}

.demo-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.demo-type {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
}

.demo-type-qr {
  background: #10b981;
}

.demo-url {
  font-size: 14px;
  color: var(--primary);
  word-break: break-all;
  min-width: 160px;
}

.demo-cred {
  font-size: 14px;
  color: var(--text-secondary);
}

.demo-cred b {
  color: var(--text);
  font-weight: 600;
  margin-left: 2px;
}

.demo-qr {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  cursor: zoom-in;
  border: 1px solid var(--border);
  background: #fff;
}

.demo-qr:hover {
  box-shadow: var(--shadow-md);
}

.detail-body {
  padding: 0 0 60px;
}

.detail-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.detail-intro {
  color: var(--text);
  font-size: 15px;
  white-space: pre-line;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: var(--primary-light);
  transition: box-shadow 0.2s;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: 999px;
}

/* ===== Footer ===== */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 40px 0;
  margin-top: 20px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 14px;
  max-width: 360px;
}

.footer-contact {
  font-size: 14px;
  line-height: 2;
}

.footer-contact span {
  color: #fff;
}

.footer-copyright {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
}

/* ===== Banner carousel ===== */
.banner {
  width: 100%;
  background: #0f172a;
}

.banner-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  background: #111827;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  background: #111827;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-slide a {
  display: block;
  height: 100%;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
}

.banner:hover .banner-arrow {
  opacity: 1;
}

.banner-arrow:hover {
  background: rgba(255, 255, 255, 0.42);
}

.banner-prev {
  left: 18px;
}

.banner-next {
  right: 18px;
}

.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.banner-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.banner-dot.active {
  background: #fff;
  width: 24px;
}

/* ===== Pagination ===== */
#case-list-anchor {
  scroll-margin-top: 80px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination .page-gap {
  color: var(--text-secondary);
  padding: 0 2px;
  user-select: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    padding: 48px 0 36px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero .slogan {
    font-size: 16px;
  }

  .banner-viewport {
    aspect-ratio: 16 / 10;
  }

  .banner-arrow {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .banner-prev {
    left: 8px;
  }

  .banner-next {
    right: 8px;
  }

  .nav {
    gap: 16px;
  }

  .case-card-title {
    font-size: 15px;
  }

  .detail-title {
    font-size: 24px;
  }

  .detail-section {
    padding: 20px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

@media (max-width: 480px) {
  .nav a {
    font-size: 14px;
  }

  .filter-options button {
    padding: 7px 16px;
    font-size: 13px;
  }
}
