/* === Reset & Base === */
:root {
    --font-color: #000000;
    --font-weight: 500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: block;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.24rem 0.48rem;
    border-radius: 0.16rem;
    font-size: 0.28rem;
    text-align: center;
    max-width: 6rem;
    word-wrap: break-word;
    box-shadow: 0 0.08rem 0.24rem rgba(0, 0, 0, 0.3);
    animation: toastFadeIn 0.3s ease;
}

@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.toast.success {
    background: rgba(76, 175, 80, 0.9);
}

.toast.error {
    background: rgba(244, 67, 54, 0.9);
}

.toast.warning {
    background: rgba(255, 152, 0, 0.9);
}

/* === 全屏背景层 === */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #f5f5f5;
}

.bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F7F7F7;
    transition: background 0.3s ease;
}

/* === 主内容容器 === */
.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 0.48rem 1.2rem;
}

/* === 卡片 === */
.card {
    position: relative; /* 让 .liquid-glass 的 ::before/::after 以卡片为定位基准 */
    border-radius: 0.4rem;
    padding: 0.32rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 7.2rem;
    width: 100%;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

/* === 组合头像区域（环形6头像 + 中间emoji） === */
.avatar-group {
    position: relative;
    width: 1.04rem;
    height: 1.04rem;
    margin-bottom: 0.16rem;
}

.avatar-ring {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 6个环形小头像 */
.avatar-ring .avatar-item {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
}


/* === 群组名称 === */
.group-name {
    font-size: 0.26rem;
    color: var(--font-color);
    opacity: 0.8;
    font-weight: var(--font-weight);
    margin-bottom: 0.2rem;
    text-align: center;
}

/* === 问卷标题 === */
.quiz-title {
    display: flex;
    align-items: center;
    gap: 0.12rem;
    margin-bottom: 0.28rem;
}

.quiz-icon {
    font-size: 0.32rem;
}

.quiz-title-text {
    font-size: 0.32rem;
    font-weight: var(--font-weight);
    color: var(--font-color);
}

/* === 题数标签 === */
.quiz-badge {
    display: inline-block;
    border-radius: 0.2rem;
    padding: 0.04rem 0.24rem;
    font-size: 0.22rem;
    margin-bottom: 0.32rem;
    transition: all 0.3s ease;
    color: #2B3A52;
    font-weight: 500;
    background-color: #EAEEF5;
}

/* === 分割线（题数标签与描述文案之间） === */
.divider {
    width: 3.54rem;
    height: 0.02rem; /* 1px */
    border-radius: 0.02rem; /* 1px 圆角 */
    background-color: #000000;
    opacity: 0.15;
    margin-bottom: 0.32rem;
}

/* === 描述文案 === */
.quiz-desc {
    text-align: center;
    max-width: 5.2rem;
}

.quiz-desc p {
    font-size: 0.26rem;
    color: var(--font-color);
    opacity: 0.7;
    line-height: 1.8;
    font-weight: var(--font-weight);
}

/* === 底部按钮区域 === */
.btn-area {
    margin-top: 0.64rem;
    width: 100%;
    max-width: 7.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
}

.btn-primary {
    width: 100%;
    height: 1rem;
    border: none;
    border-radius: 0.5rem;
    background: #000000;
    color: #fff;
    font-size: 0.32rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0.08rem 0.32rem rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02rem;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    width: 100%;
    height: 1rem;
    border: none;
    border-radius: 0.5rem;
    background: #F2E9E0;
    color: #322110;
    font-size: 0.32rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02rem;
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* === 响应式适配 === */
/* 注意：媒体查询断点保留 px（基于视口高度判断，rem 随宽度缩放会导致断点漂移失效） */
@media (max-height: 680px) {
    .main-container {
        padding: 0.48rem 0.4rem 0.8rem;
    }

    .card {
        padding: 0.48rem 0.4rem 0.48rem;
    }

    .avatar-group {
        width: 1.28rem;
        height: 1.28rem;
        margin-bottom: 0.24rem;
    }

    .avatar-ring .avatar-item {
        width: 0.36rem;
        height: 0.36rem;
    }

    .avatar-center-emoji {
        font-size: 0.56rem;
        width: 0.68rem;
        height: 0.68rem;
    }

    .btn-area {
        margin-top: 0.48rem;
    }

    .btn-primary,
    .btn-secondary {
        height: 0.88rem;
        font-size: 0.28rem;
    }
}

/* === Loading 动画 === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 0.8rem;
    height: 0.8rem;
    border: 0.06rem solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/** 玻璃光感 */
.liquid-glass {
    background: radial-gradient(120% 85% at 18% 3%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .035) 34%, rgba(255, 255, 255, .01) 68%),
    linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .018) 48%, rgba(255, 255, 255, .055));
    backdrop-filter: blur(.14rem) saturate(1.24) contrast(1.05);
    -webkit-backdrop-filter: blur(.14rem) saturate(1.24) contrast(1.05);
    /*border: 1px solid rgba(255, 255, 255, .18);*/
    /*box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .17), inset 0 -1px 0 rgba(255, 255, 255, .07), 0 .04rem .12rem rgba(11, 24, 42, .045);*/
    /*border-top: none;*/
    /*border-bottom: none;*/
}

.liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(118deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .035) 21%, rgba(255, 255, 255, 0) 47%),
    radial-gradient(90% 70% at 82% 18%, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 55%);
    mix-blend-mode: screen;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.liquid-glass::after {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset .18rem .16rem .22rem rgba(255, 255, 255, .045),
    inset -.2rem -.18rem .22rem rgba(42, 58, 87, .025);
    /*border: 1px solid rgba(255, 255, 255, .18);*/
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === 举报按钮 === */
.btn-report {
    margin-top: 2rem;
    width: 100%;
    max-width: 7.2rem;
    display: flex;
    justify-content: center;
    font-weight: 400;
}

/* 默认样式（无背景图）- 灰色 */
.btn-report-default {
    display: none;
    align-items: center;
    gap: 0.08rem;
    padding: 0.06rem 0.24rem;
    font-size: 0.22rem;
    color: #959595;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-report-default svg {
    stroke: #999;
}

.btn-report-default:active {
    opacity: 0.6;
}

/* 有背景图样式 - 白色 */
.btn-report-bg {
    display: none;
    align-items: center;
    gap: 0.08rem;
    padding: 0.06rem 0.24rem;
    font-size: 0.22rem;
    color: #ffffff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0.22rem;
    transition: opacity 0.2s ease;
}

.btn-report-bg svg {
    stroke: rgba(255, 255, 255, 0.85);
}

.btn-report-bg:active {
    opacity: 0.6;
}

/* 根据是否有背景图切换显示 */
body.has-bg .btn-report-bg {
    display: flex;
}

body.has-bg .btn-report-default {
    display: none;
}

body:not(.has-bg) .btn-report-default {
    display: flex;
}

body:not(.has-bg) .btn-report-bg {
    display: none;
}

/* === 举报弹窗 === */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.report-modal.show {
    display: flex;
}

.report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.report-content {
    position: relative;
    width: 85%;
    max-width: 6rem;
    background: #fff;
    border-radius: 0.52rem;
    padding: 0.4rem 0.74rem;
    z-index: 1;
}

.report-title {
    font-size: 0.38rem;
    font-weight: 600;
    color: #303030;
    text-align: center;
    margin-bottom: 0.4rem;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin-bottom: 0.48rem;
}

.report-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.08rem 0;
}

.report-option input[type="radio"] {
    display: none !important;
}

.report-option-text {
    font-size: 0.32rem;
    flex: 1;
    font-weight: 500;
    color: #898989;
    transition: color 0.2s ease;
}

.report-radio {
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    border: 0.03rem solid #898989;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.16rem;
    display: inline-block;
}

/* 选中状态：蓝色圆圈 */
.report-option input[type="radio"]:checked ~ .report-radio {
    border-color: #2F93FC;
    background: #2F93FC;
}

/* 选中状态：白色对勾 */
.report-option input[type="radio"]:checked ~ .report-radio::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 0.12rem;
    height: 0.06rem;
    border-left: 0.03rem solid #fff;
    border-bottom: 0.03rem solid #fff;
}

/* 选中状态：文字变蓝 */
.report-option input[type="radio"]:checked ~ .report-option-text {
    color: #2F93FC;
}

.report-submit {
    width: 100%;
    height: 0.88rem;
    border: none;
    border-radius: 0.44rem;
    font-size: 0.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #B7B7B7;
    color: #fff;
}

.report-submit:not(:disabled) {
    background: #2F93FC;
}

.report-submit:not(:disabled):active {
    opacity: 0.85;
    transform: scale(0.98);
}

.report-submit:disabled {
    background: #B7B7B7;
    color: #fff;
    cursor: not-allowed;
}
