/* ========================================
   会员系统样式 v1.0
   可爱母婴官网 - 会员信息区 + 注册弹窗
   ======================================== */

/* ===== 会员信息区（Banner上方右侧） ===== */
.member-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fff5f7 0%, #e8f4ff 100%);
    border-radius: 12px;
    border: 1px solid #f0e0e8;
    position: relative;
    overflow: hidden;
}

.member-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(80,150,216,.08) 0%, transparent 70%);
    border-radius: 50%;
}

.member-info-left {
    flex: 1;
    position: relative;
    z-index: 1;
}

.member-greeting {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.member-greeting .level-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin: 0 4px;
    vertical-align: middle;
}

.member-greeting .level-tag.l1 { background: #6b8e23; }
.member-greeting .level-tag.l2 { background: #cd853f; }
.member-greeting .level-tag.l3 { background: #b8860b; }

.member-stats {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.member-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-stats .stat-value {
    font-weight: bold;
    color: #5096d8;
    font-size: 15px;
}

.member-stats .guide-link {
    color: #5096d8;
    cursor: pointer;
    text-decoration: underline;
}

.member-baby-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.member-baby-info .baby-icon {
    margin-right: 4px;
}

.member-baby-info .recommend {
    color: #e67e22;
    font-weight: 500;
}

.member-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.member-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    border: none;
    display: inline-block;
}

.member-btn.primary {
    background: linear-gradient(135deg, #5096d8, #7ab5e8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(80,150,216,.3);
}

.member-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80,150,216,.4);
    text-decoration: none;
}

.member-btn.outline {
    background: #fff;
    color: #5096d8;
    border: 1px solid #5096d8;
}

.member-btn.outline:hover {
    background: #eef6ff;
    text-decoration: none;
}

/* ===== 未登录状态 ===== */
.member-guest-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #ccc;
}

.member-guest-text {
    font-size: 14px;
    color: #666;
}

.member-guest-text strong {
    color: #333;
}

.register-btn {
    background: #ff6b9d;
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.register-btn:hover {
    background: #ff5588;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,107,157,.3);
}

/* 会员登录按钮（2026-08-30 加） */
.member-guest-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.login-btn {
    background: #fff;
    color: #ff6b9d;
    border: 1px solid #ff6b9d;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.login-btn:hover {
    background: #fff0f5;
    transform: translateY(-1px);
}

/* ===== 注册弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: modalIn .3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color .2s;
}

.modal-close:hover { color: #666; }

.modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all .2s;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 2px;
}

.modal-input:focus {
    border-color: #5096d8;
    box-shadow: 0 0 0 3px rgba(80,150,216,.12);
}

.modal-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #5096d8, #7ab5e8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80,150,216,.3);
}

.modal-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.modal-tip {
    font-size: 12px;
    color: #aaa;
    margin-top: 12px;
}

/* 成功状态 */
.modal-success {
    display: none;
}
.modal-success.show { display: block; }
.modal-form.hidden { display: none; }

.success-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    animation: successPop .5s cubic-bezier(.68,-.55,.27,1.55);
}

@keyframes successPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.success-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.success-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 加载动画 */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ===== 优惠券卡片（会员权益页用） ===== */
.coupon-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    display: flex;
    margin-bottom: 16px;
    transition: all .25s;
    position: relative;
}

.coupon-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

.coupon-left {
    width: 140px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    position: relative;
}

.coupon-left::before,
.coupon-left::after {
    content: '';
    position: absolute;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}
.coupon-left::before { top: -6px; }
.coupon-left::after { bottom: -6px; }

.coupon-amount {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}
.coupon-amount small { font-size: 16px; font-weight: normal; }

.coupon-condition {
    font-size: 13px;
    margin-top: 4px;
    opacity: .9;
}

.coupon-right {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.coupon-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}

.coupon-expire {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.coupon-use-btn {
    align-self: flex-start;
    padding: 5px 16px;
    background: #ff6b9d;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}

.coupon-use-btn:hover { background: #ff5588; }

.coupon-card.used .coupon-left {
    background: linear-gradient(135deg, #ccc, #ddd);
}
.coupon-card.used .coupon-use-btn {
    background: #ccc;
    cursor: not-allowed;
}

.coupon-card.expired .coupon-left {
    background: linear-gradient(135deg, #aaa, #bbb);
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .member-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }
    .member-actions {
        justify-content: flex-end;
    }
    .member-stats {
        gap: 14px;
        font-size: 12px;
    }
    .member-greeting {
        font-size: 15px;
    }
    .member-guest-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }
    .modal-box {
        padding: 28px 24px;
    }
}
