/* ==========================================================================
   上海拔俗 AI (YBBE TECH) - 专属手机版移动端样式库 (Mobile Specialized CSS)
   特性：移动优先、触控优化、底部吸底浮窗、超轻量极速渲染
   ========================================================================== */

:root {
  --bg-dark: #080B10;
  --bg-dark-surface: #0E131C;
  --bg-dark-elevated: #151C28;
  --bg-dark-secondary: #1E2736;
  --bg-dark-border: rgba(255, 255, 255, 0.08);
  --primary: #00E599;
  --primary-hover: #26ebb0;
  --accent-cyan: #00D2D3;
  --accent-amber: #F59E0B;
  --text-primary: #F0F3F6;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 74px; /* Space for bottom floating bar */
  -webkit-font-smoothing: antialiased;
}

.m-container {
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

/* Mobile Header */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 16, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-dark-border);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.m-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.m-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-logo-badge {
  background: rgba(0, 229, 153, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 153, 0.4);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.m-nav-toggle {
  background: transparent;
  border: 1px solid var(--bg-dark-border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

/* Mobile Drawer Menu */
.m-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.m-drawer.active {
  opacity: 1;
  visibility: visible;
}

.m-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #0E131C;
  border-left: 1px solid var(--bg-dark-border);
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.m-drawer.active .m-drawer-content {
  transform: translateX(0);
}

.m-drawer-links {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.m-drawer-links a {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.m-drawer-links a:hover, .m-drawer-links a.active {
  background: rgba(0, 229, 153, 0.08);
  border-color: rgba(0, 229, 153, 0.3);
  color: var(--primary);
}

/* Mobile Hero */
.m-hero {
  padding: 32px 0 24px;
  text-align: center;
}

.m-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 153, 0.1);
  border: 1px solid rgba(0, 229, 153, 0.3);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.m-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.m-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.m-hero-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  width: 100%;
}

.m-btn-primary {
  background: var(--primary);
  color: #080B10;
  box-shadow: 0 4px 14px rgba(0, 229, 153, 0.3);
}

.m-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-dark-border);
  color: #FFFFFF;
}

/* Mobile Card */
.m-card {
  background: #0E131C;
  border: 1px solid var(--bg-dark-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  content-visibility: auto;
}

.m-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Mobile Horizontal Scroll Chip Bar */
.m-chips-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.m-chips-wrap::-webkit-scrollbar { display: none; }

.m-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #141B24;
  border: 1px solid var(--bg-dark-border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.m-chip.active {
  background: rgba(0, 229, 153, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* Mobile Bottom Floating Action Bar */
.m-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(14, 19, 28, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
  z-index: 900;
}

.m-bar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.m-bar-btn.highlight {
  color: var(--primary);
}

.m-bar-icon {
  font-size: 18px;
}

.m-bar-cta {
  flex: 1.4;
  background: linear-gradient(135deg, var(--primary) 0%, #00C880 100%);
  color: #080B10;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 229, 153, 0.35);
}

/* Mobile QR Code Modal */
.m-qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.m-qr-modal.active {
  display: flex;
}

.m-qr-box {
  background: #0E131C;
  border: 1px solid rgba(0, 229, 153, 0.4);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.m-news-reader-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.m-news-side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(14, 19, 28, 0.92);
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  z-index: 10001;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.m-news-side-nav-prev {
  left: 6px;
}

.m-news-side-nav-next {
  right: 6px;
}

.m-reader-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--bg-dark-border);
}

.m-reader-footer-brand p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.m-reader-footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px;
  margin-bottom: 16px;
}

.m-reader-footer-links a {
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.m-reader-footer-links a:hover {
  color: var(--primary);
}

.m-reader-footer-contact {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.m-reader-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.m-reader-footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.m-site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--bg-dark-border);
  text-align: center;
}

.m-site-footer-brand {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.m-site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.m-site-footer-links a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.m-site-footer-contact,
.m-site-footer-bottom {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.m-site-footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.m-case-modal {
  align-items: flex-end;
  padding: 0;
}

.m-case-box {
  background: #0E131C;
  border-top: 1px solid rgba(0, 229, 153, 0.35);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 28px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
}

.m-case-block {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.m-case-block strong {
  display: block;
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 12px;
}

.m-case-metrics {
  background: rgba(0, 229, 153, 0.08);
  border-left: 3px solid var(--primary);
}

.m-card[role="button"] {
  cursor: pointer;
}
