/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
}

/* ===== 头部 ===== */
.header {
    text-align: center;
    margin-bottom: 28px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.header .subtitle {
    color: #888;
    font-size: 15px;
    margin-top: 6px;
}

/* ===== 群码卡片 ===== */
.code-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px 24px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
}

/* 群介绍：居中、正常行距、无首行缩进 */
.code-card .description {
    font-size: 17px;
    font-weight: 500;
    color: #1a1a2e;
    padding: 10px 16px;
    background: #f7f9fc;
    border-radius: 12px;
    margin-bottom: 20px;
    line-height: 1.6;          /* 正常行距 */
    word-break: break-all;
    text-align: center;        /* 居中对齐 */
    text-indent: 0;            /* 取消首行缩进 */
    white-space: normal;       /* 不保留多余空格，换行由 <br> 控制 */
}

.qr-wrapper {
    background: #fafbfc;
    border-radius: 16px;
    padding: 12px;
    display: inline-block;
}

/* 图片全尺寸显示，不拉伸 */
.qr-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    background: #f0f2f5;
}

.code-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.hint {
    font-size: 14px;
    color: #666;
}

.footer-note {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-note p {
    font-size: 13px;
    color: #999;
}

/* ===== 空状态 ===== */
.empty-state {
    background: #ffffff;
    border-radius: 24px;
    padding: 60px 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-size: 20px;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.empty-state p {
    color: #999;
    font-size: 15px;
}

/* ===== 底部 ===== */
.bottom-bar {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #bbb;
    padding: 0 8px;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .code-card {
        padding: 20px 16px 20px;
    }
    .header h1 {
        font-size: 24px;
    }
    .code-card .description {
        font-size: 15px;
    }
    .footer-note {
        flex-direction: column;
        gap: 4px;
    }
}