/* ============================================================
   抽奖页整体设计：左侧设置 / 中间舞台 / 右侧记录
   ============================================================ */
.ld-wrap {
    position: relative;
    height: 86vh;
    min-height: 620px;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1022;
    box-shadow: 0 24px 60px rgba(8, 12, 30, 0.5);
    margin-bottom: 22px;
}
.ld-wrap .wall {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, #1b2653 0%, #111a3d 42%, #0a0f24 72%, #070a18 100%);
}

/* 揭晓时舞台虚化（脚本给 #main 加 .mask）——原 index.css 里的全局规则，改到这里局部化 */
.ld-wrap #main { -webkit-transition: all 1s; transition: all 1s; }
.ld-wrap .mask { -webkit-filter: blur(5px); filter: blur(5px); }

/* ---------- 左侧：设置面板 ---------- */
.ld-left {
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 300px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: rgba(10, 15, 31, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(120, 160, 255, 0.28);
    border-radius: 14px;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.ld-left::-webkit-scrollbar { width: 6px; }
.ld-left::-webkit-scrollbar-thumb { background: rgba(120, 160, 255, 0.35); border-radius: 3px; }
.ld-left::-webkit-scrollbar-track { background: transparent; }

.ld-sec + .ld-sec { margin-top: 20px; }

.ld-left h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f5b43a;
    font-size: 14px;
    margin: 0 0 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.ld-left h3::before {
    content: '';
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(#f5b43a, #f29807);
}

.ld-left textarea {
    width: 100%;
    height: 118px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(120, 160, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
    color: #e6f0ff;
    font-size: 13px;
    line-height: 1.7;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ld-left textarea::placeholder { color: rgba(159, 179, 224, 0.55); }
.ld-left textarea:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.ld-left textarea::-webkit-scrollbar { width: 6px; }
.ld-left textarea::-webkit-scrollbar-thumb { background: rgba(120, 160, 255, 0.35); border-radius: 3px; }
.ld-left textarea::-webkit-scrollbar-track { background: transparent; }

.ld-hint { color: #7f92c4; font-size: 12px; margin-top: 6px; }

.ld-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(120, 160, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
    color: #e6f0ff;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ld-input::placeholder { color: rgba(159, 179, 224, 0.55); }
.ld-input:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }

.ld-label { display: block; color: #9fb3e0; font-size: 12px; margin: 12px 0 6px; }

/* pure-button 基础态（原 index.css 全局规则，改为仅作用于抽奖区，避免污染站点按钮） */
.ld-wrap .pure-button {
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    font-size: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border: none;
    -webkit-user-select: none;
    user-select: none;
}

.ld-row { display: flex; gap: 8px; margin: 10px 0 2px; }
.ld-row .pure-button {
    flex: 1;
    background: rgba(255, 255, 255, 0.09);
    color: #cfe0ff;
    border: 1px solid rgba(120, 160, 255, 0.22);
    border-radius: 9px;
    font-size: 13px;
    padding: 8px 0;
    transition: all 0.18s;
}
.ld-row .pure-button:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
#ldImport {
    background: rgba(34, 211, 238, 0.2);
    color: #7ff0ff;
    border-color: rgba(34, 211, 238, 0.45);
    font-weight: 700;
}
#ldImport:hover { background: rgba(34, 211, 238, 0.35); color: #fff; }

/* 自定义下拉（奖项） */
.ld-select { position: relative; }
.ld-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(120, 160, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
    color: #e6f0ff;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ld-select-btn:hover { border-color: rgba(34, 211, 238, 0.6); }
.ld-select.open .ld-select-btn { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.ld-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #9fb3e0;
    transition: transform 0.2s;
}
.ld-select.open .ld-caret { transform: rotate(180deg); }
.ld-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 90;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #141b33;
    border: 1px solid rgba(120, 160, 255, 0.35);
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s;
    max-height: 240px;
    overflow-y: auto;
}
.ld-select.open .ld-select-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.ld-select-menu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 7px;
    color: #cfe0ff;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ld-select-menu li:hover { background: rgba(34, 211, 238, 0.16); color: #fff; }
.ld-select-menu li.active { color: #f5b43a; font-weight: 700; }
.ld-select-menu li.active::after { content: '✓'; font-size: 12px; }
.ld-select-menu::-webkit-scrollbar { width: 6px; }
.ld-select-menu::-webkit-scrollbar-thumb { background: rgba(120, 160, 255, 0.35); border-radius: 3px; }

/* 步进器（人数） */
.ld-stepper {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(120, 160, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    height: 40px;
}
.ld-step {
    width: 44px;
    background: transparent;
    color: #cfe0ff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s;
}
.ld-step:hover { background: rgba(34, 211, 238, 0.22); color: #fff; }
.ld-step-val { flex: 1; text-align: center; align-self: center; color: #fff; font-size: 15px; font-weight: 700; }

/* 重置 */
.ld-reset {
    width: 100%;
    margin-top: auto;
    padding: 10px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 120, 120, 0.3);
    background: rgba(255, 80, 80, 0.1);
    color: #ff9d9d;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}
.ld-reset:hover { background: rgba(255, 80, 80, 0.24); color: #fff; }

/* ---------- 中间：舞台 HUD ---------- */
.ld-stage {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 336px;
    right: 356px;
    z-index: 40;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 26px 0;
}
.ld-stage-top { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.ld-badge {
    padding: 8px 24px;
    border-radius: 999px;
    background: rgba(245, 180, 58, 0.12);
    border: 1px solid rgba(245, 180, 58, 0.45);
    color: #e9c07a;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: inset 0 0 22px rgba(245, 180, 58, 0.12);
}
.ld-badge b { color: #ffd479; font-size: 18px; margin-left: 4px; }

.ld-stats { display: flex; gap: 40px; }
.ld-stat { text-align: center; }
.ld-stat span { display: block; font-size: 28px; font-weight: 800; color: #fff; line-height: 1.2; }
.ld-stat em { font-style: normal; font-size: 12px; letter-spacing: 2px; color: #8fa4d6; }

.ld-stage-bottom { display: flex; justify-content: center; }

.ld-big-btn {
    pointer-events: auto;
    width: 260px;
    height: 64px;
    border: none;
    border-radius: 999px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #08111f;
    cursor: pointer;
    font-family: inherit;
    background: linear-gradient(135deg, #ffe08a, #f5b43a);
    box-shadow: 0 16px 34px rgba(245, 180, 58, 0.35);
    transition: transform 0.15s, filter 0.2s, box-shadow 0.2s;
}
.ld-big-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.ld-big-btn:active { transform: translateY(0); }
.ld-big-btn.is-stop {
    background: linear-gradient(135deg, #ff8a8a, #e23b3b);
    color: #fff;
    letter-spacing: 2px;
    box-shadow: 0 16px 34px rgba(226, 59, 59, 0.4);
}
.ld-big-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; filter: none; }
.ld-big-btn.is-done {
    background: rgba(255, 255, 255, 0.1);
    color: #8fa4d6;
    box-shadow: none;
    letter-spacing: 4px;
}

/* ---------- 右侧：中奖记录 ---------- */
.ld-wrap .luck-user {
    position: absolute;
    right: 20px;
    top: 20px;
    bottom: 20px;
    width: 320px;
    z-index: 60;
    background: rgba(10, 15, 31, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(120, 160, 255, 0.28);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.ld-wrap .luck-user-title {
    position: static;
    left: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 13px;
    color: #ffd479;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(120, 160, 255, 0.18);
}
.ld-wrap .luck-user-title::before { display: none; }
.ld-wrap .luck-user-title em {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: #8fa4d6;
    background: rgba(120, 160, 255, 0.14);
    padding: 2px 10px;
    border-radius: 999px;
}
.ld-wrap .luck-user-list {
    position: static;
    top: auto;
    bottom: auto;
    width: auto;
    margin: 0;
    padding: 14px 16px;
    height: calc(100% - 53px);
    overflow-y: auto;
    list-style: none;
}
.ld-wrap .luck-user-list::-webkit-scrollbar { width: 6px; height: 6px; }
.ld-wrap .luck-user-list::-webkit-scrollbar-thumb { background: rgba(120, 160, 255, 0.35); border-radius: 3px; }
.ld-wrap .luck-user-list::-webkit-scrollbar-track { background: transparent; }

.ld-empty {
    list-style: none;
    text-align: center;
    color: #6f82b4;
    font-size: 13px;
    line-height: 2.1;
    margin-top: 70px;
}
.ld-empty small { color: #55689a; }

.ld-round {
    list-style: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
    border: 1px solid rgba(120, 160, 255, 0.16);
    border-radius: 12px;
    padding: 11px 12px;
}
.ld-round + .ld-round { margin-top: 10px; }
.ld-round-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.ld-round-head b { color: #ffd479; font-size: 14px; letter-spacing: 0.5px; }
.ld-round-tools { display: flex; align-items: center; gap: 8px; }
.ld-round-head em {
    font-style: normal;
    font-size: 12px;
    color: #9db2e0;
    background: rgba(120, 160, 255, 0.14);
    padding: 1px 9px;
    border-radius: 999px;
}
.ld-round-del {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 120, 120, 0.3);
    background: rgba(255, 80, 80, 0.12);
    color: #ff9d9d;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.ld-round-del:hover { background: rgba(255, 80, 80, 0.32); color: #fff; }
.ld-round-body { display: flex; flex-wrap: wrap; gap: 7px; }
.ld-winner {
    display: inline-flex;
    align-items: center;
    color: #eaf6ff;
    background: rgba(34, 211, 238, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 13px;
}
.ld-chip-x {
    font-style: normal;
    margin-left: 6px;
    cursor: pointer;
    color: #7fd7e8;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.ld-winner:hover .ld-chip-x { opacity: 1; }
.ld-chip-x:hover { color: #fff; }

/* ---------- 揭晓结果 ---------- */
.ld-wrap .result {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    margin-top: 0;
    z-index: 100;
    text-align: center;
    padding: 0 40px;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 14px;
}
.ld-wrap .result .r-level {
    flex-basis: 100%;
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0 0 6px;
    background: transparent;
    color: #ffd479;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 6px;
    box-shadow: none;
    text-shadow: 0 4px 18px rgba(245, 180, 58, 0.45);
}
.ld-wrap .result span:not(.r-level) {
    display: inline-block;
    width: auto;
    min-width: 150px;
    padding: 18px 30px;
    font-size: 34px;
    font-weight: 800;
    color: #3a2600;
    background: linear-gradient(135deg, #ffe9a8, #f5b43a);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(245, 180, 58, 0.4);
    animation: ld-pop 0.35s ease both;
}
@keyframes ld-pop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ld-wrap .continue {
    position: absolute;
    display: none;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 54px;
    border: none;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #08111f;
    background: linear-gradient(135deg, #ffe08a, #f5b43a);
    box-shadow: 0 16px 34px rgba(245, 180, 58, 0.4);
    cursor: pointer;
    font-family: inherit;
    z-index: 9999;
}
.ld-wrap .continue:hover { filter: brightness(1.05); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
    .ld-left { width: 260px; }
    .ld-wrap .luck-user { width: 280px; }
    .ld-stage { left: 296px; right: 316px; }
    .ld-big-btn { width: 220px; height: 58px; font-size: 19px; }
    .ld-stat span { font-size: 24px; }
}
@media (max-width: 900px) {
    .ld-wrap { height: 78vh; min-height: 520px; }
    .ld-left { width: 232px; padding: 12px; }
    .ld-wrap .luck-user { width: 232px; padding: 0; }
    .ld-stage { left: 252px; right: 252px; padding: 16px 0; }
    .ld-badge { padding: 6px 14px; font-size: 12px; }
    .ld-badge b { font-size: 15px; }
    .ld-stats { gap: 20px; }
    .ld-stat span { font-size: 20px; }
    .ld-stat em { font-size: 11px; letter-spacing: 1px; }
    .ld-big-btn { width: 180px; height: 52px; font-size: 16px; letter-spacing: 3px; }
    .ld-wrap .result span:not(.r-level) { font-size: 24px; padding: 12px 20px; min-width: 110px; }
}
