/* ---------- 页面 / 语言块 ---------- */
.group-page {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.group-lang-block {
    display: none;
    flex-direction: column;
    gap: 32px;
}

.group-page[data-active-lang="zh"] .group-lang-block[data-lang="zh"],
.group-page[data-active-lang="en"] .group-lang-block[data-lang="en"] {
    display: flex;
}

/* ---------- Hero ---------- */
.group-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #1a2a44 0%, #2a4d79 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.group-hero::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.group-hero::after {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.group-hero-tag {
    position: relative;
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 16px;
    border-radius: 20px;
    background-color: #e50914;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.group-hero h1 {
    position: relative;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 14px;
}

.group-hero>p {
    position: relative;
    max-width: 720px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

/* 语言切换 */
.group-lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.group-lang-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.2s;
}

.group-lang-btn:hover {
    color: #ffffff;
}

.group-lang-btn.is-active {
    background-color: #ffffff;
    color: #e50914;
}

/* ---------- 公告提示条 ---------- */
.group-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    background-color: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 10px;
    color: #9a3412;
    font-size: 14px;
    line-height: 1.6;
}

.group-alert svg {
    width: 20px;
    height: 20px;
    fill: #ea580c;
    flex-shrink: 0;
    margin-top: 2px;
}

.group-alert strong {
    color: #c00812;
    font-weight: 600;
}

/* ---------- 分节标题 ---------- */
.group-section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.group-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    font-size: 12px;
    font-weight: 600;
    color: #e50914;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.group-section-tag::before {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background-color: #e50914;
    border-radius: 2px;
}

.group-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2329;
    line-height: 1.4;
}

.group-section-desc {
    max-width: 760px;
    font-size: 14px;
    line-height: 1.7;
    color: #8f959e;
}

/* ---------- 群聊网格 ---------- */
.group-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ---------- 群聊卡片 ---------- */
.group-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 12px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

/* 平台色条 */
.group-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--platform-color, #3b82f6);
}

.group-card.is-qq {
    --platform-color: #12b7f5;
}

.group-card.is-tg {
    --platform-color: #26a5e4;
}

.group-card.is-teams {
    --platform-color: #5b5fc7;
}

.group-card.is-wechat,
.group-card.is-google {
    --platform-color: #07c160;
}

/* 卡片头部 */
.group-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.group-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--platform-color, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.group-card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.group-card-meta {
    flex: 1;
    min-width: 0;
}

.group-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2329;
    line-height: 1.4;
    margin-bottom: 4px;
}

.group-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.group-badge.is-hot {
    background-color: #fee2e2;
    color: #dc2626;
}

.group-badge.is-normal {
    background-color: #dcfce7;
    color: #16a34a;
}

.group-badge.is-full {
    background-color: #f1f5f9;
    color: #64748b;
}

.group-card-desc {
    font-size: 12.5px;
    color: #8f959e;
    line-height: 1.5;
}

/* 群号显示与复制 */
.group-number-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background-color: #f8f9fa;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.group-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: #7c7c7c;
    letter-spacing: 0.5px;
}

.group-copy-btn {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.group-copy-btn:hover {
    color: #ffffff80;
}

.group-copy-btn.is-copied {
    color: #ffffff;
}

/* 操作按钮 */
.group-card-actions {
    margin-top: auto;
    display: flex;
    gap: 20px;
}

.group-btn-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 0;
    background-color: var(--platform-color, #3b82f6);
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.group-btn-join:hover {
    opacity: 0.85;
}

.group-btn-join svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.group-btn-join.is-disabled {
    background-color: #e5e6eb;
    color: #8f959e;
    cursor: not-allowed;
    pointer-events: none;
}

/* 二维码区域（微信专用） */
.group-qr-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.group-qr-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #8f959e;
    text-align: center;
}

.group-qr-img img {
    width: 100%;
    padding: 5px;
}

.group-qr-info {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #4e5969;
    line-height: 1.5;
}

/* ---------- 入群须知 ---------- */
.group-rules {
    background-color: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 12px;
    padding: 24px;
}

.group-rules h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2329;
    margin-bottom: 16px;
}

.group-rules h3 svg {
    width: 20px;
    height: 20px;
    fill: #e50914;
}

.group-rules ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.group-rules li {
    position: relative;
    padding-left: 16px;
    font-size: 13.5px;
    color: #4e5969;
    line-height: 1.6;
}

.group-rules li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #e50914;
}

/* ================= 深色模式 ================= */
body.dark-mode .group-hero {
    background: linear-gradient(135deg, #0f1825 0%, #1a2a44 100%);
}

body.dark-mode .group-alert {
    background-color: rgba(234, 88, 12, 0.1);
    border-color: rgba(234, 88, 12, 0.3);
    color: #fdba74;
}

body.dark-mode .group-alert strong {
    color: #f87171;
}

body.dark-mode .group-alert svg {
    fill: #f97316;
}

body.dark-mode .group-card,
body.dark-mode .group-rules {
    background-color: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .group-card:hover {
    border-color: #4a4a4a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .group-card-title,
body.dark-mode .group-section-title,
body.dark-mode .group-rules h3 {
    color: #e4e6eb;
}

body.dark-mode .group-number-box,
body.dark-mode .group-qr-box {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .group-number {
    color: #e4e6eb;
}

body.dark-mode .group-qr-img {
    background-color: #1e1e1e;
    border-color: #4a4a4a;
}

body.dark-mode .group-qr-info {
    color: #b0b3b8;
}

body.dark-mode .group-rules li {
    color: #b0b3b8;
}

body.dark-mode .group-badge.is-full {
    background-color: #2a2a2a;
    color: #8f959e;
}

/* ================= 响应式 ================= */

/* ---------- ≤1024px ---------- */
@media (max-width: 1024px) {
    .group-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .group-rules ul {
        grid-template-columns: 1fr;
    }
}

/* ---------- ≤768px ---------- */
@media (max-width: 768px) {

    .group-page,
    .group-lang-block {
        gap: 24px;
    }

    .group-hero {
        padding: 28px 24px 28px;
        padding-top: 62px;
    }

    .group-hero h1 {
        font-size: 24px;
    }

    .group-hero>p {
        font-size: 14px;
    }

    .group-lang-switch {
        top: 14px;
        right: 14px;
    }

    .group-section-title {
        font-size: 19px;
    }

    .group-alert {
        padding: 12px 16px;
        font-size: 13px;
    }

    .group-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .group-card {
        padding: 20px;
    }

    .group-rules {
        padding: 20px;
    }
}

/* ---------- ≤480px ---------- */
@media (max-width: 480px) {
    .group-hero {
        padding: 22px 18px 24px;
        padding-top: 58px;
        border-radius: 10px;
    }

    .group-hero h1 {
        font-size: 20px;
    }

    .group-card {
        padding: 16px;
        border-radius: 10px;
    }

    .group-card-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .group-card-icon svg {
        width: 22px;
        height: 22px;
    }
}