/* 我的背包模态框样式 */
.bp-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.bp-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.bp-modal-container {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: bpModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
@keyframes bpModalIn {
    from { transform: scale(0.92) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.bp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f1f5f9;
}
.bp-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bp-close-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bp-summary-bar {
    padding: 10px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.84rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bp-grid {
    padding: 16px 18px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    flex: 1;
}
.bp-item-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.bp-badge-qty {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}
.bp-img-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 4px 0 8px;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bp-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bp-item-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}
.bp-gender-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.bp-tag-boy { background: #e0f2fe; color: #0284c7; }
.bp-tag-girl { background: #fdf2f8; color: #db2777; }
.bp-btn-group {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}
.bp-btn {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 5px 0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.bp-btn-use { background: #4f46e5; color: #ffffff; }
.bp-btn-discard { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.bp-btn-discard:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* 通用道具标签与品质色彩 */
.bp-tag-all { background: #ecfdf5; color: #059669; }
.bp-btn-open { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; }
.bp-btn-steal { background: linear-gradient(135deg, #ea580c, #c2410c); color: #fff; }
.bp-btn-shield { background: linear-gradient(135deg, #0284c7, #2563eb); color: #fff; }

/* 选人整蛊模态框 (专为手机端优化) */
.steal-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.steal-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.steal-modal-container {
    width: 100%;
    max-width: 380px;
    max-height: 82vh;
    background: #ffffff;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.steal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom: 1px solid #fed7aa;
}
.steal-modal-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #9a3412;
    display: flex;
    align-items: center;
    gap: 6px;
}
.steal-search-box {
    padding: 10px 14px 6px;
}
.steal-search-input {
    width: 100%;
    height: 38px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
}
.steal-search-input:focus {
    border-color: #ea580c;
}
.steal-student-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
}
.steal-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.steal-student-item.selected {
    background: #fff7ed;
    border-color: #ea580c;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}
.steal-item-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.steal-item-school {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}
.steal-item-pts {
    font-size: 0.78rem;
    font-weight: 800;
    color: #b45309;
}
.steal-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid #f1f5f9;
}
.steal-btn-confirm {
    flex: 2;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
}
.steal-btn-cancel {
    flex: 1;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #64748b;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

@keyframes shakeFeedback {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
.shake-anim {
    animation: shakeFeedback 0.45s ease-in-out;
}

