body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100vw;
    box-sizing: border-box;
}
.main-flex-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    background: url('https://www.img520.com/Q82HvE.png') no-repeat center center fixed;
    background-size: cover;
}
.prize-left-panel {
    width: 300px;
    min-width: 220px;
    max-width: 340px;
    height: 100vh;
    background: rgba(30,32,60,0.95);
    border-radius: 0 22px 22px 0;
    box-shadow: 0 4px 32px rgba(0,0,0,0.18);
    padding: 32px 18px 32px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}
.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    margin-left: -120px;
    padding-left: 40px;
    /* 让主内容整体右移，避免与左侧重叠 */
}
body {
    background: url('https://www.img520.com/Q82HvE.png') no-repeat center center fixed;
    background-size: cover;
    font-family: '华文行楷', 'STXingkai', 'KaiTi', '楷体', serif;
}
.title {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(15%);
    width: max-content;
    z-index: 10;
    font-family: '华文行楷', 'STXingkai', 'KaiTi', '楷体', serif;
    font-size: 45px;
    color: #FFFF00;
    text-shadow: 2px 2px 8px #000, 0 0 10px #FFD700;
    margin: 0;
    padding: 0;
    text-align: center;
    pointer-events: none;
}

.container {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translate(-50%, 0);
    text-align: center;
    width: 90vw;
    max-width: 800px;
}
.name-display-container {
    width: 100%;
    max-width: 95%;
    margin: 70px auto 30px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    min-height: 100px;
}
.name-display {
    font-size: 60px;
    color: #fff;
    transition: color 0.2s;
    background: rgba(30,30,30,0.75); /* 深色半透明背景 */
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 10px 36px;
    min-width: 200px;
    flex: 1 1 auto;
    max-width: 400px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #FFD700; /* 金色边框增强对比 */
}
.name-display.paused {
    color: #FF3030;
}
/* 批量抽取模式下的名字显示 */
.name-display-container.batch-mode {
    gap: 15px;
    padding: 0 10px;
    justify-content: center;
    align-items: flex-start;
}
.name-display-container.batch-mode .name-display {
    font-size: 42px;
    min-width: 160px;
    max-width: 280px;
    padding: 12px 20px;
    flex: 0 1 auto;
    box-sizing: border-box;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* 响应式布局 - 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .name-display-container.batch-mode .name-display {
        font-size: 36px;
        min-width: 140px;
        max-width: 240px;
        padding: 10px 16px;
    }
}

/* 响应式布局 - 小平板/大手机 (600px - 768px) */
@media screen and (max-width: 768px) {
    .name-display-container.batch-mode {
        gap: 12px;
        padding: 0 8px;
    }
    .name-display-container.batch-mode .name-display {
        font-size: 32px;
        min-width: 120px;
        max-width: 200px;
        padding: 10px 14px;
        min-height: 70px;
    }
}

/* 响应式布局 - 手机设备 (最大600px) */
@media screen and (max-width: 600px) {
    .name-display-container {
        margin: 60px auto 20px auto;
        padding: 0 5px;
    }
    .name-display-container.batch-mode {
        gap: 10px;
        padding: 0 5px;
    }
    .name-display-container.batch-mode .name-display {
        font-size: 28px;
        min-width: 100px;
        max-width: 160px;
        padding: 8px 12px;
        min-height: 60px;
        border-width: 2px;
    }
    /* 手机端单次抽取模式也调整 */
    .name-display {
        font-size: 48px;
        min-width: 150px;
        max-width: 90%;
        padding: 8px 24px;
    }
    /* 按钮组响应式 */
    .button-group {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 10px;
    }
    .button-group button {
        font-size: 18px;
        padding: 10px 20px;
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
    /* 模式选择器响应式 */
    .mode-selector {
        gap: 20px;
        padding: 10px 15px;
        margin: 40px 0 10px 0;
    }
    .mode-option {
        font-size: 18px;
        padding: 6px 12px;
    }
}

/* 响应式布局 - 小手机设备 (最大480px) */
@media screen and (max-width: 480px) {
    .name-display-container.batch-mode .name-display {
        font-size: 24px;
        min-width: 90px;
        max-width: 140px;
        padding: 8px 10px;
        min-height: 55px;
    }
    .name-display {
        font-size: 40px;
        padding: 8px 20px;
    }
    .button-group button {
        font-size: 16px;
        padding: 8px 16px;
        flex: 1 1 100%;
        min-width: 100px;
    }
    .mode-selector {
        gap: 15px;
        padding: 8px 12px;
    }
    .mode-option {
        font-size: 16px;
        padding: 5px 10px;
    }
}

/* 响应式布局 - 超小手机设备 (最大360px) */
@media screen and (max-width: 360px) {
    .name-display-container.batch-mode .name-display {
        font-size: 20px;
        min-width: 80px;
        max-width: 120px;
        padding: 6px 8px;
        min-height: 50px;
    }
}

/* 大屏幕优化 - 当批量数量较多时，自动调整每行显示数量 */
@media screen and (min-width: 1200px) {
    .name-display-container.batch-mode {
        max-width: 1200px;
    }
    .name-display-container.batch-mode .name-display {
        max-width: 300px;
    }
}
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 70px 0 10px 0;
    padding: 12px 20px;
    background: rgba(30,30,30,0.6);
    border-radius: 12px;
    border: 2px solid #FFD700;
}
.mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}
.mode-option:hover {
    background: rgba(255,255,255,0.1);
}
.mode-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #FDE85E;
}
.mode-option input[type="radio"]:checked + span {
    color: #FDE85E;
    text-shadow: 0 0 8px #FDE85E;
}
.button-group {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.button-group button {
    background: #FDE85E;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 22px;
    padding: 12px 32px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.1s;
}
.button-group button:hover:not(:disabled) {
    background: #fff7c2;
    transform: translateY(-2px);
}
.button-group button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}
.result-list {
    margin-top: 30px;
    color: #fff;
    font-size: 28px;
    min-height: 40px;
    word-break: break-all;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* 已抽中名单的单个名字背景框 */
.result-item {
    background: rgba(30,30,30,0.7);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    border: 2px solid #FFD700;
    color: #fff;
    font-size: 26px;
    padding: 10px 32px;
    margin: 0;
    min-width: 180px;
    text-align: center;
    letter-spacing: 2px;
}
.result-item.red {
    color: #FF3030;
    font-weight: bold;
}
/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.modal.show {
    display: flex;
}
.modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px 30px 25px 30px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 
                0 0 0 1px rgba(255,255,255,0.3) inset;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.config-modal-content {
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    padding: 35px 30px 25px 30px;
}
.config-modal-content h2 {
    text-align: center;
}
.background-modal-content {
    max-width: 600px;
    width: 90vw;
}
.prize-config-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 20px;
}
.prize-config-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.prize-config-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.prize-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.prize-config-number {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.remove-prize-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}
.remove-prize-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}
.prize-config-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.prize-config-fields .config-field:last-child {
    text-align: center;
}
.config-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.config-field label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
}
.config-field input[type="text"],
.config-field input[type="number"] {
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s;
    color: #222;
}
.config-field input[type="text"]:focus,
.config-field input[type="number"]:focus {
    outline: none;
    border-color: #FDE85E;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(253, 232, 94, 0.3);
    transform: translateY(-1px);
    color: #000;
}
.config-field input[type="text"]::placeholder,
.config-field input[type="number"]::placeholder {
    color: #999;
}
.prize-preview-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: contain;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}
.background-config-section {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.background-config-section h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}
.background-config-section .config-field {
    margin-bottom: 12px;
}
.background-config-section .config-field:last-child {
    margin-bottom: 0;
}
.background-config-section .config-field:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.background-config-section .config-field:first-child label {
    flex: 0 0 auto;
    min-width: 200px;
}
.background-config-section .config-field:first-child input[type="text"] {
    flex: 1 1 auto;
    min-width: 300px;
    margin-right: 0;
}
.background-config-section input[type="text"] {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.2);
    color: #222;
}
.background-config-section input[type="text"]:focus {
    background: #fff;
    color: #000;
}
.reset-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    vertical-align: top;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}
.reset-btn:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}
.background-preview-img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: contain;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 8px;
    display: block;
    margin: 10px auto 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.modal-content h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.edit-tip {
    background: rgba(255, 243, 205, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}
#nameTextarea {
    width: 100%;
    font-size: 16px;
    min-height: 300px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.2);
    padding: 15px;
    resize: vertical;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s;
    box-sizing: border-box;
    color: #222;
    line-height: 1.6;
}
#nameTextarea:focus {
    outline: none;
    border-color: #FDE85E;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(253, 232, 94, 0.3);
    color: #000;
}
#nameTextarea::placeholder {
    color: #999;
}
.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.modal-buttons button {
    background: linear-gradient(135deg, #FDE85E 0%, #FFD700 100%);
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253, 232, 94, 0.4),
                0 0 0 1px rgba(255,255,255,0.3) inset;
    transition: all 0.3s;
    min-width: 100px;
}
.modal-buttons button:hover {
    background: linear-gradient(135deg, #fff7c2 0%, #FDE85E 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(253, 232, 94, 0.5),
                0 0 0 1px rgba(255,255,255,0.4) inset;
}
.modal-buttons button:active {
    transform: translateY(-1px);
}

.prize-rounds-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    align-items: stretch;
}
.prize-round-btn {
    background: linear-gradient(90deg,#e0c3fc,#8ec5fc);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 22px;
    font-weight: bold;
    padding: 16px 0 10px 60px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
    position: relative;
    min-height: 54px;
}
.prize-round-btn.active, .prize-round-btn:hover {
    background: linear-gradient(90deg,#a18cd1,#fbc2eb);
    color: #fff;
    box-shadow: 0 4px 16px #fbc2eb44;
}
.prize-round-btn .prize-btn-img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.prize-round-btn .prize-btn-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
}
.prize-round-btn .prize-btn-count {
    font-size: 15px;
    color: #f7e7ff;
    margin-left: 8px;
}

.prize-image-area {
    position: static;
    background: #23243a;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    padding: 24px 0 18px 0;
    min-width: 0;
    min-height: 180px;
    max-width: 100%;
    margin: 0 auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
    border-radius: 18px;
}
.prize-image-area img {
    max-height: 180px;
    max-width: 260px;
    margin: 0 0 8px 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    background: #fff;
    object-fit: contain;
}
.prize-desc {
    margin-top: 0;
    text-align: center;
    color: #fff;
    font-size: 22px;
    line-height: 1.7;
    font-family: '微软雅黑', 'Arial', sans-serif;
    padding-left: 0;
    font-weight: bold;
}
.prize-desc .prize-level {
    font-weight: bold;
    color: #ffe066;
    font-size: 18px;
}
.prize-desc .prize-name {
    font-weight: bold;
    color: #fff;
    font-size: 16px;
}
.prize-desc .prize-count {
    color: #ffe066;
    font-size: 15px;
    margin-left: 8px;
}

/* 浏览次数显示 */
.click-counter {
    position: fixed;
    bottom: 50px;
    left: 20px;
    color: #999;
    font-size: 16px;
    font-weight: normal;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    z-index: 1000;
    pointer-events: none;
    text-shadow: none;
    font-family: '微软雅黑', 'Arial', sans-serif;
}

/* 作者链接 */
.author-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: '微软雅黑', 'Arial', sans-serif;
}

.author-link a {
    color: #999;
    font-size: 14px;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.3s, background 0.3s;
    display: inline-block;
}

.author-link a:hover {
    color: #ccc;
    background: rgba(0, 0, 0, 0.5);
    text-decoration: none;
} 