/* 绿茵体育 移动端样式 */
:root {
  --green: #19b455;
  --green-dark: #0e9a44;
  --green-soft: #eafaf0;
  --text: #1c2330;
  --text-2: #8a9099;
  --line: #eef1f5;
  --bg: #f4f6f8;
  --card: #ffffff;
  --topbar-h: 56px;
  --chips-h: 44px;
  --tabbar-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background: #e9edf1;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; font: inherit; cursor: pointer; color: inherit; }
img { display: block; }

/* App 外壳：大屏时居中显示为手机宽度 */
.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 24px rgba(0,0,0,.08);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

/* 顶部栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { display: flex; }
.brand-text strong { display: block; font-size: 17px; line-height: 1.1; color: var(--text); }
.brand-text small { display: block; font-size: 10px; color: var(--text-2); margin-top: 2px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.icon-btn:active { background: var(--bg); }

/* 横向导航 */
.chips {
  position: sticky;
  top: var(--topbar-h);
  z-index: 49;
  display: flex;
  gap: 22px;
  padding: 0 14px;
  height: var(--chips-h);
  align-items: center;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-size: 15px;
  color: #555d68;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
}
.chip.active { color: var(--green); font-weight: 700; }
.chip.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.content { padding-top: 12px; }

/* Banner */
.hero {
  position: relative;
  margin: 0 12px 12px;
  border-radius: 14px;
  overflow: hidden;
  height: 200px;
  background:
    radial-gradient(ellipse 55% 45% at 78% 12%, rgba(255,255,255,.22), transparent 70%),
    radial-gradient(ellipse 40% 35% at 35% 8%, rgba(110,231,160,.18), transparent 70%),
    linear-gradient(165deg, #0c2118 0%, #0a2c1d 52%, #14502f 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .4s;
}
.hero.pending .hero-bg { opacity: 0; }
.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6,14,20,.92) 0%, rgba(6,14,20,.72) 45%, rgba(6,14,20,.25) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 22px 18px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.hero-inner h2 { font-size: 27px; line-height: 1.25; font-weight: 800; letter-spacing: 1px; }
.hero-inner h2.hl { color: #3ddc78; }
.hero-inner p { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.88); letter-spacing: 2px; }
.hero-btn {
  margin-top: auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 22px;
  box-shadow: 0 6px 16px rgba(25,180,85,.35);
}
.hero-btn:active { background: var(--green-dark); }

/* 通用卡片 */
.card {
  background: var(--card);
  border-radius: 14px;
  margin: 0 12px 12px;
  padding: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 16px; font-weight: 700; }
.more-link { font-size: 12px; color: var(--text-2); }
.more-link:active { color: var(--green); }

/* 分类宫格 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 6px;
  margin-top: 14px;
}
.cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.cat:active .cat-ic { transform: scale(.92); }
.cat-ic {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.cat-name { font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.cat-sub { font-size: 10.5px; color: var(--text-2); }
.c-green  { background: #22c55e; }
.c-blue   { background: #3b82f6; }
.c-orange { background: #f97316; }
.c-purple { background: #a855f7; }
.c-red    { background: #ef4444; }
.c-blue2  { background: #4f7cf0; }
.c-green2 { background: #10b981; }
.c-yellow { background: #f59e0b; }

/* 赛事卡片 */
.match-list { margin-top: 12px; }
.match {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.match:last-child { margin-bottom: 0; }
.m-league {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
.m-league img {
  width: 24px; height: 24px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 2px;
}
.m-time { margin-left: auto; color: var(--text-2); font-weight: 500; font-size: 13px; }
.m-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 14px 0 12px;
}
.team { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.team img {
  width: 34px; height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 3px;
}
.team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team:last-child { flex-direction: row-reverse; text-align: right; }
.vs {
  margin: 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: #b6bcc4;
  letter-spacing: 1px;
}
.watch-btn {
  width: 100%;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--green);
  color: var(--green);
  background: var(--green-soft);
  font-size: 13.5px;
  font-weight: 700;
}
.watch-btn:active { background: var(--green); color: #fff; }

.badge-cba {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a00, #f43f3f);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.badge-team {
  width: 30px; height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.t-gd { background: linear-gradient(135deg, #e03131, #b02020); }
.t-ln { background: linear-gradient(135deg, #3b5bdb, #1c3faa); }

.view-all {
  display: block;
  text-align: center;
  padding-top: 12px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
  border-top: 1px dashed var(--line);
}
.view-all:active { color: var(--green); }

/* 新闻列表 */
.news-list { margin-top: 12px; }
.news-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }
.thumb {
  position: relative;
  width: 108px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d3a2d 0%, #10241b 100%);
}
.thumb::before {
  content: "";
  width: 26px;
  height: 26px;
  opacity: .45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23ffffff' stroke-width='1.4' opacity='.8'/%3E%3Cpath d='M12 6l4 3-1.5 4.5h-5L8 9z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .4s;
}
.thumb.pending img { opacity: 0; }
.news-text { min-width: 0; display: flex; flex-direction: column; }
.news-text h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-text time { margin-top: auto; font-size: 12px; color: var(--text-2); }

/* 平台特性：横向滑动条 */
.features {
  background: var(--card);
  border-radius: 14px;
  margin: 0 12px 0;
  padding: 14px 8px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.features::-webkit-scrollbar { display: none; }
.feat {
  flex: 0 0 21%;
  min-width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.feat-ic {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.feat strong { font-size: 12px; font-weight: 700; white-space: nowrap; }
.feat small { font-size: 10px; color: var(--text-2); white-space: nowrap; }

/* 底部导航 */
.tabbar {
  position: fixed;
  z-index: 60;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #9aa1ab;
}
.tab.active { color: var(--green); }
.tab:active { opacity: .7; }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: max(14px, calc(50% - 240px + 14px));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 55;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  color: #555d68;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* 搜索弹层 */
.search-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0,0,0,.4);
}
.search-panel {
  background: #fff;
  padding: 12px 14px 20px;
  border-radius: 0 0 16px 16px;
  animation: slideDown .22s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.search-row { display: flex; align-items: center; gap: 10px; }
.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 20px;
  padding: 0 14px;
  height: 38px;
}
.search-input input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  min-width: 0;
}
.search-cancel { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.hot-search { margin-top: 16px; }
.hot-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-tags a {
  font-size: 13px;
  color: #555d68;
  background: var(--bg);
  border-radius: 16px;
  padding: 7px 14px;
}
.hot-tags a:active { background: var(--green-soft); color: var(--green); }

/* 提示条 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 26px);
  transform: translateX(-50%) translateY(10px);
  z-index: 80;
  background: rgba(28,35,48,.92);
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 常见问题 */
.faq-list { margin-top: 12px; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--green);
  font-size: 20px;
  font-weight: 400;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  font-size: 13.5px;
  line-height: 1.7;
  color: #555d68;
  padding: 0 0 12px;
}

/* 平台介绍 */
.about-text { margin-top: 10px; }
.about-text p {
  font-size: 13.5px;
  line-height: 1.75;
  color: #4a5260;
  margin-bottom: 10px;
}
.about-text p:last-child { margin-bottom: 0; }

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px 16px 28px;
  color: #8a919c;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
}
.footer-links a {
  font-size: 13px;
  color: #5c6470;
  text-decoration: none;
}
.footer-links a:active { color: var(--green); }
.footer-copy { font-size: 12px; margin-bottom: 4px; }
.footer-icp { font-size: 12px; }
.footer-icp a {
  color: #8a919c;
  text-decoration: none;
}

/* 大屏显示移动端版本 */
@media (min-width: 481px) {

  html, body {
    background:
      radial-gradient(circle at 18% 12%, rgba(25,180,85,.18), transparent 55%),
      radial-gradient(circle at 82% 88%, rgba(79,124,240,.14), transparent 50%),
      linear-gradient(160deg, #0f1722 0%, #111a27 45%, #0d1520 100%);
    background-attachment: fixed;
  }

  /* app 模拟手机外框 */
  .app {
    max-width: 480px;
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    border: 8px solid #1b2733;
    box-shadow:
      0 0 0 1px rgba(255,255,255,.04),
      0 30px 60px -15px rgba(0,0,0,.55),
      0 0 80px rgba(25,180,85,.15);
    overflow: hidden;
  }

  /* 顶栏/横滑导航在圆角框内的衔接 */
  .topbar { border-radius: 20px 20px 0 0; }

  /* 搜索弹层面板限宽并对齐到 app 中央 */
  .search-panel {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
  }

  /* Toast 跟随 app 宽度居中 */
  .toast { max-width: 420px; }
}

