/* ============ 舞队报名 H5 样式 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 关键：确保带 hidden 属性的元素一律隐藏，避免被下方 display 规则覆盖 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #f2f4f8;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.5;
}
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: #f2f4f8; }

/* 顶部 */
.hero {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 28px 20px 22px;
    border-radius: 0 0 20px 20px;
}
.hero h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.hero p { margin: 0; font-size: 13px; opacity: .9; }
/* 自定义 banner 图（后台上传后替换顶部） */
.hero-banner { line-height: 0; border-radius: 0 0 16px 16px; overflow: hidden; }
.hero-banner img { width: 100%; display: block; }
.req { color: #f87171; }
.hero .req { color: #fecaca; }

/* 表单分组 */
.form { padding: 16px; }
.group {
    background: #fff;
    border-radius: 14px;
    padding: 6px 16px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.group-title {
    font-size: 15px;
    font-weight: 700;
    color: #4f46e5;
    margin: 16px 0 8px;
    padding-left: 10px;
    border-left: 3px solid #6366f1;
}
.field { margin: 14px 0; }
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #374151; }

input[type=text], input[type=number], input[type=date], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #e2e5ec;
    border-radius: 10px;
    font-size: 15px;
    background: #fafbfc;
    color: #1f2937;
    outline: none;
    transition: border-color .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
input:focus, select:focus, textarea:focus { border-color: #6366f1; background: #fff; }
textarea { resize: vertical; }
.tip { margin: 6px 0 0; font-size: 12px; color: #9ca3af; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #f87171; background: #fef2f2; }
.field .err-msg { color: #ef4444; font-size: 12px; margin-top: 5px; display: none; }
.field.invalid .err-msg { display: block; }

/* 上传器 */
.uploader { position: relative; }
.up-box {
    border: 1.5px dashed #c7cbd6;
    border-radius: 12px;
    background: #fafbfc;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
}
.up-box:active { background: #f3f4f6; }
.up-plus { font-size: 30px; line-height: 1; margin-bottom: 6px; color: #a5b4fc; }
.up-text { font-size: 13px; }
.up-preview { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.up-preview img { width: 100%; display: block; max-height: 260px; object-fit: contain; background: #f3f4f6; }
.up-preview.vid video { width: 100%; display: block; max-height: 260px; background: #000; }
.up-remove {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: #fff; border: none;
    font-size: 18px; line-height: 24px; cursor: pointer; z-index: 2;
}
.up-filename { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(0,0,0,.5); color: #fff;
    font-size: 12px; padding: 5px 10px; }
.up-progress { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.up-progress .bar { flex: 1; height: 8px; border-radius: 4px; background: #e5e7eb; overflow: hidden; position: relative; }
.up-progress .bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%);
    background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width .2s; }
.up-progress span { font-size: 12px; color: #6b7280; min-width: 62px; text-align: right; }

/* 队员 */
.members { margin-top: 6px; }
.member-card {
    border: 1px solid #eef0f4;
    border-radius: 12px;
    padding: 4px 14px 14px;
    margin-bottom: 12px;
    background: #fbfcfe;
}
.member-card .m-head { font-size: 14px; font-weight: 700; color: #6366f1; margin: 12px 0 4px; }
.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.member-grid .m-name,
.member-grid .m-birth-field { grid-column: 1 / -1; }
.birth-selects { display: flex; gap: 8px; }
.birth-selects select { flex: 1; min-width: 0; }
.members-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 16px 0; }

/* 提交 */
.submit-bar { padding: 4px 0 20px; }
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.foot { text-align: center; color: #b0b4bd; font-size: 12px; padding: 10px 0 30px; }

/* 遮罩 */
.mask { position: fixed; inset: 0; background: rgba(17,24,39,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; }
.mask-card { background: #fff; border-radius: 16px; padding: 30px 24px; text-align: center; max-width: 340px; width: 100%; }
.mask-icon { width: 60px; height: 60px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 34px;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.mask-card.err .mask-icon { background: #fee2e2; color: #dc2626; }
.mask-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.mask-msg { font-size: 14px; color: #6b7280; margin-bottom: 20px; }

/* 提示 toast */
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(17,24,39,.9);
    color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; z-index: 99; max-width: 80%; text-align: center; }

/* 上传中全屏遮罩（提交时） */
.blocking { position: fixed; inset: 0; background: rgba(255,255,255,.6); z-index: 60; display: flex;
    align-items: center; justify-content: center; }
.spinner { width: 40px; height: 40px; border: 4px solid #e5e7eb; border-top-color: #6366f1; border-radius: 50%;
    animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
