
/*合成新球员 自动闪光*/
/* === 1. 全屏遮罩与背景 === */
#gacha-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 背景保持深色，对比白光 */
    background: radial-gradient(circle at center, #2b2b2b 0%, #000000 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    perspective: 1000px; /* 3D透视核心 */
    overflow: hidden;
}

/* === 2. 爆发白屏层 === */
.flash-bang {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    z-index: 10005;
    animation: flashFade 0.6s ease-out forwards;
    pointer-events: none;
}

/* === 3. 旋转背景光 (修改为白光) === */
.god-rays-pro {
    position: absolute;
    top: 50%; left: 50%;
    width: 150vmax; height: 150vmax;
    /* 这里的颜色改成了白色 (255, 255, 255) */
    background: conic-gradient(
            from 0deg,
            transparent 0deg,
            rgba(255, 255, 255, 0.15) 20deg, /* 白光 */
            transparent 40deg,
            rgba(255, 255, 255, 0.15) 60deg, /* 白光 */
            transparent 80deg,
            transparent 360deg
    );
    animation: rotateRays 25s linear infinite; /* 转慢一点，更神圣 */
    z-index: -1;
    pointer-events: none;
}

/* === 4. 卡牌容器 (入场 + 3D悬浮) === */
.gacha-card-wrapper {
    position: relative;
    z-index: 10000;
    transform-style: preserve-3d;
    /* 这里的动画会被 JS 动态赋值覆盖，但保留着作为默认值 */
    animation: floatCard 6s ease-in-out infinite;
}

/* === 5. 克隆卡牌样式 (高级流光质感) === */
.gacha-card-wrapper .draftplayer {
    /* 【修改这里】 */
    /* 原来是 none，改成 auto，这样鼠标才能感应到 title */
    pointer-events: auto !important;

    transform: scale(3.0);

    /* A. 边框优化：极细的半透明白金边，不再是死板的纯黄 */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px; /* 稍微给一点圆角，更润 */

    /* B. 光影优化：多层柔光 */
    box-shadow:
        /* 第1层：内部边缘发金光 (内发光) */
            inset 0 0 15px rgba(255, 215, 0, 0.3),
                /* 第2层：外部深色投影 (增加立体感) */
            0 10px 30px rgba(0, 0, 0, 0.8),
                /* 第3层：外部金色柔光 (代替原来的黄线) */
            0 0 20px rgba(255, 215, 0, 0.4),
            0 0 40px rgba(255, 215, 0, 0.2);

    margin: 0;
    pointer-events: none;
    background-color: #1a1a1a; /* 深色底 */
    overflow: hidden; /* 确保光效不溢出 */
/* 隐藏杂项 */
.mergeCheckbox, .mergeCheckbox-label, .checkPositionDiv, input { display: none !important; }
}

/* === 锁死特效卡片：禁止鼠标悬停时的变小和变色; 因为前面球员卡片加了鼠标放上去变色的hover === */
.gacha-card-wrapper .draftplayer:hover {
    /* 1. 锁死缩放：强制保持3倍大，不准变回 1.0 或 translateY */
    transform: scale(3.0) !important;

    /* 5. 保持光标为手型 (可选) */
    cursor: pointer;


}

/* === 新增：给卡片加一个玻璃反光涂层，提升质感 === */
.gacha-card-wrapper .draftplayer::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* 模拟从左上角射入的玻璃反光 */
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0.1) 15%,
            transparent 50%,
            transparent 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* === 隐藏杂项 === */
.gacha-card-wrapper .draftplayer .mergeCheckbox,
.gacha-card-wrapper .draftplayer .mergeCheckbox-label,
.gacha-card-wrapper .draftplayer .checkPositionDiv,
.gacha-card-wrapper .draftplayer input {
    display: none !important;
}

/* === 6. 底部文字 === */
.gacha-text {
    margin-top: 130px;
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6); /* 文字光晕改白 */
    letter-spacing: 4px;
    opacity: 0;
    /* 延迟一点出现 */
    animation: textSlideUp 0.5s ease-out 0.3s forwards;
    z-index: 10002;
    text-align: center;
}

/* === 7. 粒子 (还是保留金色粒子比较好看，和边框呼应) === */
.gacha-particle {
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px #ffd700;
    z-index: 10005;
    --tx: 0px; --ty: 0px;
}

/* === 动画定义 === */
@keyframes flashFade { 0% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes rotateRays { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 入场：从远处旋进去 */
@keyframes cardEntrance {
    0% { transform: scale(0.2) rotateY(180deg); opacity: 0; }
    60% { transform: scale(1.1) rotateY(0deg); opacity: 1; }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

/* 悬浮：3D呼吸晃动 (你最喜欢的那个效果) */
@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
    50% { transform: translateY(-15px) rotateX(5deg) rotateY(5deg); }
}

@keyframes textSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes particleExplode { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }

/* 手机适配 */
@media screen and (max-width: 768px) {
    .gacha-card-wrapper .draftplayer { transform: scale(1.8) !important; }
    .gacha-text { margin-top: 80px; font-size: 18px; }
    .god-rays-pro { width: 200vmax !important; height: 200vmax !important; }
}
@keyframes impactShake {
    0% { transform: translate(0, 0); }
    10%, 90% { transform: translate(-2px, -2px); }
    20%, 80% { transform: translate(2px, 2px); }
    30%, 50%, 70% { transform: translate(-2px, 2px); }
    40%, 60% { transform: translate(2px, -2px); }
    100% { transform: translate(0, 0); }
}

/* 震动效果 这个类名稍后通过JS加到 overlay 上 */
.shake-screen {
    animation: impactShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* === 选秀列表的球员卡样式 === */
.draftHeadDiv{/* 因为不同头像大小不同,用这个包括了好居中 */
    width: 15vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.draftplayer {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    margin-right: 3px;
    position: relative;
    border: 1px solid #444; /* 边框颜色调整为深灰色 */
    border-radius: 8px; /* 添加圆角 */
    background-color: #151518; /* 添加深色背景以区别黑色背景 */
    padding: 1vh; /* 添加内边距以使内容与边框之间有一定的距离 */
}
.draftplayer img {
    width: auto;
    height: 11vh;
    border-radius: 50%;
    margin-bottom: 0;
}
.draftplayer-info {
    width: clamp(65px, 8vh, 76px);
    display: flex;
    flex-direction: column;
    /*margin-right: 3px;*/
    font-size: clamp(12px, 1.2vh, 20px);
    color: #ffffff;
    text-align: left;
    line-height: 1;
    /*margin-left: 0.5vw;*/
}
.draftplayer-container {
    display: flex;
    flex-wrap: wrap;
    /*background: rgba(7, 0, 0);*/
    /*background: rgba(246, 246, 248, 0.6);*/

}
.mergeCheckbox {
    position: absolute; /* 绝对定位 */
    left: 5px; /* 固定在左侧 */
    top: 5px; /* 顶部对齐（根据实际布局调整） */
    /*align-self: flex-start; !* 强制选择框顶部对齐 避免被外层的flex的居中影响*!*/
    font-weight: bold;
    font-size: clamp(18px, 2.2vh, 26px);
    color: #ddd7d7;
}


.mergeCheckbox-label {
    position: absolute; /* 绝对定位 */
    left: 3px; /* 固定在左侧 */
    top: 6px; /* 顶部对齐（根据实际布局调整） */
    font-weight: bold;
    font-size: clamp(18px, 2.2vh, 26px);
    color: #ddd7d7;
    width:7vh;
    height: 7vh;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    min-width:5px;
    min-height: 5px;
}
.checkPositionDiv{
    position: absolute; /* 绝对定位 */
    left: 3px; /* 固定在左侧 */
    top: 3px; /* 顶部对齐（根据实际布局调整） */
    z-index: 1; /* 确保不会被其他元素覆盖 */
    cursor: pointer;
    font-size: clamp(12px, 1.7vh, 20px);
    background-color: #0f559c;
}

/* 鼠标悬停特效：微微上浮 + 边框发光 */
.draftplayer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(145deg, #2f2f33, #202023);
}

/* 选中/特殊状态 (如果是替补，给个不一样的边框色) */
.draftplayer[data-position^="主力"] {
    border-left: 3px solid #d9534f; /* 主力红边 */
}
.draftplayer[data-position^="替补"] {
    border-left: 3px solid #5bc0de; /* 替补蓝边 */
}

/* 为不同位置定义排序规则（按需调整顺序） js中的updatePlayerPositions赋值 */
.draftplayer[data-position="主力C"] { order: 1; }
.draftplayer[data-position="主力PF"] { order: 2; }
.draftplayer[data-position="主力SF"] { order: 3; }
.draftplayer[data-position="主力SG"] { order: 4; }
.draftplayer[data-position="主力PG"] { order: 5; }
.draftplayer[data-position="替补C"] { order: 6; }
.draftplayer[data-position="替补PF"] { order: 7; }
.draftplayer[data-position="替补SF"] { order: 8; }
.draftplayer[data-position="替补SG"] { order: 9; }
.draftplayer[data-position="替补PG"] { order: 10; }
.draftplayer[data-position="替补"] { order: 11; }


/* 通用卡片布局 - 尺寸放大 */
.common-item-card {
    width: 30vh;  /* 宽度增加 */
    /*height: 180px; !* 高度增加 *!*/
    border: 1px solid #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 1.5vh;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}


/* 评级角标 */
.item-rarity-tag {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0.2vh 1.2vh;
    font-size: 1.6vh;
    font-weight: bold;
    color: #000;
    border-bottom-right-radius: 8px;
    z-index: 3;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

/* 图标容器 - 重点放大区域 */
.item-img-wrapper {
    width: 100%;
    flex: 1; /* 自动撑开 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-img-wrapper img {
    max-width: 95%; /* 几乎填满 */
    max-height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6));
}

/* 文字包装 */
.item-info-wrapper {
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

.item-name {
    width: 100%;
    font-size: 1.8vh;
    font-weight: bold;
    text-align: center;
    margin-top: 1vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

