/* 分组独立页面 /?group=ID */
:root {
    --gp-primary: #4e6ef2;
    --gp-primary-light: #eef3ff;
    --gp-text: #243244;
    --gp-sub: #7d8ba1;
    --gp-line: #e9eff7;
    --gp-radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.gp-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f8fb;
    color: var(--gp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* 背景图 + 渐变遮罩 */
.gp-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.gp-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-bgmask {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(244, 248, 251, .72) 0%, rgba(244, 248, 251, .92) 42%, #f4f8fb 100%);
}

/* 顶部栏 */
.gp-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(233, 239, 247, .9);
}

.gp-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gp-back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #5d6b80;
    text-decoration: none;
    padding: 4px 10px 4px 4px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}

.gp-back:hover {
    background: #f1f5fb;
    color: var(--gp-primary);
    text-decoration: none;
}

.gp-back .mdi {
    font-size: 18px;
}

.gp-brand {
    font-size: 13px;
    color: var(--gp-sub);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50%;
}

.gp-brand:hover {
    color: var(--gp-primary);
    text-decoration: none;
}

/* 主体 */
.gp-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

/* 分组介绍卡 */
.gp-intro {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--gp-line);
    border-radius: 20px;
    padding: 26px 30px;
    box-shadow: 0 10px 30px rgba(35, 58, 94, .06);
}

.gp-intro-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gp-intro-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 16px;
    background: #f7faff;
    border: 1px solid var(--gp-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gp-intro-icon img,
.gp-intro-icon svg {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.gp-intro h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .5px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.gp-count {
    font-size: 13px;
    font-weight: 400;
    color: var(--gp-sub);
    background: #f2f6fc;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* 筛选框 */
.gp-filter {
    position: relative;
    max-width: 360px;
    margin-top: 20px;
}

.gp-filter input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--gp-line);
    border-radius: 12px;
    background: #fbfdff;
    color: var(--gp-text);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.gp-filter input::placeholder {
    color: #a9b6c9;
}

.gp-filter input:focus {
    background: #fff;
    border-color: #b9c9ff;
    box-shadow: 0 0 0 3px rgba(78, 110, 242, .08);
}

.gp-filter .mdi {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #a9b6c9;
    pointer-events: none;
}

/* 卡片网格 */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.gp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 104px;
    padding: 16px 18px 14px;
    background: #fff;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.gp-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4e6ef2, #7aa7ff);
    opacity: 0;
    transition: opacity .22s ease;
}

.gp-card:hover {
    transform: translateY(-4px);
    border-color: #dbe6ff;
    box-shadow: 0 14px 32px rgba(35, 58, 94, .1);
    text-decoration: none;
    color: inherit;
}

.gp-card:hover::before {
    opacity: 1;
}

.gp-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.gp-card-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    border: 1px solid #eef3f9;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gp-card-icon img,
.gp-card-icon svg {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.gp-card-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--gp-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-card-desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #8a94a6;
    min-height: 21px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 空状态与提示 */
.gp-empty,
.gp-notice {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--gp-line);
    border-radius: 20px;
    padding: 46px 24px;
    text-align: center;
    color: var(--gp-sub);
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(35, 58, 94, .05);
}

.gp-empty .mdi {
    font-size: 40px;
    color: #c3cfdf;
}

.gp-empty p {
    margin: 10px 0 0;
    font-size: 14px;
}

.gp-notice {
    margin-top: 40px;
    padding: 56px 24px;
}

.gp-notice-icon .mdi {
    font-size: 52px;
    color: #c3cfdf;
    line-height: 1;
}

.gp-notice h1 {
    margin: 16px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--gp-text);
}

.gp-notice p {
    margin: 10px auto 0;
    font-size: 14px;
    line-height: 1.8;
    max-width: 460px;
}

.gp-btn {
    display: inline-block;
    margin-top: 22px;
    padding: 9px 26px;
    border-radius: 10px;
    background: var(--gp-primary);
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
}

.gp-btn:hover {
    background: #4662d9;
    color: #fff;
    box-shadow: 0 8px 18px rgba(78, 110, 242, .28);
    text-decoration: none;
}

/* 页脚 */
.gp-footer {
    padding: 6px 20px 34px;
    text-align: center;
    font-size: 12px;
    color: #a9b6c9;
}

.gp-footer p {
    margin: 0;
}

.gp-footer a {
    color: #8a94a6;
    text-decoration: none;
}

.gp-footer a:hover {
    color: var(--gp-primary);
}

/* 回到顶部 */
.gp-top {
    position: fixed;
    right: 22px;
    bottom: 30px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gp-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #7d8ba1;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s, transform .25s, visibility .25s, color .2s, box-shadow .2s;
    box-shadow: 0 6px 18px rgba(35, 58, 94, .08);
}

.gp-top.is-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gp-top:hover {
    color: var(--gp-primary);
    box-shadow: 0 10px 24px rgba(35, 58, 94, .14);
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .gp-main {
        padding: 18px 14px 30px;
    }

    .gp-intro {
        padding: 20px 18px;
        border-radius: 16px;
    }

    .gp-intro h1 {
        font-size: 20px;
    }

    .gp-intro-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .gp-intro-icon img,
    .gp-intro-icon svg {
        width: 26px;
        height: 26px;
    }

    .gp-filter {
        max-width: 100%;
    }

    .gp-grid {
        grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
        gap: 12px;
        margin-top: 14px;
    }

    .gp-card {
        min-height: 96px;
        padding: 13px 13px 11px;
        border-radius: 14px;
    }

    .gp-card-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .gp-card-icon img,
    .gp-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .gp-card-head {
        gap: 9px;
    }

    .gp-card-name {
        font-size: 14px;
    }

    .gp-card-desc {
        font-size: 12px;
        margin-top: 8px;
    }

    .gp-top {
        right: 14px;
        bottom: 20px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .gp-brand {
        display: none;
    }
}
