/* ============================================================
   小程序首页 UI 示意（纯 CSS 实现，便于随产品改版维护）
   结构参考：miniprogram/pages/index + demo/miniprogram/01-home.png
   品牌色与线上一致：#07c160
   ============================================================ */

.experience__device {
  display: flex;
  justify-content: center;
  align-items: center;
}

.experience__showcase {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 284px;
  max-width: 100%;
}

.experience__caption {
  margin-top: 14px;
  padding: 0 4px;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-on-dark-muted);
  letter-spacing: 0.04em;
}

/* ---------- 手机外框 ---------- */
.phone-frame {
  width: 100%;
}

.phone-frame__bezel {
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(155deg, #3d4559 0%, #0a0f1c 55%, #1a2236 100%);
  box-shadow:
    0 0 0 1px rgba(201, 169, 98, 0.18),
    0 32px 64px rgba(0, 0, 0, 0.45);
}

/* ---------- 小程序画布 ---------- */
.mini-app {
  --mp-green: #07c160;
  --mp-green-dark: #06ad56;
  --mp-bg: #f5f5f5;
  --mp-text: #333;
  --mp-muted: #999;
  display: flex;
  flex-direction: column;
  height: 548px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--mp-bg);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 10px;
  line-height: 1.4;
  color: var(--mp-text);
}

.mini-app__status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 14px;
  background: #fff;
  font-size: 9px;
  font-weight: 600;
}

.mini-app__island {
  width: 52px;
  height: 14px;
  border-radius: 10px;
  background: #0a0f1c;
}

.mini-app__signals {
  width: 36px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mp-text) 0 70%, #ddd 70% 100%);
  opacity: 0.35;
}

.mini-app__nav {
  flex-shrink: 0;
  padding: 6px 0 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mini-app__scroll {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--mp-bg);
}

/* 顶栏：定位 + 搜索 */
.mini-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
}

.mini-loc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: none;
  background: none;
  font-size: 10px;
  font-weight: 600;
  color: var(--mp-green);
  white-space: nowrap;
  cursor: default;
}

.mini-loc__icon {
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  background: var(--mp-green);
  transform: rotate(-45deg);
}

.mini-loc__arrow {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid var(--mp-green);
}

.mini-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: #f0f0f0;
  color: var(--mp-muted);
  font-size: 9px;
}

.mini-search__icon {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border: 1.5px solid #bbb;
  border-radius: 50%;
  position: relative;
}

.mini-search__icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 1.5px;
  background: #bbb;
  right: -3px;
  bottom: -1px;
  transform: rotate(45deg);
}

/* Banner */
.mini-banner {
  position: relative;
  margin: 8px 10px 0;
  padding: 12px 12px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mp-green) 0%, var(--mp-green-dark) 100%);
  color: #fff;
  overflow: hidden;
}

.mini-banner__tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 8px;
}

.mini-banner__title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.mini-banner__sub {
  margin-top: 6px;
  font-size: 8px;
  line-height: 1.45;
  opacity: 0.92;
  max-width: 92%;
}

.mini-banner__btn {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--mp-green);
  font-size: 9px;
  font-weight: 600;
}

.mini-banner__dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 4px;
}

.mini-banner__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.mini-banner__dots span.is-active {
  width: 10px;
  border-radius: 2px;
  background: #fff;
}

/* 四宫格 */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 8px 10px 0;
  padding: 10px 6px;
  border-radius: 10px;
  background: #fff;
}

.mini-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  color: var(--mp-text);
}

.mini-grid__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
}

.mini-grid__icon--coach {
  background: #e8f8ee;
}

.mini-grid__icon--coach::after {
  content: "";
  position: absolute;
  inset: 9px 10px 11px;
  border: 2px solid var(--mp-green);
  border-radius: 50% 50% 0 0;
}

.mini-grid__icon--video {
  background: #fff3e6;
}

.mini-grid__icon--video::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #f5a623;
}

.mini-grid__icon--star {
  background: #fff9e6;
}

.mini-grid__icon--star::after {
  content: "★";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #f5a623;
  line-height: 1;
}

.mini-grid__icon--more {
  background: #f0ecff;
}

.mini-grid__icon--more::before,
.mini-grid__icon--more::after {
  content: "";
  position: absolute;
  background: #8b7fd4;
  border-radius: 1px;
}

.mini-grid__icon--more::before {
  width: 12px;
  height: 2px;
  top: 11px;
  left: 10px;
  box-shadow: 0 5px 0 #8b7fd4, 0 10px 0 #8b7fd4;
}

/* 热门教练 */
.mini-section {
  margin-top: 8px;
  padding: 0 10px 6px;
}

.mini-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-section__title {
  font-size: 11px;
  font-weight: 700;
}

.mini-section__more {
  font-size: 8px;
  color: var(--mp-green);
}

.mini-section__hint {
  margin-top: 2px;
  font-size: 7px;
  color: var(--mp-muted);
}

.mini-coaches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.mini-coach {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mini-coach__photo {
  height: 52px;
  background-size: cover;
  background-position: center;
}

.mini-coach__photo--a {
  background-image: linear-gradient(160deg, #8aa8c4 0%, #5a7a96 100%);
}

.mini-coach__photo--b {
  background-image: linear-gradient(160deg, #a8c49a 0%, #6a8f5c 100%);
}

.mini-coach__name {
  padding: 6px 8px 0;
  font-size: 9px;
  font-weight: 600;
}

.mini-coach__meta {
  padding: 2px 8px 0;
  font-size: 7px;
  color: var(--mp-muted);
}

.mini-coach__star {
  color: #f5a623;
}

.mini-coach__stat {
  padding: 2px 8px 8px;
  font-size: 7px;
  color: var(--mp-green);
  font-weight: 500;
}

/* 零费用条 */
.mini-trust {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: auto 10px 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8f8ee, #d4f1dd);
}

.mini-trust__icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--mp-green);
  position: relative;
}

.mini-trust__icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 4px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.mini-trust p {
  font-size: 7px;
  line-height: 1.45;
  color: #666;
}

/* 底部 Tab */
.mini-tabbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 0 8px;
  background: #fff;
  border-top: 1px solid #eee;
}

.mini-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  color: var(--mp-muted);
}

.mini-tab i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #ddd;
  position: relative;
}

.mini-tab.is-active {
  color: var(--mp-green);
}

.mini-tab.is-active i {
  background: var(--mp-green);
  border-radius: 4px;
}

.mini-tab:nth-child(1) i {
  clip-path: polygon(50% 10%, 90% 40%, 75% 90%, 25% 90%, 10% 40%);
  background: #ccc;
}

.mini-tab.is-active:nth-child(1) i {
  background: var(--mp-green);
}

.mini-tab:nth-child(2) i {
  border-radius: 50%;
  background: transparent;
  border: 2px solid #ccc;
}

.mini-tab.is-active:nth-child(2) i {
  border-color: var(--mp-green);
}

.mini-tab:nth-child(3) i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  border: 4px solid transparent;
  border-left: 6px solid #ccc;
}

.mini-tab.is-active:nth-child(3) i::after {
  border-left-color: var(--mp-green);
}

.mini-tab:nth-child(4) i {
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border: 2px solid #ccc;
  background: transparent;
}

.mini-tab.is-active:nth-child(4) i {
  border-color: var(--mp-green);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .experience__showcase {
    width: min(284px, 78vw);
  }

  .mini-app {
    height: min(520px, 118vw);
  }
}

@media (max-width: 480px) {
  .experience__device {
    width: 100%;
  }
}
