/* ==========================================================================
   布局版本 1：教学指南版 (Mobile-First 架构 · 手机端绝对优先，PC端优雅增强)
   ========================================================================== */
:root {
  --bg-main: #051317;
  --bg-side: #081d24;
  --bg-card: #0c2730;
  --bg-card-hover: #123440;
  --primary: #10b981;
  --accent: #34d399;
  --border-gold: rgba(16, 185, 129, 0.35);
  --text-main: #ffffff;
  --text-body: #cbd5e1;
  --text-muted: #7ca1a7;
  --border: rgba(16, 185, 129, 0.18);
}

* { margin:0; padding:0; box-sizing:border-box; }

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-body);
  line-height: 1.7;
  padding-bottom: 75px; /* 避开吸底快捷条 */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   【手机端优先基础流】(默认适用全尺寸手机：360px ~ 430px)
   -------------------------------------------------------------------------- */
.mobile-top-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 19, 23, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  width: 100%;
}
.m-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-top-dl {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 99px;
  display: inline-block;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.app-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.sidebar-panel {
  display: none; /* 手机端隐藏PC固定控制台边栏 */
}

.main-view {
  padding: 14px 16px 40px;
  width: 100%;
  box-sizing: border-box;
}

.top-scroll-banner {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.84rem;
  padding: 8px 12px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  width: 100%;
}
.scroll-content { display: inline-block; animation: scrollMarquee 30s linear infinite; }
.scroll-content span { margin-right: 2.5rem; display: inline-block; }
.scroll-content span i { color: var(--accent); margin-right: 6px; font-style: normal; }
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Hero 卡片手机端紧凑设计 */
.hero-card {
  background: linear-gradient(145deg, #0d2f38 0%, #071920 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  margin-bottom: 22px;
  width: 100%;
}
.hero-tag {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.hero-h1 { margin: 0 0 10px; line-height: 1.25; }
.heading-keyword {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.heading-sub {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}
.hero-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* 旗舰极简双胶囊 APP 下载组件 (手机端原生触控) */
.sleek-download-cluster { margin: 16px 0 18px; width: 100%; }
.sleek-btn-group {
  display: flex;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}
.sleek-btn {
  flex: 1 1 calc(50% - 5px);
  min-height: 46px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0 10px;
  transition: transform 0.15s ease;
  white-space: nowrap;
}
.sleek-btn:active { transform: scale(0.97); }
.sleek-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.sleek-btn-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.sleek-btn-tag { display: none; } /* 手机端隐藏多余角标避免换行 */
.sleek-trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: #94a3b8;
}
.trust-icon { color: var(--accent); font-weight: 800; }

/* 手机端全量单列流布局 (彻底消除挤压与错位) */
.card-grid-2,
.rank-grid-2,
.news-split,
.security-badges,
.trouble-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
}

.feature-card, .rank-box, .news-card, .trouble-card, .sec-badge-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
}
.feature-card h3, .rank-box h3, .news-card h3 {
  font-size: 1.08rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 6px;
}
.feature-card p, .news-card p {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-body);
}

.rank-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.rank-table th, .rank-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rank-no { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; font-weight: 800; font-size: 0.75rem; }
.no-1 { background: #f59e0b; color: #000; }
.no-2 { background: #94a3b8; color: #000; }
.no-3 { background: #b45309; color: #fff; }
.no-other { background: rgba(255,255,255,0.08); color: var(--text-body); }

/* 实体表防爆屏包裹 */
.entity-table-wrap, .rank-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin: 14px 0;
  border-radius: 8px;
}
.entity-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.84rem; }
.entity-table th, .entity-table td { padding: 9px 12px; border: 1px solid rgba(255,255,255,0.08); }
.entity-table th { background: rgba(16,185,129,0.12); color: var(--accent); width: 28%; text-align: left; }
.entity-table td { background: rgba(0,0,0,0.25); }

/* 手机端吸底快捷条 */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(5, 19, 23, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 999;
}
.sticky-btn {
  background: var(--primary);
  color: #000;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.82rem;
}
.sticky-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }

/* --------------------------------------------------------------------------
   【PC 端优雅增强层】(当屏幕宽度 >= 901px 时生效)
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  .mobile-top-header { display: none !important; } /* PC 端隐藏手机吸顶条 */

  .app-wrapper {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: 100vh;
    border: none !important;
    box-shadow: none !important;
  }
  .main-view {
    max-width: 1200px;
    padding: 24px 36px 50px !important;
  }

  .sidebar-panel {
    display: flex !important;
    flex-direction: column;
    gap: 22px;
    background: var(--bg-side);
    border-right: 1px solid var(--border);
    padding: 28px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .side-nav { display: flex; flex-direction: column; gap: 8px; }
  .side-nav a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.92rem; font-weight: 600; color: #cbd5e1; border-left: 3px solid transparent; }
  .side-nav a:hover, .side-nav a.active { background: rgba(16,185,129,0.12); color: var(--accent); border-left-color: var(--primary); }
  .side-cd-card { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; }
  .side-cd-title { font-size: 0.85rem; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
  .countdown-timer { display: flex; justify-content: center; gap: 6px; }
  .timer-unit { background: #fff; color: #000; border-radius: 6px; padding: 6px 8px; min-width: 44px; text-align: center; }
  .timer-num { font-size: 1.2rem; font-weight: 900; line-height: 1; display: block; }
  .timer-label { font-size: 0.65rem; color: #555; display: block; }
  .side-pills { display: flex; flex-direction: column; gap: 8px; }
  .pill-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); padding: 6px 12px; border-radius: 6px; font-size: 0.82rem; border: 1px solid var(--border); }
  .pill-badge { width: 20px; height: 20px; border-radius: 4px; background: var(--primary); color: #000; font-weight: 800; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; }

  .main-view { padding: 24px 32px 50px !important; }
  .hero-card { padding: 32px !important; margin-bottom: 30px !important; }
  .heading-keyword { font-size: 2.2rem !important; }
  .heading-sub { font-size: 1.05rem !important; }
  .sleek-btn { flex: unset !important; padding: 0 24px !important; height: 48px !important; font-size: 0.95rem !important; }
  .sleek-btn-tag { display: inline-block !important; }

  .card-grid-2 { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .rank-grid-2 { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .security-badges { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  .trouble-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
}
