body.lottery-page {
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    overflow-x: hidden;
}

body.lottery-page .bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 215, 0, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 100, 50, 0.1), transparent);
}

body.lottery-page .lottery-wrap {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

body.lottery-page .lottery-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    background: linear-gradient(90deg, #ffd700, #fff8dc, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    margin-bottom: 12px;
}

body.lottery-page .lottery-sub {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    margin-bottom: 36px;
}

body.lottery-page .lottery-draw-config {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

body.lottery-page .draw-count-label {
    margin: 0;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.75);
}

body.lottery-page .specialty-select {
    min-width: 160px;
    max-width: 240px;
    padding: 6px 32px 6px 10px;
    font-size: 16px;
    color: #fff;
    background-color: rgba(30, 28, 55, 0.92);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: auto;
    color-scheme: light;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* 下拉展开项：深色字 + 浅色底，避免白字白底看不见 */
body.lottery-page .specialty-select option {
    color: #1a1a2e;
    background-color: #fff;
}

body.lottery-page .specialty-select option:checked,
body.lottery-page .specialty-select option:hover {
    color: #fff;
    background-color: #4a5a8a;
}

body.lottery-page .specialty-select:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.25);
}

body.lottery-page .specialty-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.lottery-page .draw-count-input {
    width: 88px;
    padding: 6px 10px;
    font-size: 16px;
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.lottery-page .draw-count-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.25);
}

body.lottery-page .draw-count-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.lottery-page .draw-count-unit {
    color: rgba(255, 255, 255, 0.65);
}

body.lottery-page .lottery-stage {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 24px;
    padding: 48px 24px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

body.lottery-page .lottery-stage::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    padding: 2px;
    background: linear-gradient(45deg, #ffd700, transparent, #ff6b35, transparent, #ffd700);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    animation: lottery-borderSpin 4s linear infinite;
}

@keyframes lottery-borderSpin {
    to { transform: rotate(360deg); }
}

body.lottery-page .name-display {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.05s ease;
    word-break: break-all;
    line-height: 1.2;
    padding: 0 16px;
}

body.lottery-page .name-display.rolling {
    animation: lottery-nameJump 0.12s ease infinite;
    color: #ffd700;
}

body.lottery-page .name-display.rolling.rolling-slow {
    color: #fff8dc;
}

body.lottery-page .name-display.names-multi {
    font-size: clamp(1.35rem, 3.5vw, 2.4rem);
    line-height: 1.35;
}

@keyframes lottery-nameJump {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.08) translateY(-8px); }
}

body.lottery-page .name-display.hint {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    animation: none;
    text-shadow: none;
}

body.lottery-page .lottery-btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
    flex-wrap: wrap;
}

body.lottery-page .btn-lottery {
    min-width: 160px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    letter-spacing: 0.1em;
}

body.lottery-page .btn-lottery:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

body.lottery-page .btn-start {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.45);
}

body.lottery-page .btn-start:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.55);
}

body.lottery-page .btn-stop {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    box-shadow: 0 8px 30px rgba(231, 76, 60, 0.4);
}

body.lottery-page .btn-stop:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(231, 76, 60, 0.5);
}

body.lottery-page .result-section {
    margin-top: 48px;
    display: none;
}

body.lottery-page .result-section.show {
    display: block;
    animation: lottery-fadeUp 0.6s ease;
}

@keyframes lottery-fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

body.lottery-page .result-title {
    text-align: center;
    font-size: 1.6rem;
    color: #ffd700;
    margin-bottom: 24px;
    font-weight: 600;
}

body.lottery-page .result-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(0, 0, 0, 0.25);
}

body.lottery-page table.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 0;
}

body.lottery-page .result-table th,
body.lottery-page .result-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.lottery-page .result-table th {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    font-weight: 600;
    white-space: nowrap;
}

body.lottery-page .result-table tr:last-child td {
    border-bottom: none;
}

body.lottery-page .result-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.lottery-page .result-table .col-name {
    font-weight: 700;
    color: #fff8dc;
}

body.lottery-page .loading-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 41, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-size: 18px;
    color: #ffd700;
}

body.lottery-page .loading-mask.hide {
    display: none;
}

body.lottery-page .lottery-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 50;
    pointer-events: none;
    animation: lottery-confettiFall linear forwards;
}

@keyframes lottery-confettiFall {
    to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

body.lottery-page .lottery-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 200;
    display: none;
    font-size: 15px;
}

body.lottery-page .lottery-toast.show {
    display: block;
    animation: lottery-fadeUp 0.3s ease;
}
