/* ==================== 个人宠物冻结功能样式（美化版） ==================== */

/* ---------- 学生卡片冻结状态 ---------- */
.student-card.frozen {
    border: 2px solid rgba(135, 206, 250, 0.7);
    box-shadow: 0 0 18px rgba(100, 180, 255, 0.35), 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}
.student-card.frozen:hover {
    border-color: rgba(135, 206, 250, 0.9);
    box-shadow: 0 0 24px rgba(100, 180, 255, 0.5), 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* 冰霜覆盖层 - 降低透明度，确保信息清晰可见 */
.frost-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(180, 215, 245, 0.18),
        rgba(140, 200, 240, 0.12));
    border-radius: inherit;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}
/* 移除 backdrop-filter blur，避免内容模糊 */
.student-card.frozen .frost-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- "冻结中"文字 - 参照"扣分中"样式，居中旋转突出 ---------- */
.frozen-text {
    display: none;
    color: #fff;
    font-weight: 800;
    font-size: 24px;
    text-align: center;
    z-index: 7;
    pointer-events: none;
    letter-spacing: 3px;
    border: 3px solid white;
    padding: 8px 20px;
    border-radius: 14px;
    background: rgba(0, 140, 220, 0.55);
    transform: rotate(-15deg);
    text-shadow: 0 0 10px rgba(0, 160, 255, 0.7);
    box-shadow: 0 0 20px rgba(0, 160, 255, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.student-card.frozen .frozen-text {
    display: inline-block;
}

/* ---------- 名字旁小冰人图标 ---------- */
.frozen-name-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 4px;
    vertical-align: middle;
    font-size: 16px;
    line-height: 1;
    animation: frostNameIconPulse 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(0, 180, 255, 0.6));
}
@keyframes frostNameIconPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.12); opacity: 1; }
}

/* ---------- 冰霜覆盖层内小冰人（已废弃，保留兼容） ---------- */
.frost-icon {
    display: none;
    position: relative;
    z-index: 8;
    width: 42px;
    height: 42px;
    margin-bottom: 6px;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(0, 180, 255, 0.7));
}
.student-card.frozen .frost-icon {
    display: none;
}
.frost-icon-svg {
    width: 100%;
    height: 100%;
    animation: frostIconPulse 2.2s ease-in-out infinite;
}
@keyframes frostIconPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* ---------- 雪花飘落 - 减少密度，降低干扰 ---------- */
.frost-snowflake {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    animation: snowFall linear infinite;
}
.frost-snowflake:nth-child(1) { left: 8%; animation-duration: 4s; animation-delay: 0s; }
.frost-snowflake:nth-child(2) { left: 22%; animation-duration: 5s; animation-delay: 0.6s; width: 2px; height: 2px; }
.frost-snowflake:nth-child(3) { left: 38%; animation-duration: 4.5s; animation-delay: 1.2s; }
.frost-snowflake:nth-child(4) { left: 55%; animation-duration: 5.5s; animation-delay: 0.3s; width: 2px; height: 2px; }
.frost-snowflake:nth-child(5) { left: 70%; animation-duration: 4.2s; animation-delay: 1.5s; }
.frost-snowflake:nth-child(6) { left: 85%; animation-duration: 5.2s; animation-delay: 0.8s; width: 2px; height: 2px; }
@keyframes snowFall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.4; }
    100% { transform: translateY(90px) rotate(360deg); opacity: 0; }
}

/* ---------- 冻结与惩罚共存时 ---------- */
.student-card.frozen .penalty-overlay {
    background: rgba(0, 80, 160, 0.25);
}
.student-card.frozen .penalty-text {
    display: none; /* 冻结时隐藏扣分文字，优先显示冻结 */
}

/* ---------- 宠物管理弹窗中的冻结状态提示条 ---------- */
.frozen-status-bar {
    display: none;
    background: linear-gradient(135deg, rgba(0, 140, 230, 0.12), rgba(0, 180, 255, 0.08));
    border: 2px solid rgba(135, 206, 250, 0.6);
    border-radius: 14px;
    padding: 10px 18px;
    text-align: center;
    margin-bottom: 14px;
    color: #0066cc;
    font-weight: 700;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 140, 230, 0.1);
}
.frozen-status-bar.active {
    display: flex;
}
.frozen-status-icon {
    font-size: 18px;
    animation: frostIconPulse 2s ease-in-out infinite;
}

/* ---------- 冻结/解冻按钮 - 优化为精致的开关式按钮 ---------- */
.freeze-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}
.freeze-toggle-btn:active {
    transform: scale(0.97);
}
.freeze-btn-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}
.freeze-toggle-btn:hover .freeze-btn-icon {
    transform: scale(1.2);
}

/* 冻结按钮（当前未冻结 -> 点击冻结） */
.btn-freeze {
    background: linear-gradient(135deg, #4da6e8, #2b8fd9);
    color: #fff;
    box-shadow: 0 4px 16px rgba(43, 143, 217, 0.35);
}
.btn-freeze:hover {
    background: linear-gradient(135deg, #3b96dc, #1e7bc4);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(43, 143, 217, 0.5);
}

/* 解冻按钮（当前已冻结 -> 点击解冻） */
.btn-unfreeze {
    background: linear-gradient(135deg, #ff8c42, #ff6b1a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 107, 26, 0.35);
    animation: unfreezeGlow 2.2s ease-in-out infinite;
}
.btn-unfreeze:hover {
    background: linear-gradient(135deg, #ff7a2e, #f05a0e);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(255, 107, 26, 0.5);
}
@keyframes unfreezeGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 107, 26, 0.35); }
    50% { box-shadow: 0 6px 26px rgba(255, 107, 26, 0.6); }
}

/* ---------- 批量模式中的冻结跳过角标 ---------- */
.batch-skip-badge {
    display: none;
    position: absolute;
    top: -4px;
    left: -4px;
    background: linear-gradient(135deg, #4da6e8, #2b8fd9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 9;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(43, 143, 217, 0.4);
}
.student-card.frozen .batch-skip-badge {
    display: block;
}

/* ---------- 快捷学生面板中的冻结标记 ---------- */
/* 移除名字旁雪花图标，避免与皇冠重叠；冻结状态由冰霜覆盖层和小冰人展示 */
/* .student-card.frozen .student-name::after { ... } */

/* ---------- 任务打卡面板中的冻结效果 ---------- */
.student-card-tc.frozen {
    border: 2px solid rgba(135, 206, 250, 0.7);
    position: relative;
    overflow: hidden;
}
.student-card-tc.frozen .frost-overlay {
    border-radius: 14px;
}

/* ---------- 小组视图中的冻结标记 ---------- */
.group-member-frozen-badge {
    display: none;
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #4da6e8, #2b8fd9);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    z-index: 3;
}
.group-member-frozen .group-member-frozen-badge {
    display: flex;
}

/* ---------- PK结果中的冻结提示 ---------- */
.pk-frozen-notice {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.15), rgba(0, 191, 255, 0.1));
    border: 1px solid rgba(135, 206, 250, 0.7);
    border-radius: 8px;
    padding: 4px 10px;
    color: #0066cc;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

/* ---------- 随机点名结果中的冻结提示 ---------- */
.call-frozen-notice {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.15), rgba(0, 191, 255, 0.1));
    border: 1px solid rgba(135, 206, 250, 0.7);
    border-radius: 8px;
    padding: 6px 12px;
    color: #0066cc;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    text-align: center;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
    .frost-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 4px;
    }
    .frozen-text {
        font-size: 18px;
        padding: 6px 16px;
        letter-spacing: 2px;
        border-width: 2px;
    }
    .freeze-toggle-btn {
        padding: 11px 16px;
        font-size: 14px;
        border-radius: 12px;
    }
    .freeze-btn-icon {
        font-size: 16px;
    }
    /* 移动端快捷面板批量模式：隐藏已选人数文字 */
    .quick-batch-count {
        display: none !important;
    }
}

/* ==================== 小组视图状态蒙层 ==================== */
.group-member {
    position: relative;
    overflow: hidden;
}

/* 小组状态蒙层基础 */
.group-status-overlay {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

/* 冻结 - 冰蓝色蒙层 */
.group-status-overlay.frozen {
    background: linear-gradient(135deg,
        rgba(180, 215, 245, 0.30),
        rgba(140, 200, 240, 0.20));
    border: 2px solid rgba(135, 206, 250, 0.5);
}

/* 扣分中 - 淡灰色蒙层 */
.group-status-overlay.penalty {
    background: rgba(0, 0, 0, 0.20);
    border: 2px solid rgba(120, 120, 120, 0.4);
}

/* 已养成 - 淡红色蒙层 */
.group-status-overlay.max-level {
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.15),
        rgba(239, 68, 68, 0.08));
    border: 2px solid rgba(251, 191, 36, 0.4);
}

/* 小组视图中小冰人 */
.group-member .frozen-name-icon {
    width: 18px;
    height: 18px;
    font-size: 14px;
    margin-right: 3px;
}

/* 优先级：惩罚 > 冻结 > 满级，通过 render.js 的 class 逻辑已保证只显示一个蒙层 */
