/* 手机号验证弹窗 — 独立样式（不依赖 Tailwind 编译扫描） */

#phone-bind-modal {
    z-index: 62;
    font-family: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
}

#phone-bind-modal.pb-modal-open {
    display: flex;
}

.pb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 62;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: pbFadeIn 0.3s ease-out forwards;
}

.pb-modal-overlay.pb-modal-open {
    display: flex;
}

/* 与扫码弹窗共用 #qr-login-modal 遮罩，仅切换中间卡片 */
#phone-bind-modal.pb-modal-overlay--shared-backdrop {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
    pointer-events: none;
}

#phone-bind-modal.pb-modal-overlay--shared-backdrop .pb-modal-card {
    pointer-events: auto;
}

.pb-modal-card {
    position: relative;
    width: 100%;
    max-width: 448px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    animation: pbScaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.pb-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pb-modal-close:hover {
    background: #eff6ff;
    color: #2563eb;
}

.pb-modal-body {
    flex: 1;
    padding: 32px 32px 24px;
}

@media (max-width: 480px) {
    .pb-modal-body {
        padding: 28px 24px 20px;
    }
}

.pb-modal-header {
    margin-bottom: 24px;
    text-align: center;
}

.pb-modal-shield-wrap {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
    color: #2563eb;
    font-size: 24px;
    animation: pbBounceSubtle 2s ease-in-out infinite;
}

.pb-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.3;
}

.pb-modal-subtitle {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

/* 优惠券卡片 */
.pb-coupon-card {
    position: relative;
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.pb-coupon-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    pointer-events: none;
}

.pb-coupon-inner {
    position: relative;
    display: flex;
    height: 96px;
    align-items: stretch;
}

.pb-coupon-left {
    position: relative;
    display: flex;
    width: 33.333%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 50%, transparent 10px, #4f46e5 10px),
        linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

.pb-coupon-left::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
}

.pb-coupon-amount {
    display: flex;
    align-items: baseline;
    font-weight: 900;
    line-height: 1;
}

.pb-coupon-amount-yen {
    font-size: 14px;
    font-weight: 500;
}

.pb-coupon-amount-num {
    font-size: 30px;
    letter-spacing: -0.04em;
}

.pb-coupon-left-label {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
}

.pb-coupon-divider {
    position: relative;
    width: 1px;
    flex-shrink: 0;
    background: #fff;
}

.pb-coupon-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 0;
    border-left: 2px dashed #bfdbfe;
}

.pb-coupon-right {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    background:
        radial-gradient(circle at 0% 50%, transparent 10px, #f8fbff 10px),
        linear-gradient(90deg, rgba(239, 246, 255, 0.65) 0%, rgba(238, 242, 255, 0.35) 100%);
}

.pb-coupon-right::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
}

.pb-coupon-right-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pb-coupon-badge {
    padding: 2px 6px;
    border-radius: 4px;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
    line-height: 1.2;
}

.pb-coupon-right-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.pb-coupon-right-desc {
    margin: 4px 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.pb-coupon-right-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px dashed #f1f5f9;
}

.pb-coupon-foot-ok {
    font-size: 10px;
    font-weight: 600;
    color: #2563eb;
}

.pb-coupon-foot-ok i {
    margin-right: 2px;
}

.pb-coupon-foot-time {
    font-size: 10px;
    color: #94a3b8;
}

/* 表单 */
.pb-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.2s;
}

.pb-field-label {
    display: block;
    margin: 0 0 6px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pb-input-wrap {
    position: relative;
}

.pb-input-prefix {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding-left: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    pointer-events: none;
}

.pb-input-prefix-sep {
    display: inline-block;
    width: 1px;
    height: 16px;
    margin: 0 8px;
    background: #e2e8f0;
}

.pb-input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pb-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.pb-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.pb-input.pb-input-phone {
    padding-left: 64px;
    letter-spacing: 0.02em;
}

.pb-input.pb-input-phone.pb-input-complete {
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pb-input.pb-input-error {
    border-color: #f43f5e;
}

.pb-input.pb-input-code {
    padding-left: 40px;
    letter-spacing: 0.08em;
}

.pb-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.pb-field-error {
    display: none;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0 4px;
    font-size: 12px;
    font-weight: 500;
    color: #f43f5e;
}

.pb-field-error.pb-show {
    display: flex;
}

.pb-otp-row {
    display: flex;
    gap: 8px;
}

.pb-otp-row .pb-input-wrap {
    flex: 1;
    min-width: 0;
}

.pb-send-code-btn {
    flex-shrink: 0;
    min-width: 100px;
    padding: 12px 16px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pb-send-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pb-send-code-btn.pb-active:not(:disabled) {
    background: #eff6ff;
    color: #2563eb;
}

.pb-send-code-btn.pb-active:not(:disabled):hover {
    background: #dbeafe;
}

.pb-submit-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #2563eb 100%);
    background-size: 200% auto;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s, opacity 0.15s;
}

.pb-submit-btn:hover:not(:disabled) {
    animation: pbShimmer 2.5s linear infinite;
}

.pb-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.pb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pb-legal {
    margin: 8px 0 0;
    padding: 0 8px;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.6;
    color: #64748b;
}

.pb-legal a {
    color: #2563eb;
    text-decoration: none;
}

.pb-legal a:hover {
    text-decoration: underline;
}

.pb-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background: rgba(248, 250, 252, 0.8);
}

.pb-skip-btn {
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
}

.pb-skip-btn:hover {
    color: #64748b;
}

/* 成功面板 */
.pb-success-panel {
    display: none;
    padding: 24px 0;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pb-success-panel.pb-show {
    display: block;
    opacity: 1;
}

.pb-success-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.pb-success-icon {
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ecfdf5;
    font-size: 28px;
    color: #10b981;
}

.pb-success-ping {
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    animation: pbPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pb-success-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.pb-success-desc {
    margin: 6px 16px 0;
    font-size: 12px;
    color: #64748b;
}

.pb-success-coupon-mini {
    display: flex;
    max-width: 280px;
    margin: 24px auto 0;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: rgba(239, 246, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.pb-success-coupon-icon {
    display: flex;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #fff;
    line-height: 1;
}

.pb-success-coupon-icon span:first-child {
    font-size: 12px;
    font-weight: 700;
}

.pb-success-coupon-icon span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.pb-success-coupon-text {
    text-align: left;
}

.pb-success-coupon-name {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.pb-success-coupon-hint {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #059669;
}

.pb-success-done-btn {
    width: 100%;
    margin-top: 24px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: #0f172a;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    transition: background 0.15s, transform 0.15s;
}

.pb-success-done-btn:hover {
    background: #1e293b;
}

.pb-success-done-btn:active {
    transform: scale(0.95);
}

/* Toast */
#phone-bind-toast {
    position: fixed;
    left: 50%;
    top: 32px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateX(-50%);
    pointer-events: none;
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
}

.pb-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    animation: pbToastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.pb-toast-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}

.pb-toast-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.pb-toast-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

@keyframes pbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pbScaleIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pbBounceSubtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes pbShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pbToastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pbPing {
    75%, 100% { transform: scale(2); opacity: 0; }
}
