/**
 * 会员组件样式
 */

/* 会员入口容器 - 集成到导航栏内部 */
#member-container {
    position: relative;
    z-index: 99990;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-left: auto;
    /* 推到导航栏右侧 */
    flex-shrink: 0;
    /* 防止被压缩 */
}

/* 登录按钮 - 与导航栏风格协调 */
.member-login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid #FF6B35;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    color: #FF6B35;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.member-login-btn:hover {
    background: linear-gradient(135deg, #FF6B35, #FF8F5A);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.member-login-btn .icon {
    font-size: 16px;
}

/* 已登录用户信息 */
.member-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    position: relative;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #FF8F5A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-level {
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-level-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.member-points {
    font-size: 10px;
    color: #9ca3af;
}

/* 下拉菜单 */
.member-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.member-profile:hover .member-dropdown,
.member-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.member-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.member-dropdown-item:hover {
    background: #f3f4f6;
}

.member-dropdown-item .icon {
    font-size: 18px;
}

.member-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* 签到按钮 */
.member-signin-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.member-signin-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.member-signin-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.member-signin-btn.signed {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}

/* 签到弹窗 */
#signin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

#signin-modal.show {
    opacity: 1;
    visibility: visible;
}

.signin-modal-content {
    background: white;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    max-width: 320px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#signin-modal.show .signin-modal-content {
    transform: scale(1);
}

.signin-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: signin-bounce 0.6s ease;
}

.signin-title {
    font-size: 22px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.signin-points {
    font-size: 16px;
    color: #22c55e;
    font-weight: 600;
    margin-bottom: 4px;
}

.signin-streak {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.signin-close-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #FF6B35, #FF8F5A);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes signin-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* 积分动画 */
.points-popup {
    position: fixed;
    font-size: 18px;
    font-weight: 700;
    color: #22c55e;
    pointer-events: none;
    z-index: 99999;
    animation: points-fly 1.5s ease-out forwards;
}

@keyframes points-fly {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.3);
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    #member-container {
        margin-left: 8px;
    }

    .member-login-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .member-profile {
        padding: 6px 10px 6px 6px;
    }

    .member-avatar {
        width: 32px;
        height: 32px;
    }

    .member-name {
        display: none;
    }

    .member-dropdown {
        right: -10px;
        min-width: 180px;
        position: fixed;
        top: 60px;
        right: 10px;
    }
}