/* ---------- 顶部导航 ---------- */
.header-nav {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 540px;
    height: 48px;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 1px 6px rgba(27, 42, 94, .06);
}

.header-nav-back {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 48px;
    color: #333;
    cursor: pointer;
}

.header-nav-back:active {
    color: #8a93a6;
}

.header-nav-title {
    font-size: 16px;
    font-weight: bold;
    color: #1b2a5e;
}

/* ---------- 页面 ---------- */
.order-page {
    max-width: 540px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f6fa;
    padding-top: 58px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.order-section {
    margin: 10px 12px 0;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
}

.order-section-title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #1b2a5e;
}

/* ---------- 商品预览 ---------- */
.order-goods-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #9aa3b2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.order-goods-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.order-goods-buy .order-goods-price {
    margin-top: 0;
}

.order-num {
    display: flex;
    align-items: center;
}

.order-num-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef1f6;
    color: #8a93a6;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.order-num-plus {
    background: linear-gradient(135deg, #4d9bff, #2f7cf6);
    color: #fff;
}

.order-num-val {
    min-width: 32px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

/* ---------- 表单行 ---------- */
.order-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f2f3f7;
    font-size: 14px;
}

.order-row:last-child {
    border-bottom: none;
}

.order-row-block {
    flex-direction: column;
    align-items: flex-start;
}

.order-label {
    flex: none;
    width: 110px;
    color: #333;
}

.order-row-block .order-label {
    width: auto;
    margin-bottom: 10px;
}

.order-label em {
    font-style: normal;
    color: #ff3b30;
    margin-right: 2px;
}

.order-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    text-align: right;
}

.order-input::placeholder {
    color: #b6bdc9;
}

/* ---------- 单选 ---------- */
.order-radio-group {
    display: flex;
    flex-wrap: wrap;
}

.order-radio {
    display: flex;
    align-items: center;
    margin-right: 22px;
    margin-bottom: 4px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.order-radio-ico {
    position: relative;
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border: 1.5px solid #d8dce6;
    border-radius: 50%;
    box-sizing: border-box;
}

.order-radio.checked .order-radio-ico {
    border-color: #ff3b30;
}

.order-radio.checked .order-radio-ico::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border-right: 2px solid #ff3b30;
    border-bottom: 2px solid #ff3b30;
    transform: rotate(45deg);
}

/* ---------- 选择指定打手 ---------- */
.order-player-val {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.order-player-name {
    font-size: 14px;
    color: #333;
}

.order-player-name.empty {
    color: #b6bdc9;
}

.order-player-btn {
    margin-left: 10px;
    padding: 5px 14px;
    border-radius: 16px;
    background: #f2f3f7;
    color: #2f7cf6;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.order-num-text {
    flex: 1;
    text-align: right;
    color: #333;
}

.order-total {
    flex: 1;
    text-align: right;
    color: #ff3b30;
    font-size: 18px;
    font-weight: bold;
}

/* ---------- 提交按钮 ---------- */
.order-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 99;
    width: 100%;
    max-width: 540px;
    transform: translateX(-50%);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.order-submit {
    height: 48px;
    line-height: 48px;
    text-align: center;
    border-radius: 24px;
    background: linear-gradient(90deg, #ff9500, #ff5e1f);
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(255, 94, 31, .3);
    cursor: pointer;
    user-select: none;
}

.order-submit.disabled {
    background: #c8cdd8;
    box-shadow: none;
    cursor: default;
    font-size: 14px;
}

/* ---------- 打手选择弹窗 ---------- */
.player-modal-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.player-modal-mask.show {
    opacity: 1;
    visibility: visible;
}

.player-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 540px;
    height: 66vh;
    background: #f5f6fa;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .25s ease;
}

.player-modal-mask.show .player-modal {
    transform: translateY(0);
}

.player-modal-head {
    position: relative;
    flex: none;
    height: 48px;
    line-height: 48px;
    text-align: center;
    background: #00a896;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.player-modal-close {
    position: absolute;
    top: 0;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
}

.player-search {
    flex: none;
    padding: 10px 12px;
    background: #fff;
}

.player-search-box {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    background: #f2f3f7;
}

.player-search-box svg {
    flex: none;
    margin-right: 6px;
}

.player-search-box input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.player-search-box input::placeholder {
    color: #b6bdc9;
}

.player-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
}

.player-list-tip,
.player-empty {
    padding: 10px 0 16px;
    text-align: center;
    font-size: 12px;
    color: #b6bdc9;
}

/* ---------- 打手卡片 ---------- */
.player-item {
    position: relative;
    display: flex;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border: 1.5px solid transparent;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(27, 42, 94, .06);
    cursor: pointer;
}

.player-item.selected {
    border-color: #00a896;
    background: #f4fcfb;
}

.player-avatar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-right: 10px;
    border-radius: 50%;
    background: #e8ebf2;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-main {
    flex: 1;
    min-width: 0;
}

.player-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.player-name {
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.player-sex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    background: #e8f2ff;
    color: #2f7cf6;
    font-size: 10px;
}

.player-ordernum {
    margin-left: 4px;
    font-size: 11px;
    color: #b6bdc9;
}

.player-tag {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
}

.player-tag-star {
    background: #ffe9d6;
    color: #ff8a00;
}

.player-tag-gold {
    background: #fff3d1;
    color: #d8a100;
}

.player-tag-normal {
    background: #f2f3f7;
    color: #8a93a6;
}

.player-tag-area {
    background: #f2f3f7;
    color: #8a93a6;
}

.player-online {
    margin-left: auto;
    padding: 3px 12px;
    border-radius: 14px;
    background: #00a896;
    color: #fff;
    font-size: 12px;
}

.player-online.off {
    background: #d8dce6;
    color: #fff;
}

.player-intro {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.player-meta {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

.player-score {
    color: #ff8a00;
    font-size: 12px;
    font-weight: bold;
}

.player-time {
    margin-left: 12px;
    color: #b6bdc9;
    font-size: 12px;
}

.player-check {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00a896;
}

.player-item.selected .player-check {
    display: flex;
}

/* ---------- 轻提示 ---------- */
.order-toast {
    position: fixed;
    left: 50%;
    top: 40%;
    z-index: 300;
    max-width: 70%;
    padding: 10px 18px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 13px;
    text-align: center;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    pointer-events: none;
}

.order-toast.show {
    opacity: 1;
    visibility: visible;
}