/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f7f8fa;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 0;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

/* 头部橙色横幅 */
.header {
  background: #FF6A00;
  border-radius: 16px;
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 14px;
}
.header-title {
  font-size: 32px;
  margin-bottom: 6px;
  font-weight: bold;
  color: #fff;
}
.header-desc {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.5;
  color: #fff;
}

/* 轮播广告 —— 完全和轮播一样尺寸 + 正常缩放 */
.swiper-wrap {
  margin-bottom: 16px;
  position: relative;
}
.swiper {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.swiper-item {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.swiper-item.active {
  opacity: 1;
}
.swiper-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* 大图广告 —— 完全和轮播一样尺寸 + 正常缩放 */
.big-ad {
  width: 100%;
  height: 160px;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  grid-column: 1 / -1;
}
.big-ad img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 格子广告 */
.grid-ad-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed #eee;
  grid-column: 1 / -1;
}
.grid-ad-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.grid-ad-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.grid-ad-item {
  text-align: center;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}

.grid-ad-item a {
  text-decoration: none !important;
  color: inherit !important;
}
.grid-ad-item p {
  font-size: 13px;
  margin: 0;
}

/* 搜索栏 */
.search-wrap {
  margin-bottom: 14px;
}
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  padding: 12px 16px;
  border-radius: 16px;
}
.search-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}
.submit-btn {
  white-space: nowrap;
  padding: 12px 20px;
  border: none;
  background: #FF6A00;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

/* 筛选卡片 */
.type-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.filter-section {
  margin-bottom: 14px;
}
.filter-section:last-child {
  margin-bottom: 0;
}
.filter-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.type-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-item {
  padding: 6px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 99px;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.type-item.active {
  background: #FF6A00 !important;
  color: #fff !important;
  border-color: #FF6A00 !important;
}

/* 平台列表 强制多列布局 */
#platContainer {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 14px !important;
}
.plat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
}
.card-top-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.plat-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f5f5f5;
  object-fit: cover;
}
.plat-name {
  font-size: 17px;
  font-weight: 600;
}
.plat-sub {
  font-size: 13px;
  color: #666;
  margin-top: 3px;
}
.card-bottom-row {
  display: flex;
  gap: 8px;
}
.tag {
  font-size: 12px;
  padding: 3px 8px;
  background: #ffebe6;
  color: #FF6A00;
  border-radius: 99px;
}
.empty {
  text-align: center;
  padding: 40px;
  color: #999;
  grid-column: 1 / -1;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 15px;
}
.modal-box {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: #999;
}
.form-item {
  margin-bottom: 14px;
}
.form-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.form-item input,
.form-item select {
  width: 100%;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 16px;
}
.submit-form-btn {
  width: 100%;
  padding: 13px;
  background: #FF6A00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
}


/* 移动端适配 */
@media (max-width: 768px) {
  .header-title {
    font-size: 26px;
  }
  #platContainer {
    grid-template-columns: 1fr !important;
  }
  .search-bar {
    flex-wrap: nowrap;
  }
  .search-input {
    min-width: 0;
  }
  .grid-ad-box {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ========== 轮播广告：自适应高度 + 不裁剪 + 容器跟随图片 ========== */
  .swiper {
    height: auto !important;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
  }
  .swiper-item {
    position: relative !important;
    width: 100%;
    height: auto !important;
    display: none;
  }
  .swiper-item.active {
    display: block !important;
    opacity: 1 !important;
  }
  .swiper-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 100px !important;
    object-fit: contain !important;
    display: block;
  }

  /* ========== 大图广告：自适应高度 + 不裁剪 + 不留白 ========== */
  .big-ad {
    height: auto !important;
    max-height: 100px !important;
    border-radius: 12px;
    overflow: hidden;
  }
  .big-ad img {
    width: 100% !important;
    height: auto !important;
    max-height: 100px !important;
    object-fit: contain !important;
    display: block;
  }
}