/* ============================================================
 * GoodsMall 商品商城主题 · 紫调高档风格
 * 专为商品/APP截图展示设计：大缩略图 · 2列卡片 · 渐变分组标题
 * ============================================================ */

/* ---------- 0. CSS 变量（紫调配色） ---------- */
:root {
    --gm-primary: #7c3aed;       /* 主色：紫 */
    --gm-primary-2: #6366f1;     /* 次色：靛蓝 */
    --gm-primary-3: #ec4899;     /* 强调：粉紫 */
    --gm-gradient: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #8b5cf6 100%);
    --gm-gradient-soft: linear-gradient(135deg, rgba(124,58,237,.15), rgba(99,102,241,.12));
    --gm-gradient-glow: linear-gradient(135deg, rgba(124,58,237,.35), rgba(236,72,153,.25));
    --gm-bg: #f6f5fb;
    --gm-bg-2: #efeafb;
    --gm-card: #ffffff;
    --gm-text: #1e1b2e;
    --gm-text-2: #6b6786;
    --gm-text-3: #9b96b4;
    --gm-border: rgba(124, 58, 237, .08);
    --gm-shadow-1: 0 2px 8px rgba(124, 58, 237, .06);
    --gm-shadow-2: 0 8px 24px rgba(124, 58, 237, .10);
    --gm-shadow-3: 0 16px 40px rgba(124, 58, 237, .16);
    --gm-radius-sm: 10px;
    --gm-radius-md: 16px;
    --gm-radius-lg: 22px;
}

/* ---------- 1. 全局重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    color: var(--gm-text);
    background: var(--gm-bg);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-width: 320px;
    /* iPhone 安全区：刘海屏不遮挡左侧内容 + Home 横条不遮挡底部 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }
img { max-width: 100%; display: block; }
input, button { outline: none; border: none; font-family: inherit; }

/* 背景装饰：柔和的径向渐变光晕 */
body::before {
    content: "";
    position: fixed; inset: 0;
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(124,58,237,.12), transparent 60%),
        radial-gradient(700px 400px at 100% 10%, rgba(99,102,241,.10), transparent 60%),
        radial-gradient(600px 500px at 50% 110%, rgba(236,72,153,.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}
body > * { position: relative; z-index: 1; }

.gm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 2. preset 风格预设 ---------- */
/* 💜 紫金高档（默认） */
body.preset-purple { background: var(--gm-bg); color: var(--gm-text); }

/* 🌙 深邃紫夜 */
body.preset-dark {
    --gm-bg: #0f0b1e;
    --gm-bg-2: #181331;
    --gm-card: #1e1a35;
    --gm-text: #f1eefc;
    --gm-text-2: #b3adc9;
    --gm-text-3: #7e799a;
    --gm-border: rgba(167, 139, 250, .12);
    --gm-shadow-1: 0 2px 8px rgba(0,0,0,.4);
    --gm-shadow-2: 0 8px 24px rgba(0,0,0,.55);
    --gm-shadow-3: 0 16px 40px rgba(124,58,237,.18);
    background: #0f0b1e;
    color: var(--gm-text);
}
body.preset-dark::before {
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(124,58,237,.22), transparent 60%),
        radial-gradient(700px 400px at 100% 10%, rgba(99,102,241,.18), transparent 60%),
        radial-gradient(600px 500px at 50% 110%, rgba(236,72,153,.12), transparent 60%);
}
body.preset-dark .gm-card { background: var(--gm-card); }
body.preset-dark .gm-sidebar,
body.preset-dark .gm-hero-left,
body.preset-dark .gm-hero-right { background: var(--gm-card); }

/* ---------- 3. 顶部导航 ---------- */
.gm-header {
    background: rgba(255,255,255,.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--gm-border);
    position: sticky; top: 0; z-index: 99;
}
body.preset-dark .gm-header { background: rgba(24,19,49,.72); }

.gm-header-inner {
    height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.gm-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 17px;
    background: var(--gm-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gm-logo img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.gm-nav { display: flex; gap: 4px; }
.gm-nav-item {
    padding: 8px 16px; border-radius: 999px;
    font-size: 14px; color: var(--gm-text-2);
    transition: all .25s ease;
}
.gm-nav-item:hover, .gm-nav-item.active {
    background: var(--gm-gradient-soft);
    color: var(--gm-primary);
}

/* ---------- 4. Hero 搜索区 ---------- */
.gm-main { padding-top: 28px; padding-bottom: 40px; min-height: calc(100vh - 64px); }
.gm-hero {
    background: var(--gm-card);
    border-radius: var(--gm-radius-lg);
    padding: 32px;
    box-shadow: var(--gm-shadow-2);
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 28px;
    border: 1px solid var(--gm-border);
    position: relative;
    overflow: hidden;
}
.gm-hero::after {
    content: "";
    position: absolute; right: -60px; top: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: var(--gm-gradient-glow);
    filter: blur(60px); opacity: .55;
    pointer-events: none;
}
.gm-hero-left, .gm-hero-right { position: relative; z-index: 2; }

.gm-sitename {
    font-size: 26px; font-weight: 800;
    background: var(--gm-gradient);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    margin-bottom: 6px;
    letter-spacing: .5px;
}
.gm-sitedesc { display: none !important; }

.gm-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--gm-bg);
    border-radius: 999px;
    padding: 10px 18px;
    border: 2px solid transparent;
    transition: all .3s ease;
    box-shadow: inset 0 0 0 1px var(--gm-border);
}
.gm-search:focus-within {
    border-color: var(--gm-primary);
    background: #fff;
    box-shadow: 0 0 0 6px rgba(124,58,237,.10), var(--gm-shadow-1);
}
body.preset-dark .gm-search { background: #120d27; }
body.preset-dark .gm-search:focus-within { background: #151030; }
.gm-search i { color: var(--gm-primary); font-size: 17px; flex-shrink: 0; }
.gm-search input {
    flex: 1; background: transparent; color: var(--gm-text);
    font-size: 14px;
}
.gm-search input::placeholder { color: var(--gm-text-3); }

/* 右侧时间 */
.gm-hero-right {
    background: var(--gm-gradient);
    color: #fff;
    border-radius: var(--gm-radius-md);
    padding: 22px 24px;
    display: flex; flex-direction: column; justify-content: center;
    box-shadow: var(--gm-shadow-2);
}
.gm-time-time {
    font-size: 34px; font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.gm-time-date { font-size: 13px; opacity: .92; margin-bottom: 4px; }
.gm-time-week { font-size: 13px; opacity: .86; margin-top: 4px; }

/* ---------- 5. 内容布局：单栏（侧边栏已删除 → 常用入口卡片+分类Tab移到上方横排，下面直接放商品） ---------- */
.gm-body { display: block; }
.gm-sidebar { display: none !important; }

/* ---------- 5.1 常用入口卡片（一行4个，卡片状） ---------- */
.gm-entry-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 22px 0 8px;
}
.gm-entry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--gm-card);
    border: 1px solid var(--gm-border);
    border-radius: 18px;
    padding: 24px 18px 20px;
    box-shadow: var(--gm-shadow-1);
    color: var(--gm-text);
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4,.14,.3,1);
}
.gm-entry-card::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(124,58,237,.14), transparent 70%);
    pointer-events: none;
    transition: all .35s ease;
    opacity: .9;
}
.gm-entry-icon {
    width: 56px; height: 56px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(124,58,237,.22);
    transform: rotate(-6deg);
    transition: all .3s ease;
}
/* 4种循环渐变色（对应 bg-1 ~ bg-4，超过 4 个会循环） */
.gm-entry-icon.bg-1 { background: linear-gradient(135deg,#7c3aed,#ec4899); }
.gm-entry-icon.bg-2 { background: linear-gradient(135deg,#3b82f6,#06b6d4); }
.gm-entry-icon.bg-3 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.gm-entry-icon.bg-4 { background: linear-gradient(135deg,#10b981,#6366f1); }
.gm-entry-icon.bg-5 { background: linear-gradient(135deg,#7c3aed,#ec4899); }
.gm-entry-icon.bg-6 { background: linear-gradient(135deg,#3b82f6,#06b6d4); }
.gm-entry-icon.bg-7 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.gm-entry-icon.bg-8 { background: linear-gradient(135deg,#10b981,#6366f1); }
.gm-entry-title {
    font-size: 14.5px;
    font-weight: 700;
    text-align: center;
    color: var(--gm-text);
    letter-spacing: .3px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* 悬停：紫光光晕扩散 + 轻微抬升 + 图标回正+放大 + 标题渐变字 */
.gm-entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(124,58,237,.22), 0 0 0 1px rgba(124,58,237,.28);
    border-color: rgba(124,58,237,.35);
    z-index: 2;
}
.gm-entry-card:hover::before {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(236,72,153,.22), rgba(124,58,237,.2) 40%, transparent 75%);
    opacity: 1;
}
.gm-entry-card:hover .gm-entry-icon {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 12px 24px rgba(124,58,237,.32);
}
.gm-entry-card:hover .gm-entry-title {
    background: var(--gm-gradient);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

.gm-sidebar-title {
    font-size: 13px; font-weight: 700;
    color: var(--gm-primary);
    padding: 4px 14px 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 6px;
}
.gm-group-list { display: flex; flex-direction: column; gap: 2px; }
.gm-group-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--gm-text-2);
    font-size: 14px;
    transition: all .22s ease;
    position: relative;
}
.gm-group-link:hover {
    background: var(--gm-gradient-soft);
    color: var(--gm-primary);
    transform: translateX(2px);
}
.gm-group-item.active .gm-group-link {
    background: var(--gm-gradient);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(124,58,237,.28);
}
.gm-group-icon {
    font-size: 15px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 8px;
    background: rgba(124,58,237,.08); color: var(--gm-primary);
}
.gm-group-item.active .gm-group-icon {
    background: rgba(255,255,255,.22); color: #fff;
}
.gm-group-icon img {
    width: 26px; height: 26px; object-fit: contain; border-radius: 6px;
}
.gm-group-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-group-empty { padding: 18px; text-align: center; color: var(--gm-text-3); font-size: 13px; }

/* ----- 主内容 ----- */
.gm-content { min-width: 0; position: relative; }
.gm-content-full {
    margin-top: 24px;
    padding: 24px;
    background: var(--gm-card);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius-lg);
    box-shadow: var(--gm-shadow-1);
}

/* ---------- 5.2 采集类别横排 Tab（商品展示上方，横向排列） ---------- */
.gm-cat-tabs {
    display: flex;
    flex-wrap: nowrap;              /* 不折行，手机端横向滑选 */
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--gm-bg-2);
    border-radius: 16px;
    border: 1px solid var(--gm-border);
    overflow-x: auto;               /* 分类多时横向滚动 */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 24px;
    position: relative;
}
.gm-cat-tabs::-webkit-scrollbar { display: none; }
.gm-cat-tab {
    flex-shrink: 0;                 /* 不被压缩，保证横向滚动 */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: #fff;
    border: 1px solid var(--gm-border);
    border-radius: 12px;
    color: var(--gm-text-2);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(124,58,237,.05);
    transition: all .25s ease;
    line-height: 1.2;
}
.gm-cat-tab:hover {
    border-color: rgba(124,58,237,.45);
    color: var(--gm-primary);
    transform: translateY(-1px);
}
.gm-cat-tab.active {
    background: var(--gm-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(124,58,237,.32);
}
.gm-cat-tab-icon {
    font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
}
.gm-cat-tab-icon img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; }
.gm-cat-tab-name { letter-spacing: .2px; }
.gm-cat-tabs-empty {
    padding: 16px; text-align: center; color: var(--gm-text-3);
    font-size: 13px; width: 100%;
}

/* ---------- 空状态（首页默认显示：请选择左侧采集类别） ---------- */
.gm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 120px 24px;
    border-radius: var(--gm-radius-lg);
    background:
        radial-gradient(circle at top left, rgba(124,58,237,.14), transparent 60%),
        radial-gradient(circle at bottom right, rgba(59,130,246,.12), transparent 55%),
        var(--gm-card);
    border: 1px dashed rgba(124,58,237,.22);
    min-height: 360px;
    text-align: center;
    user-select: none;
}
.gm-empty-icon {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--gm-gradient);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px;
    box-shadow: 0 12px 28px rgba(124,58,237,.28);
    animation: gmPoint 2.4s ease-in-out infinite;
}
@keyframes gmPoint {
    0%,100% { transform: translate(0,0) rotate(-6deg); }
    50%     { transform: translate(-6px,-6px) rotate(4deg); }
}
.gm-empty-title {
    font-size: 22px; font-weight: 700;
    color: var(--gm-text);
    letter-spacing: .5px;
}
.gm-empty-desc {
    font-size: 14px;
    color: var(--gm-text-2);
    max-width: 420px;
    line-height: 1.7;
}

/* ---------- 6. 分组标题样式（3选1） ---------- */
/* ★ 默认隐藏所有分组（Tab切换模型），仅 .active 的分组可见 */
.gm-site-group { display: none; margin-bottom: 32px; scroll-margin-top: 90px; }
.gm-site-group.active { display: block; animation: gmFadeIn .35s ease both; }
@keyframes gmFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
.gm-group-title {
    font-size: 19px; font-weight: 700;
    margin: 0 0 16px;
    display: flex; align-items: center; gap: 10px;
    position: relative;
    color: var(--gm-text);
}
.gm-gicon {
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff;
}
.gm-sitename-text { letter-spacing: .3px; }
.gm-sitedesc-text {
    font-size: 12px; font-weight: 400;
    color: var(--gm-text-3);
    margin-left: auto;
}

/* 🎨 渐变胶囊（高档） */
body.group-gradient .gm-title-gradient {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 20px 10px 10px;
    border-radius: 999px;
    background: var(--gm-gradient);
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(124,58,237,.22);
    width: auto;
    margin-left: 4px;
}
body.group-gradient .gm-title-gradient .gm-sitedesc-text { color: rgba(255,255,255,.85); }
body.group-gradient .gm-title-gradient .gm-gicon {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(4px);
}

/* 🌈 左侧渐变竖条 */
body.group-accent .gm-title-accent {
    padding-left: 18px;
    line-height: 1.2;
}
body.group-accent .gm-title-accent::before {
    content: "";
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 100%;
    min-height: 28px;
    border-radius: 4px;
    background: var(--gm-gradient);
    box-shadow: 0 0 0 3px rgba(124,58,237,.08);
}
body.group-accent .gm-title-accent .gm-gicon {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--gm-gradient);
}

/* 📏 简约渐变下划线 */
body.group-line .gm-title-line {
    padding-bottom: 10px;
    margin-bottom: 22px;
}
body.group-line .gm-title-line .gm-gicon {
    width: 30px; height: 30px; border-radius: 9px;
    background: var(--gm-gradient);
}
body.group-line .gm-title-underline {
    position: absolute; left: 0; bottom: 0;
    height: 3px; width: 80px;
    border-radius: 3px;
    background: var(--gm-gradient);
    box-shadow: 0 0 16px rgba(124,58,237,.45);
}

/* ---------- 7. 商品卡片列表 & 卡片布局 ---------- */
.site-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* ★ 一行3个卡片 */
    gap: 16px;
    padding: 0;
    margin: 0;
}
.gm-card {
    background: var(--gm-card);
    border-radius: var(--gm-radius-md);
    border: 1px solid var(--gm-border);
    box-shadow: var(--gm-shadow-1);
    transition: all .32s cubic-bezier(.4,.14,.3,1);
    position: relative;
    overflow: hidden;
}
.gm-card-a {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 16px;
    gap: 14px;
    color: inherit;
}

/* 🖼️ 左侧缩略图（左图右文） */
body.card-thumb .gm-card-thumb .gm-card-a {
    flex-direction: row;
    align-items: flex-start;
}
body.card-thumb .gm-card-thumbwrap {
    flex-shrink: 0;
    width: 88px; height: 88px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gm-bg-2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px var(--gm-border);
}
body.card-thumb .gm-card-thumbwrap img,
body.card-thumb .gm-card-thumbwrap svg {
    width: 100%; height: 100%; object-fit: cover;
}
body.card-thumb .gm-card-thumbwrap i {
    font-size: 34px;
    color: var(--gm-primary);
    opacity: .8;
}
body.card-thumb .gm-card-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    gap: 6px;
}
body.card-thumb .gm-card-name {
    font-size: 15px; font-weight: 700;
    color: var(--gm-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.card-thumb .gm-card-desc {
    font-size: 12.5px;
    color: var(--gm-text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* 📸 顶部大图 Banner 卡片 */
body.card-banner .gm-card-banner .gm-card-a {
    flex-direction: column;
    padding: 0;
    gap: 0;
}
body.card-banner .gm-card-imgwrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gm-bg-2);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
body.card-banner .gm-card-imgwrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .45s ease;
}
body.card-banner .gm-card-imgwrap i {
    font-size: 48px; color: var(--gm-primary); opacity: .7;
}
body.card-banner .gm-card-body {
    padding: 16px 18px 18px;
    display: flex; flex-direction: column; gap: 8px;
}
body.card-banner .gm-card-name {
    font-size: 15.5px; font-weight: 700;
    color: var(--gm-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.card-banner .gm-card-desc {
    font-size: 12.5px;
    color: var(--gm-text-2);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片角标：渐变光泽 */
.gm-card::before {
    content: "";
    position: absolute; top: 0; right: 0;
    width: 90px; height: 90px;
    background: radial-gradient(circle at 100% 0%, rgba(124,58,237,.16), transparent 70%);
    pointer-events: none;
    opacity: .9;
    transition: opacity .3s ease;
}

/* ---------- 8. 悬停动效（3选1） ---------- */
/* ✨ 紫光光晕 + 抬升（默认推荐） */
body.hover-glow .gm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(124,58,237,.18), 0 0 0 1px rgba(124,58,237,.25);
    border-color: rgba(124,58,237,.28);
}
body.hover-glow .gm-card:hover::before {
    width: 160px; height: 160px;
    background: radial-gradient(circle at 100% 0%, rgba(236,72,153,.22), rgba(124,58,237,.16) 40%, transparent 75%);
}
body.hover-glow .gm-card:hover .gm-card-name {
    background: var(--gm-gradient);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

/* ⬆️ 轻微抬升 */
body.hover-lift .gm-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gm-shadow-3);
    border-color: rgba(124,58,237,.18);
}

/* 🔍 图片放大（适合 Banner） */
body.hover-zoom .gm-card:hover { box-shadow: var(--gm-shadow-3); border-color: rgba(124,58,237,.18); }
body.hover-zoom .gm-card:hover .gm-card-imgwrap img,
body.hover-zoom .gm-card:hover .gm-card-thumbwrap img { transform: scale(1.08); }

/* ---------- 7.5 极简卡片：上图下文（1行3列主布局） ---------- */
.gm-simple-card {
    background: var(--gm-card);
    border-radius: var(--gm-radius-md);
    border: 1px solid var(--gm-border);
    box-shadow: var(--gm-shadow-1);
    transition: all .32s cubic-bezier(.4,.14,.3,1);
    position: relative;
    overflow: hidden;
}
.gm-simple-card::before {
    /* 右上角紫光光晕角标 */
    content: "";
    position: absolute; top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at 100% 0%, rgba(124,58,237,.16), transparent 70%);
    pointer-events: none;
    opacity: .9;
    transition: all .3s ease;
}
.gm-simple-a {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 12px;
    gap: 10px;
    color: inherit;
}
.gm-simple-img {
    width: 100%;
    aspect-ratio: 1 / 1;         /* 正方形图：商品图更完整 */
    border-radius: 14px;
    overflow: hidden;
    background: var(--gm-bg-2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px var(--gm-border);
    flex-shrink: 0;
}
.gm-simple-img img,
.gm-simple-img svg {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.gm-simple-img i {
    font-size: 42px;
    color: var(--gm-primary);
    opacity: .75;
}
.gm-simple-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gm-text);
    text-align: center;
    line-height: 1.35;
    padding: 2px 4px 4px;
    /* 1 行省略号（一行3个的卡片，名称太长会换行难看，所以1行） */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* 悬停：紫光光晕 + 轻微抬升 + 图片放大 + 名称紫渐变字（和主题整体紫调统一） */
.gm-simple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px rgba(124,58,237,.2), 0 0 0 1px rgba(124,58,237,.25);
    border-color: rgba(124,58,237,.3);
}
.gm-simple-card:hover::before {
    width: 160px; height: 160px;
    background: radial-gradient(circle at 100% 0%, rgba(236,72,153,.22), rgba(124,58,237,.18) 40%, transparent 75%);
}
.gm-simple-card:hover .gm-simple-img img { transform: scale(1.08); }
.gm-simple-card:hover .gm-simple-name {
    background: var(--gm-gradient);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

/* ---------- 9. Footer ---------- */
.gm-footer {
    margin-top: 40px;
    padding: 24px 0 10px;
    text-align: center;
    color: var(--gm-text-3);
    font-size: 13px;
    border-top: 1px solid var(--gm-border);
}

/* ---------- 10. 错误提示 ---------- */
.gm-tip-error {
    padding: 24px; border-radius: var(--gm-radius-md);
    background: #fee2e2; color: #991b1b;
    font-size: 14px; text-align: center;
}

/* ---------- 11. 响应式：平板（≤1100px） ---------- */
@media only screen and (max-width: 1100px) {
    .gm-hero { grid-template-columns: 1fr 280px; padding: 26px; }
    .gm-time-time { font-size: 28px; }
    .gm-sitename { font-size: 22px; }
    body.card-thumb .gm-card-thumbwrap { width: 76px; height: 76px; }
    .gm-entry-cards { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .gm-content-full { padding: 20px; }
}

/* ---------- 12. 响应式：手机（≤860px，覆盖 iPad mini + 所有大屏手机） ---------- */
@media only screen and (max-width: 860px) {
    .gm-container { padding: 0 14px; }
    .gm-header { height: auto; } /* 手机端不再固定高，避免折行被挤压 */
    .gm-header-inner {
        height: auto;
        min-height: 56px;
        padding: 10px 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .gm-hero {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }
    .gm-hero::after { right: -40px; top: -40px; width: 180px; height: 180px; }
    .gm-sitename { font-size: 20px; }
    .gm-sitedesc { display: none !important; }
    .gm-search { padding: 9px 16px; }
    .gm-hero-right {
        padding: 16px 18px;
        border-radius: 14px;
    }
    .gm-time-time { font-size: 24px; }

    /* 顶部导航：手机端隐藏多余文字，只留图标更省空间 */
    .gm-nav { gap: 2px; }
    .gm-nav-item { padding: 7px 12px; font-size: 13px; }
    .gm-nav-item i { margin-right: 2px; }

    /* 常用入口卡片：手机端 1 行 2 个（≤640 再缩成 2 个更紧凑） */
    .gm-entry-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 18px 0 4px;
    }
    .gm-entry-card { padding: 18px 12px 16px; gap: 10px; border-radius: 16px; }
    .gm-entry-icon { width: 48px; height: 48px; font-size: 20px; border-radius: 16px; }
    .gm-entry-title { font-size: 13.5px; }

    /* 采集类别横排 Tab：手机端保持横向滚动 + 左右渐变遮罩提示用户可滑动 */
    .gm-content-full { margin-top: 18px; padding: 16px 12px; }
    .gm-cat-tabs {
        gap: 8px;
        padding: 6px;
        margin-bottom: 18px;
        border-radius: 14px;
        position: relative;
        /* 左右两侧渐变遮罩 → 暗示用户可以左右滑动 */
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    }
    .gm-cat-tab {
        padding: 9px 14px;
        font-size: 13px;
        border-radius: 10px;
        gap: 6px;
    }
    .gm-cat-tab-icon { width: 20px; height: 20px; font-size: 14px; }
    .gm-cat-tab-icon img { width: 20px; height: 20px; }

    /* 商品卡片：手机端 1 行 2 个（大屏手机）；≤640 改为 1 列（核心优化，图更大看得清） */
    .site-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .gm-simple-a { padding: 10px; gap: 8px; }
    .gm-simple-img { border-radius: 12px; aspect-ratio: 1 / 1; }
    .gm-simple-img i { font-size: 32px; }
    .gm-simple-name { font-size: 13px; padding: 0 2px 2px; }
    .gm-card-a { padding: 12px; gap: 10px; }
    body.card-thumb .gm-card-thumbwrap { width: 60px; height: 60px; border-radius: 11px; }
    body.card-thumb .gm-card-thumbwrap i { font-size: 24px; }
    body.card-thumb .gm-card-name { font-size: 13px; }
    body.card-thumb .gm-card-desc { font-size: 11.5px; line-height: 1.45; -webkit-line-clamp: 3; }
    body.card-banner .gm-card-body { padding: 12px 14px 14px; gap: 5px; }
    body.card-banner .gm-card-name { font-size: 13.5px; }
    body.card-banner .gm-card-desc { font-size: 11.5px; }

    /* 分组标题：手机端缩小 */
    .gm-site-group { margin-bottom: 24px; }
    .gm-group-title { font-size: 16px; margin-bottom: 12px; }
    body.group-gradient .gm-title-gradient {
        padding: 8px 16px 8px 8px;
    }
    body.group-gradient .gm-title-gradient .gm-gicon {
        width: 28px; height: 28px;
    }
    body.group-line .gm-title-underline { width: 60px; height: 2.5px; }

    /* 空状态：手机端更小 */
    .gm-empty-state { padding: 70px 16px; min-height: 260px; }
    .gm-empty-icon { width: 72px; height: 72px; font-size: 28px; }
    .gm-empty-title { font-size: 18px; }
    .gm-empty-desc { font-size: 13px; max-width: 320px; }

    /* Footer：手机端留足 Home 条安全区 */
    .gm-footer { margin-top: 28px; padding: 20px 12px calc(16px + env(safe-area-inset-bottom)); line-height: 1.85; }
    .gm-footer a { word-break: break-all; }
}

/* ---------- 13. 主流手机（≤640px，覆盖 iPhone 全系列 + 安卓旗舰 360/393/412/430px）：核心优化 1 列大卡 ---------- */
@media only screen and (max-width: 640px) {
    .gm-container { padding: 0 12px; }
    .gm-header-inner { min-height: 54px; padding: 8px 0; }
    .gm-logo { font-size: 15.5px; gap: 8px; }
    .gm-logo img { width: 28px; height: 28px; border-radius: 7px; }

    /* Hero：更紧凑，字号更合理 */
    .gm-hero { padding: 18px 16px; gap: 14px; border-radius: 18px; }
    .gm-sitename { font-size: 18px; letter-spacing: .2px; }
    .gm-search { padding: 8px 14px; gap: 8px; }
    .gm-search i { font-size: 15px; }
    .gm-search input { font-size: 13.5px; }
    .gm-hero-right { padding: 14px 16px; border-radius: 12px; }
    .gm-time-date { font-size: 12.5px; }
    .gm-time-time { font-size: 22px; letter-spacing: 1px; }
    .gm-time-week { font-size: 12.5px; }

    /* 常用入口：1 行 2 个不变，但整体再小一点更精致 */
    .gm-entry-cards { gap: 10px; margin: 16px 0 2px; }
    .gm-entry-card { padding: 16px 10px 14px; gap: 9px; border-radius: 14px; }
    .gm-entry-icon { width: 44px; height: 44px; font-size: 18px; border-radius: 14px; box-shadow: 0 6px 16px rgba(124,58,237,.22); }
    .gm-entry-title { font-size: 13px; line-height: 1.35; -webkit-line-clamp: 2; }

    /* 分类 Tab：更紧凑，左右渐变遮罩保留（暗示可滑） */
    .gm-content-full { margin-top: 16px; padding: 14px 10px; border-radius: 18px; }
    .gm-cat-tabs { gap: 7px; padding: 5px; margin-bottom: 16px; border-radius: 12px; }
    .gm-cat-tab {
        padding: 8px 13px;
        font-size: 12.5px;
        border-radius: 10px;
        gap: 5px;
    }
    .gm-cat-tab-icon { width: 18px; height: 18px; font-size: 13px; }
    .gm-cat-tab-icon img { width: 18px; height: 18px; }

    /* 🎯 最关键优化：主流手机端商品卡片改为 1 列，图占满屏宽 + 大图看得清，视觉立即不"差" */
    .site-list { grid-template-columns: 1fr; gap: 12px; }
    .gm-simple-a { padding: 12px; gap: 10px; }
    .gm-simple-img { border-radius: 14px; aspect-ratio: 4 / 3; /* 手机端横图比例，商品显示更大方 */ }
    .gm-simple-img i { font-size: 44px; }
    .gm-simple-name { font-size: 14px; padding: 2px 4px 4px; }
    .gm-card-a { padding: 14px; gap: 12px; }
    body.card-thumb .gm-card-thumbwrap { width: 84px; height: 84px; border-radius: 14px; }
    body.card-thumb .gm-card-thumbwrap i { font-size: 30px; }
    body.card-thumb .gm-card-name { font-size: 14.5px; }
    body.card-thumb .gm-card-desc { font-size: 12px; line-height: 1.5; -webkit-line-clamp: 3; }
    body.card-banner .gm-card-body { padding: 14px 16px 16px; gap: 6px; }
    body.card-banner .gm-card-name { font-size: 14.5px; }
    body.card-banner .gm-card-desc { font-size: 12px; }

    /* 分组标题：再小一档 */
    .gm-site-group { margin-bottom: 20px; }
    .gm-group-title { font-size: 15.5px; margin-bottom: 10px; gap: 8px; }
    body.group-gradient .gm-title-gradient { padding: 7px 14px 7px 7px; border-radius: 999px; }
    body.group-gradient .gm-title-gradient .gm-gicon { width: 26px; height: 26px; }
    body.group-accent .gm-title-accent { padding-left: 14px; }
    body.group-accent .gm-title-accent::before { width: 5px; min-height: 24px; border-radius: 3px; }
    body.group-line .gm-title-line { padding-bottom: 8px; margin-bottom: 16px; }
    body.group-line .gm-title-underline { width: 50px; height: 2.5px; }
    .gm-sitedesc-text { font-size: 11.5px; margin-top: 2px; }

    /* 空状态：再小一圈更贴合手机 */
    .gm-empty-state { padding: 60px 14px; min-height: 240px; }
    .gm-empty-icon { width: 66px; height: 66px; font-size: 26px; }
    .gm-empty-title { font-size: 17px; }
    .gm-empty-desc { font-size: 12.5px; max-width: 300px; }
}

/* ---------- 14. 超小屏（≤400px，iPhone SE/3GS 级别 320px）：极限省空间 ---------- */
@media only screen and (max-width: 400px) {
    .gm-container { padding: 0 10px; }
    .gm-hero { padding: 16px 14px; }
    .gm-sitename { font-size: 17px; }
    .gm-time-time { font-size: 20px; }
    .gm-entry-card { padding: 14px 8px 12px; gap: 8px; border-radius: 12px; }
    .gm-entry-icon { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
    .gm-entry-title { font-size: 12.5px; }
    .gm-simple-name { font-size: 13.5px; }
    body.card-thumb .gm-card-thumbwrap { width: 72px; height: 72px; }
    .gm-group-title { font-size: 14.5px; }
}
