section,section div{display:block;height:unset;text-align:left;}
article li:hover{color:brown;}
h1,#template-info section{background-color:#0003;border-radius:1em;padding:1em;}
#template-list{min-width:30em;}
#template-info{min-width:45em;}
#template-info div{margin:4px;}
#template-info section{margin:1em 0.5em;}
#template-info h3{color:orange;}
main,input,select,#template-info section{font-size:16px;}
label{width:9em;text-align:right;display:inline-block;}
#template-desc,#template-sid{background-color:#3333;border-radius:1em;padding:1em;margin:1em 0.5em;position:sticky;top:2em;min-width:10em;max-height:90vh;}
desc{display:none;}
button{margin:0px 1em;}
.flex{flex-wrap:nowrap;}
#template-info,#template-desc,#template-sid{scrollbar-width:thin;max-height:calc(100vh - 2em);overflow-y:auto;}
#template-desc,#template-sid{max-height:calc(100vh - 6em);}
textarea{width:44em;}
item{display:block;height:66px;margin:3px;white-space:nowrap;}
item:hover{color:orange;}
item button{height:64px;float:left;}
pre{font-family:consola;}
.acc{color:forestgreen;}
/* 遮罩层 */
.modal-mask, .picker-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    margin:0px !important;
}

.picker-mask {
    z-index: 1000;
}

/* 弹窗容器 */
.modal-container {
    background: #444;
    border-radius: 8px;
    width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.picker-container {
    background: #444;
    width: 90vw;
    height: 85vh;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 头部 */
.modal-header, .picker-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* 主体 */
.modal-body {
    padding: 20px;
}

.picker-body {
    padding: 20px;
    height: calc(85vh - 70px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

/* 奖励类型列表 */
.bonus-type-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.type-item {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.type-item:hover {
    border-color: #409eff;
    background: #666;
    color:#ff0;
    font-size:16px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
}

.choose-input-group {
    display: flex;
    gap: 10px;
}

.choose-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.choose-input-group button {
    padding: 8px 16px;
    background: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 按钮 */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.btn-confirm, .btn-cancel {
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.btn-confirm {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

/* 宝物卡片 */
.choose-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    max-height: 130px;
}

.choose-card:hover {
    border-color: #409eff;
    background: #333;
    color:#ff0;
}

.choose-card img{
    max-width: 100px;
    padding-bottom: 10px;
}

/* =========================
   上传弹窗样式
   ========================= */
.upload-modal {
    max-width: 500px;
}

.drop-zone {
    border: 3px dashed #4a5568;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #2d3748;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #68d391;
    background: #1a202c;
}

.drop-zone .drop-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.drop-zone p {
    color: #a0aec0;
    margin-bottom: 16px;
}

.btn-select-file {
    background: #4a5568;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-select-file:hover {
    background: #5a6578;
}

.upload-info {
    margin-top: 20px;
    padding: 16px;
    background: #2d3748;
    border-radius: 8px;
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #4a5568;
}

.file-name {
    color: #e2e8f0;
    font-weight: bold;
}

.file-size {
    color: #a0aec0;
    font-size: 12px;
}

.validation-result {
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.validation-result.valid {
    background: rgba(104, 211, 145, 0.1);
    color: #68d391;
    border-left: 4px solid #68d391;
}

.validation-result.invalid {
    background: rgba(252, 129, 129, 0.1);
    color: #fc8181;
    border-left: 4px solid #fc8181;
}

.validation-result h4 {
    margin: 0 0 8px 0;
}

.validation-result ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

#confirmUpload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}