body {
  font-family:
    "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background: linear-gradient(
    135deg,
    #e2e8f0 0%,
    #f1f5f9 30%,
    #e2eafc 70%,
    #d7e3fc 100%
  );
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #475569;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(241, 245, 249, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(71, 85, 105, 0.08);
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 15px 0;
  z-index: 1000;
}

/* 独立页面的导航栏为 fixed，主内容需预留其高度避免被遮挡。 */
main {
  padding: 86px 20px 40px;
}

@media (max-width: 600px) {
  .navbar {
    gap: 6px;
    padding: 10px 0;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 5px 8px;
  }

  main {
    padding-top: 72px;
  }
}

.nav-link {
  color: #475569;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  padding: 5px 15px;
  border-radius: 20px;
}
.nav-link:hover,
.nav-link.active {
  color: #1e293b;
  background: rgba(215, 227, 252, 0.6);
}

.main-content {
  padding: 100px 20px 40px 20px;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(45deg, #334155 0%, #475569 50%, #64748b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #64748b;
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.page-section {
  display: none;
}
.page-section.active {
  display: block;
}

/* 详情页原单页布局已有顶部留白；多页模式下由 main 统一处理。 */
#page-detail {
  padding-top: 20px !important;
}

.hero-banner {
  max-width: 1200px;
  margin: 0 auto 40px auto;
  background:
    linear-gradient(rgba(71, 85, 105, 0.25), rgba(71, 85, 105, 0.45)),
    var(--hero-image, url("https://shenyang-cycling-img.oss-cn-beijing.aliyuncs.com/routes/0bd941cb84a7dd8ef960573e12c7308a0d0126ff_size783_w1080_h731.jpg"))
      center/cover;
  height: 300px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(71, 85, 105, 0.1);
}
.hero-banner h2 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(15, 23, 42, 0.3);
}
.hero-banner p {
  color: #fff;
  font-size: 0.95rem;
}

.form-hint {
  display: block;
  margin: -4px 0 14px;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* 首页横幅编辑区使用独立的上传控件和预览比例，避免继承多图预览的小尺寸规则。 */
.hero-settings-card {
  margin-top: 32px;
}

#hero-banner-form {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-upload-zone {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 16px 20px;
  border: 2px dashed rgba(100, 116, 139, 0.45);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.75);
  color: #475569;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.hero-upload-zone:hover {
  border-color: #475569;
  background: rgba(226, 232, 240, 0.65);
}

.hero-upload-zone span {
  font-weight: 600;
}

.hero-upload-zone small {
  color: #64748b;
  font-size: 0.8rem;
}

.hero-image-preview {
  width: 100%;
  margin-top: 14px;
}

.hero-image-preview .upload-preview-image {
  display: block;
  width: 100%;
  height: 240px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  object-fit: cover;
}

@media (max-width: 600px) {
  .hero-image-preview .upload-preview-image {
    height: 170px;
  }
}

.section-title {
  max-width: 1200px;
  margin: 40px auto 20px auto;
  color: #334155;
  font-size: 1.5rem;
  border-left: 4px solid #94a3b8;
  padding-left: 15px;
  font-weight: 700;
}

.form-container {
  max-width: 750px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(148, 163, 184, 0.12);
}

.form-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #334155;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #1e293b;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #64748b;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.25);
}

/* 优化后的上传控框样式 */
.upload-zone {
  border: 2px dashed rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.6);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}
.upload-zone:hover {
  background: rgba(215, 227, 252, 0.3);
  border-color: #64748b;
}
.upload-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.preview-img-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
}
.preview-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.preview-img-wrapper .remove-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  background: rgba(225, 29, 72, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  cursor: pointer;
  line-height: 18px;
  padding: 0;
}

/* 地图选点面板设计 */
.interactive-map-box {
  width: 100%;
  height: 350px;
  background: #eef2f6;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin-bottom: 8px;
}
.map-tips {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(45deg, #64748b, #475569);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(71, 85, 105, 0.15);
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(71, 85, 105, 0.25);
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.route-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.08);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.route-card:hover {
  transform: translateY(-8px);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 12px 40px 0 rgba(148, 163, 184, 0.18);
}

.route-card h3 {
  margin: 0 0 15px 0;
  font-size: 1.4rem;
  color: #1e293b;
  font-weight: 700;
}
.meta-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.轻松 {
  background: rgba(167, 243, 208, 0.4);
  color: #065f46;
  border: 1px solid rgba(167, 243, 208, 0.7);
}
.badge.硬核 {
  background: rgba(254, 226, 226, 0.5);
  color: #991b1b;
  border: 1px solid rgba(254, 226, 226, 0.8);
}

.description {
  color: #475569;
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}
.route-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.loading-text {
  text-align: center;
  grid-column: 1/-1;
  font-size: 1.2rem;
  color: #64748b;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.admin-item {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 14px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  transition: all 0.3s;
  color: #334155;
  font-weight: 600;
}
.admin-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
}
.admin-item.is-featured {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(254, 243, 199, 0.45);
}
.admin-action-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.action-btn {
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.action-btn.edit {
  background: rgba(215, 227, 252, 0.5);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.action-btn.edit:hover {
  background: #94a3b8;
  color: #fff;
}
.action-btn.delete {
  background: rgba(254, 226, 226, 0.5);
  color: #991b1b;
  border: 1px solid rgba(254, 226, 226, 0.8);
}
.action-btn.delete:hover {
  background: #e11d48;
  color: #fff;
}
.action-btn.featured {
  background: rgba(254, 243, 199, 0.8);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.action-btn.featured:hover {
  background: #f59e0b;
  color: #fff;
}

.back-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #475569;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  margin-bottom: 20px;
}
.back-btn:hover {
  background: rgba(215, 227, 252, 0.6);
  color: #1e293b;
  transform: translateX(-4px);
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}
@media (max-width: 992px) {
  .detail-container {
    grid-template-columns: 1fr;
  }
}

.detail-info,
.detail-map-box {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.08);
}
.detail-info h2 {
  margin-top: 0;
  color: #1e293b;
  font-size: 1.8rem;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: #64748b;
  font-weight: 600;
}

.detail-story-node {
  margin-bottom: 25px;
}
.detail-story-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.detail-story-text {
  color: #475569;
  line-height: 1.8;
  font-size: 1.05rem;
  margin: 0 0 10px 0;
  text-align: justify;
}

.detail-map-box h3 {
  margin-top: 0;
  color: #334155;
  font-size: 1.2rem;
  border-left: 4px solid #94a3b8;
  padding-left: 10px;
}
#route-map-container {
  width: 100%;
  height: 500px;
  background: #eef2f6;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #64748b;
  text-align: center;
}
