:root {
  --site-width: 750px;
  --accent-start: #ff7ab6;
  --accent-end: #ff4a90;
  --btn-text: #fff;
  --bg: #f7f7f7;
  --card-bg: #ffffff;
  --muted: #666;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: "Microsoft Yahei", Arial, sans-serif;
  background: var(--bg);
  color: #222;
}

.wrap {
  max-width: var(--site-width);
  width: 100%;
  margin: 0 auto;
  background: transparent;
  padding-bottom: 90px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  background-color: #ffffff;
}

.logo img {
  width: 230px;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.apply-btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  color: var(--btn-text);
  font-weight: 600;
  cursor: pointer;
  background-image: linear-gradient(to bottom, #ff4a8f, #f56565);
  box-shadow: 0 6px 18px rgba(255, 74, 144, 0.18);
  display: inline-block;
  text-decoration: none;
}

.marquee-wrap {
  overflow: hidden;
  background: #f56565;
  padding: 8px 12px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 18s linear infinite;
}

.marquee span {
  display: inline-block;
  margin-right: 48px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* === 第一个轮播 === */
.carousel {
  position: relative;
  overflow: hidden;
  cursor: grab;
}

.slides {
  display: flex;
  transition: transform .5s ease;
}

.slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

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

/* === 站长推荐轮播 === */
.carousel-recommend {
  position: relative;
  overflow: hidden;
  cursor: grab;
  height: 125px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.carousel-recommend .slides {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-recommend .slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.carousel-recommend .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.carousel-recommend .controls {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 5;
}

.carousel-recommend button {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.carousel-recommend .dots {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.carousel-recommend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
}

.carousel-recommend .dot.active {
  background: #fff;
}

/* 手机端轮播适配 */
@media (max-width: 600px) {
  .carousel-recommend {
    height: auto;
  }
  .carousel-recommend .slide img {
    height: auto;
    max-height: 200px;
  }
}

/* === 公共轮播控件 === */
.carousel .controls {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.carousel button {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.dots {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

/* === App 卡片 === */
.apps {
  background: var(--card-bg);
  padding: 12px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.app {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.app .icon {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 10px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #555;
}

.app .icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.app .title {
  font-size: 13px;
  color: #333;
  margin: 8px 0;
}

.app .dl-btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background-image: linear-gradient(to bottom, #ff4a8f, #f56565);
  color: var(--btn-text);
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
}

/* === 页脚 === */
footer {
  padding: 20px 8px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  background: #f56565;
}

footer .footer-note {
  font-weight: normal;
  margin-bottom: 20px;
  font-size: 14px;
}

footer .footer-copy {
  font-weight: bold;
}

/* === 站长推荐标题 === */
.section-title {
  margin: 0 0 20px 4px;
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(to bottom, #ff4a8f, #f56565);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.section-title .emoji {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
}

/* === 底部横幅 === */
.sticky-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 999;
  padding: 0;
}

.sticky-inner {
  position: relative;
  width: 100%;
  max-width: 750px;
  height: 90px;
  margin: 0 auto;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px 6px 0 0;
}

.sticky-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

/* === 手机端适配 === */
@media (max-width:600px) {
  .logo img {
    width: 140px;
    height: 28px;
  }

  .apps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .slide img {
    height: auto;
  }

  .marquee {
    animation-duration: 12s;
  }

  .wrap {
    padding-bottom: 60px;
  }

  .sticky-inner {
    height: auto;
  }

  .banner-img {
    height: auto;
    max-height: 180px;
  }
}

/* === APP 横条卡片样式 === */
.app-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  margin-top: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.app-icon {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
}

.app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.app-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background-image: linear-gradient(to bottom, #ff4a8f, #f56565);
  box-shadow: 0 4px 10px rgba(255,74,143,0.2);
  flex-shrink: 0;
}

/* 手机端适配 */
@media (max-width:600px) {
  .app-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 10px;
  }

  .app-icon {
    width: 80px;
    height: 80px;
  }

  .app-btn {
    padding: 7px 14px;
    font-size: 13px;
  }
}
