* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #1f2933;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #f5f7fa;
}

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 48px 0;
}

.section-title {
  margin: 0 0 20px;
  font-size: 26px;
  font-weight: 700;
}

.muted {
  color: #6b7280;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.content-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.content-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #eef2f7;
}

.content-card .body {
  padding: 16px;
}

.content-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.detail {
  padding: 32px 0 60px;
}

.detail-panel {
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: 30px;
}

.rich-text {
  line-height: 1.9;
  color: #334155;
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 991px) {
  .brand-name {
    visibility: hidden;
    position: relative;
  }
  .brand-name::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    visibility: visible;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  .brand-name {
    font-size: 14px;
  }
}

.brand img {
  height: 80px;
  max-width: 178px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
}

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

.mobile-menu-btn {
  display: none;
}

.footer {
  padding: 34px 0;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 2fr 1fr;
  gap: 24px;
}

.hero {
  position: relative;
  min-height: 430px;
  color: #fff;
  background: #172033;
}

.hero-slide {
  min-height: 430px;
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  display: flex;
  min-height: 430px;
  align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, .68), rgba(0, 0, 0, .14));
}

.hero h1 {
  margin: 0 0 14px;
  max-width: 680px;
  font-size: 40px;
  line-height: 1.2;
}

.hero p {
  max-width: 620px;
  font-size: 18px;
  color: #e5e7eb;
}

.admin-shell {
  min-height: 100vh;
  background: #f3f6fb;
}

.admin-top {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: #fff;
  background: #1f2937;
}

.admin-main {
  display: flex;
  min-height: calc(100vh - 56px);
}

.admin-side {
  width: 230px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
}

.admin-content {
  flex: 1;
  padding: 20px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.upload-control {
  flex: 1;
}

.image-preview {
  width: 120px;
  height: 82px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.file-picker {
  display: block;
  margin-top: 8px;
}

.hidden-file {
  display: none;
}

@media (max-width: 900px) {
  .card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .hero-slide,
  .hero-overlay {
    min-height: 360px;
  }

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

  .admin-main {
    display: block;
  }

  .admin-side {
    width: 100%;
  }
}

