/* iWoobly mobile shell — 红果式排版，自有深色+琥珀强调 */
:root {
  --hg-bg: #0e0e12;
  --hg-card: #1a1a22;
  --hg-card2: #22222c;
  --hg-text: #f2f2f5;
  --hg-muted: #9a9aa8;
  --hg-accent: #f5a623;
  --hg-accent2: #e85d04;
  --hg-tab-h: 56px;
  --hg-safe-b: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 1199.98px) {
  body {
    background: var(--hg-bg) !important;
    color: var(--hg-text);
    padding-bottom: calc(var(--hg-tab-h) + var(--hg-safe-b) + 8px) !important;
  }
  /* 顶栏精简 */
  .horizontal-nav, header .navbar-expand-xl .navbar-nav.d-none { }
  .m-bottom-nav { display: none !important; }

  /* 底部三栏 */
  .hg-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1040;
    height: calc(var(--hg-tab-h) + var(--hg-safe-b));
    padding-bottom: var(--hg-safe-b);
    display: flex;
    background: rgba(18,18,24,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .hg-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--hg-muted);
    text-decoration: none;
    font-size: 11px;
  }
  .hg-tabbar__item i { font-size: 22px; line-height: 1; }
  .hg-tabbar__item.is-active { color: var(--hg-accent); font-weight: 600; }

  /* 抽屉 */
  .hg-drawer-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1055;
  }
  .hg-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(82vw, 320px);
    z-index: 1060;
    background: linear-gradient(180deg, #1a1520 0%, #121018 40%);
    padding: 16px 14px 24px;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0,0,0,.45);
  }
  .hg-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
  .hg-drawer__user { display: flex; gap: 12px; align-items: center; }
  .hg-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hg-accent), var(--hg-accent2));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #111;
  }
  .hg-drawer__name { font-weight: 600; font-size: 15px; }
  .hg-drawer__edit { font-size: 12px; color: var(--hg-muted); }
  .hg-drawer__close {
    border: 0; background: transparent; color: #fff; font-size: 28px; line-height: 1; padding: 0 4px;
  }
  .hg-drawer__list { list-style: none; padding: 0; margin: 0; }
  .hg-drawer__list li a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 8px; color: var(--hg-text); text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.04); font-size: 15px;
  }
  .hg-drawer__list li a i { font-size: 20px; opacity: .9; }
  .hg-drawer__foot { margin-top: 24px; text-align: center; }
  .hg-drawer__foot a { color: #6ea8fe; font-size: 13px; }

  /* 我的页卡片 */
  .hg-me-hero {
    padding: 20px 16px 8px;
    background: radial-gradient(ellipse at 30% 0%, rgba(245,166,35,.18), transparent 55%);
  }
  .hg-me-tabs {
    display: flex; gap: 18px; padding: 8px 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow-x: auto;
  }
  .hg-me-tabs a {
    color: var(--hg-muted); text-decoration: none; padding: 10px 2px;
    font-size: 15px; white-space: nowrap;
  }
  .hg-me-tabs a.is-active {
    color: var(--hg-text); font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--hg-accent);
  }
  .hg-stat-card {
    background: var(--hg-card);
    border-radius: 14px;
    padding: 16px;
    margin: 12px 16px;
  }
  .hg-stat-row { display: flex; text-align: center; }
  .hg-stat-row > div { flex: 1; }
  .hg-stat-row .n { font-size: 20px; font-weight: 700; }
  .hg-stat-row .l { font-size: 12px; color: var(--hg-muted); margin-top: 4px; }

  /* 登录按钮强调 */
  .hg-login-pill {
    background: linear-gradient(90deg, var(--hg-accent), var(--hg-accent2));
    color: #111 !important; border: 0; font-weight: 700;
    border-radius: 999px; padding: 8px 16px;
  }
}
@media (min-width: 1200px) {
  .hg-tabbar, .hg-drawer, .hg-drawer-backdrop { display: none !important; }
  /* 电脑版顶栏更干净 */
  .streamit-desktop-nav .nav-link {
    font-weight: 500;
    letter-spacing: .02em;
  }
  .streamit-desktop-nav .nav-link.active,
  .streamit-desktop-nav .nav-link:hover {
    color: #f5a623 !important;
  }
}


/* ===== 红果式首页竖滑 ===== */
@media (max-width: 1199.98px) {
  .hg-home { min-height: calc(100vh - 56px); }
  .hg-home-top {
    position: sticky; top: 0; z-index: 20;
    display: flex; gap: 16px; align-items: center;
    padding: 10px 14px; background: rgba(10,10,14,.72);
    backdrop-filter: blur(10px);
  }
  .hg-home-top a { color: #9a9aa8; text-decoration: none; font-size: 15px; }
  .hg-home-top a.is-on { color: #fff; font-weight: 700; border-bottom: 2px solid #f5a623; padding-bottom: 2px; }
  .hg-feed-card {
    position: relative; height: calc(100vh - 120px);
    margin: 0 0 8px; background: #111; overflow: hidden;
  }
  .hg-feed-media { display:block; height:100%; position:relative; color:inherit; }
  .hg-feed-media img, .hg-feed-ph {
    width: 100%; height: 100%; object-fit: cover; background: #222;
  }
  .hg-feed-grad {
    position:absolute; left:0; right:0; bottom:0; height:45%;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
  }
  .hg-feed-meta { position:absolute; left:14px; right:72px; bottom:72px; }
  .hg-feed-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
  .hg-feed-cta {
    display:inline-flex; align-items:center; gap:6px;
    background: rgba(255,255,255,.12); border-radius: 999px;
    padding: 8px 14px; font-size: 13px;
  }
  .hg-feed-side {
    position:absolute; right:10px; bottom:120px;
    display:flex; flex-direction:column; gap:18px; align-items:center;
  }
  .hg-side-btn {
    background:transparent; border:0; color:#fff;
    display:flex; flex-direction:column; align-items:center; gap:4px;
    font-size: 11px;
  }
  .hg-side-btn i { font-size: 28px; }

  .hg-search {
    display:flex; align-items:center; gap:8px;
    background:#1c1c24; border-radius:999px; padding:10px 14px;
  }
  .hg-search input {
    flex:1; background:transparent; border:0; color:#fff; outline:none; font-size:14px;
  }
  .hg-theater-tabs { display:flex; gap:16px; padding:12px 0 8px; overflow-x:auto; }
  .hg-theater-tabs a { color:#9a9aa8; text-decoration:none; white-space:nowrap; font-size:15px; }
  .hg-theater-tabs a.is-on { color:#fff; font-weight:700; }
  .hg-theater-actions { display:flex; gap:10px; padding-bottom:10px; }
  .hg-theater-actions a {
    flex:1; text-align:center; text-decoration:none; color:#eee;
    background:#1c1c24; border-radius:999px; padding:10px 8px; font-size:13px;
  }

  .hg-profile { padding: 12px 16px 0; }
  .hg-profile-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
  .hg-avatar-lg {
    width:56px; height:56px; border-radius:50%;
    background: linear-gradient(135deg,#f5a623,#e85d04);
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:22px; color:#111;
  }
  .hg-profile-actions {
    display:flex; justify-content:space-around; margin: 8px 0 16px;
  }
  .hg-profile-actions a {
    color:#eee; text-decoration:none; text-align:center; font-size:12px;
    display:flex; flex-direction:column; gap:6px; align-items:center;
  }
  .hg-profile-actions a i { font-size:22px; }
}


/* 红果式：手机隐藏顶栏 Logo/菜单，只留内容+底栏 */
@media (max-width: 1199.98px) {
  header.header, .iq-navbar, .landing-header, .sd-header-start,
  .horizontal-nav, .navbar-inner .logo, .m-top-auth {
    /* keep minimal: hide bulky desktop header */
  }
  body.hg-app-mode header .landing-header {
    display: none !important;
  }
  /* Hide default streamit header brand row on mobile home/theater/me */
  .iq-navbar .navbar-inner {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .iq-navbar .sd-header-start,
  .iq-navbar .horizontal-nav,
  .iq-navbar .right-panel .navbar-toggler,
  .iq-navbar .dropdown-download-scanner,
  .iq-navbar .dropdown-menu-language {
    display: none !important;
  }
  /* Keep only a thin bar if needed — offcanvas menu via bottom 我的 */
  .iq-navbar {
    display: none !important;
  }
  body {
    padding-top: 0 !important;
  }
}


/* 红果式顶栏 Tab 字体+下划线点 */
.hg-home-top .hg-top-tab {
  position: relative;
  color: #9a9aa8 !important;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  padding: 6px 2px 10px;
}
.hg-home-top .hg-top-tab.is-on {
  color: #fff !important;
  font-weight: 700;
  font-size: 17px;
}
.hg-home-top .hg-top-tab.is-on::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
}

/* 历史网格 */
.hg-history-filters {
  display: flex; gap: 8px; padding: 12px 0; flex-wrap: wrap;
}
.hg-history-filters button {
  border: 0; background: #1c1c24; color: #ccc;
  border-radius: 999px; padding: 6px 14px; font-size: 13px;
}
.hg-history-filters button.is-on { background: #f5a623; color: #111; font-weight: 600; }
.hg-history-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 24px;
}
.hg-hist-card { color: #eee; text-decoration: none; }
.hg-hist-card img, .hg-hist-ph {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; background: #222; display:block;
}
.hg-hist-title { font-size: 12px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-hist-sub { font-size: 11px; color: #888; }

/* 设置面板 */
.hg-settings-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1080;
}
.hg-settings-sheet {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(86vw, 340px);
  background: #16161e; z-index: 1081; padding: 16px 12px 24px;
  overflow-y: auto; box-shadow: -8px 0 24px rgba(0,0,0,.4);
}
.hg-settings-sheet__head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.hg-settings-list { list-style: none; padding: 0; margin: 0; }
.hg-settings-list li a, .hg-settings-list li button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 8px; border: 0; border-bottom: 1px solid rgba(255,255,255,.06);
  background: transparent; color: #f0f0f0; text-decoration: none; font-size: 15px; text-align: left;
}
.hg-settings-list li a i, .hg-settings-list li button i { font-size: 20px; opacity: .9; }
